Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Struggling to generate initial values when probabilities are low #79

Open
dbarneche opened this issue Aug 25, 2021 · 0 comments
Open

Struggling to generate initial values when probabilities are low #79

dbarneche opened this issue Aug 25, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@dbarneche
Copy link
Collaborator

This will fail

library(bayesnec)
library(tidyverse)
b_top <- 100
b_beta <- -0.2
b_nec <- 4
fct <- function(...)as.integer(round(bayesnec:::pred_nec3param(...)))
dat <- data.frame(x = seq(1, 20, length.out = 10), tr = 500) %>%
  dplyr::mutate(y = fct(b_beta, b_nec, b_top, x))
test <- bnec(y | trials(tr) ~ model(x, "nec3param"), data = dat, family = binomial(link = "identity"))

But this will work just fine

dat$tr <- 100
test <- bnec(y | trials(tr) ~ model(x, "nec3param"), data = dat, family = binomial(link = "identity"))

So I suspect that the current blind sampling of make_inits is not good enough when probabilities are low.

@dbarneche dbarneche self-assigned this Aug 25, 2021
@dbarneche dbarneche added the enhancement New feature or request label Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant