idealstan icon indicating copy to clipboard operation
idealstan copied to clipboard

fixing modes with variational inference

Open michalovadek opened this issue 7 months ago • 5 comments

coming back to this package after a few years away and pleased to see that Bayesian inference in R remains as janky as I remember it (jkjk). I have a simple question: does fixtype = "vb_full" work in the current development version of the package? (using develop due to the Stan array definition deprecation)

I have the following setup:

# make data
data_ideal <- idealstan::id_make(score_data = cases_pos_data,
                                 person_id = "actor",
                                 item_id = "case",
                                 model_id = "1",
                                 outcome_disc = "position")

# estimate model
estimate_ideal <- idealstan::id_estimate(
  idealdata = data_ideal,
  model_type = 1,
  vary_ideal_pts = "none",
  fixtype = "vb_full",
  nchains = 8,
  ncores = 6
)

and I'm getting the following error message when running the id_estimate call:

Model executable is up to date! [1] "(First Step): Estimating model with variational inference to identify modes to constrain." Error: Missing input data for the following data variables: num_restrict_high, num_restrict_low. In addition: Warning message: In max(Y_cont) : no non-missing arguments to max; returning -Inf

but specifying num_restrict_ in the function call is not possible. Using the latest version of cmdstanr (2.35.0). Any pointers would be appreciated

michalovadek avatar Jul 14 '24 16:07 michalovadek