stan_confidenceRegion: Extract functions of multiple variables from a stanfit object

Description Usage Arguments Value Examples

View source: R/stan_confidenceRegion.R

Description

Can be useful for determining quantiles or plotting multidimensional regions – for instance in case of colinearity of predictors.

Usage

1
2
stan_confidenceRegion(stanfit, parstrings, prefuncstring = "(",
  joinfuncstring = " + ", postfuncstring = ")")

Arguments

stanfit

object of class stanfit.

parstrings

vector of strings containing partial (or full) matches of parameter names. When more than one string is passed, functions are computed based on the combination of the first match for each string, then the second match for each string, etc. The first match of the first string is only ever combined with the first match of the second, similarly for the 2nd match, etc.

prefuncstring

string containing front element of function. E.g., 'exp(' for an exponential region.

joinfuncstring

string used to join the (possibly) multiple parameters involved.

postfuncstring

string containing end element of function. E.g., ') *2' to multiply the result by 2.

Value

matrix of values of the specified interactions at each iteration.

Examples

1
2
3
temp<-stan_confidenceRegion(stanfit=ctstantestfit$stanfit, 
  parstrings=c('pop_DRIFT[1,2]','pop_DRIFT[2,1]'))
t(apply(temp,2,quantile))

cdriveraus/ctsem documentation built on April 18, 2019, 9:51 a.m.