Skip to contents

Creates an object containing the matrix with the parameters simulated using the MCMC procedure (using JAGS, BUGS or Stan) and a vector of parameters (strings) that can be used to perform the expected value of partial information analysis. In the process, createInputs also checks for linear dependency among columns of the PSA samples or columns having constant values and removes them to only leave the fundamental parameters (to run VoI analysis). This also deals with simulations stored in a .csv or .txt file (e.g. as obtained using bootstrapping from a non-Bayesian model).

Usage

# S3 method for default
createInputs(inputs, print_is_linear_comb = TRUE)

createInputs(inputs, print_is_linear_comb = TRUE)

# S3 method for rjags
createInputs(inputs, print_is_linear_comb = TRUE)

# S3 method for bugs
createInputs(inputs, print_is_linear_comb = TRUE)

# S3 method for stanfit
createInputs(inputs, print_is_linear_comb = TRUE)

# S3 method for data.frame
createInputs(inputs, print_is_linear_comb = TRUE)

# S3 method for numeric
createInputs(inputs, print_is_linear_comb = TRUE)

Arguments

inputs

A rjags, bugs or stanfit object, containing the results of a call to either JAGS, (using R2jags), BUGS (using R2WinBUGS, or Stan (using rstan).

print_is_linear_comb

Logical indicator. If set to TRUE (default) then prints the output of the procedure trying to assess whether there are some parameters that are a linear combination of others (in which case they are removed).

Value

mat

Data.frame containing all the simulations for all the monitored parameters

parameters

Character vectors of the names of all the monitored parameters

See also

Author

Gianluca Baio, Anna Heath and Mark Strong