Closed helske closed 2 years ago
set.seed(0) timepoints <- 10 individuals <- 5 total_obs <- timepoints * individuals test_data <- data.frame( time = 1:timepoints, group = gl(individuals, timepoints), trials = sample(50:100, size = total_obs, replace = TRUE) ) |> dplyr::mutate( y = rbinom(n = total_obs, size = trials, prob = 0.75), x = rnorm(total_obs) )
Without trials does not throw an error:
trials
fit<-dynamite(obs(y ~ x, "binomial"), data = test_data, "group", "time", debug = list(no_compile = TRUE))
But there is (obviously) no trials_y in fit$stan$model_vars so sampling will fail.
trials_y
fit$stan$model_vars
Without
trials
does not throw an error:But there is (obviously) no
trials_y
infit$stan$model_vars
so sampling will fail.