Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

drop_parameters

Drop parameters from a shinystan object


Description

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.

Usage

drop_parameters(sso, pars)

Arguments

sso

A shinystan object.

pars

A character vector of parameter names. If the name of a non-scalar (e.g. vector, matrix) parameter is included in pars all of its elements will be removed. Currently it is not possible to remove only a subset of the elements of a non-scalar parameter.

Value

sso, with pars dropped.

See Also

generate_quantity to add a new quantity to a shinystan object.

Examples

# Using example shinystan object 'eight_schools'
print(eight_schools@param_names)

# Remove the scalar parameters mu and tau
sso <- drop_parameters(eight_schools, pars = c("mu", "tau"))
print(sso@param_names)

# Remove all elements of the parameter vector theta
sso <- drop_parameters(sso, pars = "theta")
print(sso@param_names)

shinystan

Interactive Visual and Numerical Diagnostics and Posterior Analysis for Bayesian Models

v2.5.0
GPL (>= 3)
Authors
Jonah Gabry [aut, cre], Stan Development Team [ctb], Michael Andreae [ctb], Michael Betancourt [ctb], Bob Carpenter [ctb], Yuanjun Gao [ctb], Andrew Gelman [ctb], Ben Goodrich [ctb], Daniel Lee [ctb], Dongying Song [ctb], Rob Trangucci [ctb]
Initial release
2018-04-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.