Skip to contents

This function is used in stom::extract2() for inferring parameter structure from Stan model outputs.

Usage

get_stan_param_info(params)

Arguments

params

Character. A vector of parameter names to pass in.

Value

A list of parameters, matching their input order, with data structure information.

Examples

p_scalar = c( "alpha", "beta" )
p_1d = c( "x[1]", "x[2]" )
p_2d = c("y[1,1]", "y[2,1]", "y[1,2]", "y[2,2]")
p_3d = c("z[1,1,1]", "z[2,1,1]", "z[1,2,1]", "z[2,2,1]", "z[1,1,2]", "z[2,1,2]", "z[1,2,2]", "z[2,2,2]")
params = c( p_scalar, p_1d, p_2d, p_3d )
get_stan_param_info(params)
#> Error in get_stan_param_info(params): could not find function "get_stan_param_info"