| launch_shinystan,idealstan-method | R Documentation |
idealstan ObjectThis wrapper will pull the rstan samples out of a fitted idealstan model and then launch
launch_shinystan. This function is useful for examining convergence statistics of the
underlying MCMC sampling.
## S4 method for signature 'idealstan'
launch_shinystan(
object,
pars = c("L_full", "sigma_reg_full", "sigma_abs_free", "A_int_free", "B_int_free",
"steps_votes", "steps_votes_grm"),
...
)
object |
A fitted |
pars |
A character vector of parameters to select from the underlying |
... |
Other parameters passed on to |
No return value; called for side effects (launches the Shinystan interactive diagnostics application).
shinystan
data('senate114')
senate114$cast_code <- ifelse(senate114$cast_code=="Absent", NA,
as.integer(senate114$cast_code) - 1L)
sen_data <- id_make(senate114, outcome_disc='cast_code',
person_id='bioname', item_id='rollnumber',
group_id='party_code')
sen_est <- id_estimate(sen_data, model_type=1, use_method="pathfinder", fixtype='vb_full', ncores=4)
# will launch interactive browser
if(interactive()) {
launch_shinystan(sen_est)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.