Description Usage Arguments Value Functions Examples
View source: R/iCARH.parameters.R
Group of functions to return model parameters of interest
1 2 3 4 5 6 7 8 9 | iCARH.getBeta(fit)
iCARH.getARCoeff(fit)
iCARH.getTreatmentEffect(fit)
iCARH.getPathwaysCoeff(fit, path.names = NULL)
iCARH.getDataImputation(fit)
|
fit |
Object returned by iCARH.model |
path.names |
pathway names |
the iCARH.get[*]
functions return a an array with corresponding model parameters MCMC draws.
iCARH.getBeta
: Get beta parameter draws from all chains combined
iCARH.getARCoeff
: return theta coefficients
iCARH.getTreatmentEffect
: return alpha coefficients
iCARH.getPathwaysCoeff
: return phi coefficients
iCARH.getDataImputation
: return complete data (including imputed data)
1 2 3 4 5 6 7 8 9 10 11 12 13 | data.sim = iCARH.simulate(4, 10, 14, 8, 2, path.probs=0.3, Zgroupeff=c(0,4),
beta.val=c(1,-1,0.5, -0.5))
XX = data.sim$XX
Y = data.sim$Y
Z = data.sim$Z
pathways = data.sim$pathways
rstan_options(auto_write = TRUE)
options(mc.cores = 2)
fit = iCARH.model(XX, Y, Z,groups=rep(c(0,1), each=5), pathways,
control = list(adapt_delta = 0.99, max_treedepth=10), iter = 2, chains = 2)
if(!is.null(fit$icarh))
iCARH.getBeta(fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.