MakeArrays: Create arrays to save MCMC posterior samples

Description Usage Arguments

Description

Create arrays to save MCMC posterior samples

Usage

1
2
3
MakeArrays(X = NULL, chains, Nsims, num_exper, num_conf, omega, minX,
  maxX, starting_cutoffs, starting_alphas, starting_coefs, starting_vars,
  min_exper_sample = 0)

Arguments

X

Numeric vector. Observed exposure values. Can be left NULL if min_exper_sample is set to 0.

chains

The number of separate MCMC chains.

Nsims

The number of posterior samples per chain.

num_exper

The number of experiments we are allowing.

num_conf

The number of potential confounders.

omega

The omega of the BAC prior on inclusion indicators.

minX

The minimum observed exposure value.

maxX

The maximum observed exposure value.

starting_alphas

Array with dimensions corresponding to the model (exposure / outcome), the experiment, and the potential confounders. Entries 0/1 represent exclusion/inclusion of the covariate in the corresponding model.

starting_coefs

Array with the starting values of all coefficients. Dimensions are: Exposure/Outcome model, chains, experiments, and covariate (intercept, coefficient of exposure, covariates). The coefficient of exposure should be NA for the exposure model.

starting_vars

Array including the starting values for the residual variances. Dimensions correspond to: Exposure/Outcome model, chains, and experiment.

min_exper_sample

The minimum number of observations within an experiment. It will be used to ensure that starting cutoffs are allowed under the prior specification.

starting

cutoffs Matrix with rows corresponding to different chains. Each row includes K ordered values of MCMC starting cutoffs. If left NULL, random started values are used.


gpapadog/LERCA documentation built on June 4, 2019, 11:40 a.m.