
The main function for fitting multivariate bcf
run_mvbcf.RdThe main function for fitting multivariate bcf
Usage
run_mvbcf(
X_con,
y,
Z,
X_mod,
X_con_test = X_con,
X_mod_test = X_mod,
alpha = 0.95,
beta = 2,
alpha_tau = 0.25,
beta_tau = 3,
sigma_mu = diag((1)^2/n_tree, ncol(y)),
sigma_tau = diag((1)^2/n_tree_tau, ncol(y)),
v_0 = ncol(y) + 2,
sigma_0 = diag(1, ncol(y)),
n_iter = 1000,
n_tree = 50,
n_tree_tau = 20,
min_nodesize = 1
)Arguments
- X_con
The control variables used in the mu trees
- y
The outcome variable/s
- Z
The treatment indicator
- X_mod
The effect moderators used in the tau trees
- X_con_test
The control variables used in the mu trees (test data)
- X_mod_test
The effect moderators used in the tau trees (test data)
- alpha
The alpha parameter in the tree prior for mu trees
- beta
The beta parameter in the tree prior for mu trees
- alpha_tau
The alpha parameter in the tree prior for tau trees
- beta_tau
The beta parameter in the tree prior for tau trees
- sigma_mu
The prior for the terminal node parameters of mu trees
- sigma_tau
The prior for the terminal node parameter of tau trees
- v_0
Prior degrees of freedom for inverse-wishart distribution
- sigma_0
The scale matrix in the prior for inverse-wishart distribution
- n_iter
The number of MCMC iterations
- n_tree
The number of mu trees
- n_tree_tau
The number of tau trees
- min_nodesize
Moves resulting in nodes with fewer observations than this are rejected