SIMP: Fit Bayesian simultaneous partial envelope model

View source: R/SIMP.R

SIMPR Documentation

Fit Bayesian simultaneous partial envelope model

Description

Fit Bayesian simultaneous partial envelope model

Usage

SIMP(
  X1C,
  X1D,
  X2,
  Y,
  dx,
  dy,
  n.iter = 20000,
  n.chains = 1,
  tau = 0.1,
  init_method = "envlps",
  init_params = NULL,
  Metro_method = "RW",
  HMC_steps = 10,
  autotune = TRUE,
  tune.accpt.prop.lower = 0.3,
  tune.accpt.prop.upper = 0.4,
  tune.incr = 0.05,
  burnin.prop = 0.5,
  tune.burnin.prop = 0.5,
  tune_nterm = 50,
  show_progress = TRUE,
  chains_parallel = FALSE,
  cores = 1,
  method.idx = 1,
  random.seed = T,
  ...
)

Arguments

X1C

Design matrix of the continuous part of the predictors of interest. Must have the same number of rows as Y.

X1D

Design matrix of the discrete part of the predictors of interest. Must have the same number of rows as Y.

X2

Design matrix of the nuisance predictors. Must have the same number of rows as Y.

Y

Response matrix. Must have the same number of rows as X.

dx

Partial predictor envelope dimension. Must be an integer between 0 and ncol(X1C).

dy

Partial response envelope dimension. Must be an integer between 0 and ncol(Y).

n.iter

Number of Markov chain iterations to run in each chains. *Includes burn-in*.

n.chains

Number of independent chains to run.

tau

The Metropolis tuning parameter

init_method

Initialization. Available options are "envlps" for the consistent initialization we proposed , "generate" for random generation, or "input" for giving parameters via input param init_params.

init_params

Input parameter values if the initial method is "input".

Metro_method

method for metropolis step for sampling A or B. Available options are "RW" for Random walk metropolis, "HMC" for Hamiltonian monte carlo, and "NUTS" for No-U-Turn sampler. "RW" is recommended to use only for accuracy and especially efficiency through our testing.

HMC_steps

Number of steps in Hamiltonian monte carlo in each iteration.

autotune

logical. Should the Metropolis tuning parameter be tuned during burn-in via adaptation?

tune.accpt.prop.lower

Lower bound for the acceptance rate of the metropolis step

tune.accpt.prop.upper

Upper bound for the acceptance rate of the metropolis step

tune.incr

Adjustment magnitude in tuning tau.

burnin.prop

Proportion for burn-in period among all iterations.

tune.burnin.prop

Proportion for the Metropolis tuning parameter be tuned among burn-in period.

tune_nterm

After which iteration the Metropolis tuning parameter should be tuned.

show_progress

Logical. Indicate whether the progress bar show or off.

chains_parallel

Logical. Indicate whether we should use parallel computing for each chain.

cores

Number of cores used in parallel computing.

method.idx

Choice of the method of initialization. There are 6 methods in total. The default one is the first one (consistent estimator in the manuscript). Always keep to be the default value if no special reasons.

random.seed

Whether we should fix random seed at the start of running for each chain.

...

all other useful inputs.

References

Yanbo Shen, Yeonhee Park, Saptarshi Chakraborty, Chunming Zhang(202X)

Examples

## Not run: 
library(SIMP)
library(Renvlp)
data(wheatprotein) # Load Renvlp package only for wheatprotein dataset.
set.seed(1)
X1C = wheatprotein[, 4:5]
X1D = as.matrix(wheatprotein[, 8], ncol = 1)
X2 = wheatprotein[, 6:7]
Y = wheatprotein[, 1:3]
MC_output <- SIMP(X1C = X1C, X1D = X1D, X2 = X2,
                  Y = Y, dx = 1, dy = 1, n.iter = 1e4)

## End(Not run)

yanbowisc/SIMP documentation built on Oct. 30, 2022, 1:33 a.m.