Remove selected parameters from a shinystan object. This is useful if
you have a very large shinystan object when you only want to look at a
subset of parameters. With a smaller shinystan object,
launch_shinystan will be faster and you should experience
better performance (responsiveness) after launching when using the
'ShinyStan' app.
drop_parameters(sso, pars)sso, with pars dropped.
generate_quantity to add a new quantity to a
shinystan object.
# Using example shinystan object 'eight_schools'
print(eight_schools@param_names)
#> [1] "mu" "theta[1]" "theta[2]" "theta[3]"
#> [5] "theta[4]" "theta[5]" "theta[6]" "theta[7]"
#> [9] "theta[8]" "tau" "log-posterior"
# Remove the scalar parameters mu and tau
sso <- drop_parameters(eight_schools, pars = c("mu", "tau"))
print(sso@param_names)
#> [1] "theta[1]" "theta[2]" "theta[3]" "theta[4]"
#> [5] "theta[5]" "theta[6]" "theta[7]" "theta[8]"
#> [9] "log-posterior"
# Remove all elements of the parameter vector theta
sso <- drop_parameters(sso, pars = "theta")
print(sso@param_names)
#> [1] "log-posterior"