ordinalbayes {ordinalbayes}R Documentation

Ordinal Bayesian Regression Models for High-Dimensional Data

Description

Ordinal Bayesian Regression Models for High-Dimensional Data

Usage

ordinalbayes(
  formula,
  data,
  x = NULL,
  subset,
  center = TRUE,
  scale = TRUE,
  a = 0.1,
  b = 0.1,
  model = "regressvi",
  gamma.ind = "fixed",
  pi.fixed = 0.05,
  c.gamma = NULL,
  d.gamma = NULL,
  alpha.var = 10,
  sigma2.0 = NULL,
  sigma2.1 = NULL,
  coerce.var = 10,
  lambda0 = NULL,
  nChains = 3,
  adaptSteps = 5000,
  burnInSteps = 5000,
  numSavedSteps = 9999,
  thinSteps = 3,
  parallel = TRUE,
  seed = NULL,
  quiet = FALSE
)

Arguments

formula

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. The left side of the formula is the ordinal outcome while the variables on the right side of the formula are the covariates that are not included in the penalization process. Note that if all variables in the model are to be penalized, an intercept only model formula should be specified.

data

an optional data.frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model.

x

an optional matrix of predictors that are to be penalized in the model fitting process.

subset

an optional vector specifying a subset of observations to be used in the fitting process.

center

logical, if TRUE the penalized predictors are centered.

scale

logical, if TRUE the penalized predictors are scaled.

a

hyperprior for the penalty parameter lambda which is Gamma with parameters a and b.

b

hyperprior for the penalty parameter lambda which is Gamma with parameters a and b.

model

Specify which penalized ordinal model to fit as "regressvi", "lasso", "dess", or "normalss".

gamma.ind

indicates whether prior for the variable inclusion indicators is "fixed" or "random" (for models "regressvi", "dess", or "normalss").

pi.fixed

constant prior for the variable inclusion indicators is when gamma.ind="fixed".

c.gamma

hyperprior for the variable inclusion indicators is when gamma.ind="random".

d.gamma

hyperprior for the variable inclusion indicators is when gamma.ind="random".

alpha.var

variance for alpha_k thresholds in the MCMC chain (default 10).

sigma2.0

variance for the spike when model="normalss" (set to some small positive value).

sigma2.1

variance for the slab when model="normalss" (set to some large positive value).

coerce.var

variance associated with any unpenalized predictors in the MCMC chain (default 10).

lambda0

parameter value for the spike when model="dess".

nChains

number of parallel chains to run (default 3)

adaptSteps

number of iterations for adaptation (default 5,000).

burnInSteps

number of iterations of the Markov chain to run (default 5,000).

numSavedSteps

number of saved steps per chain (default 9,999).

thinSteps

thinning interval for monitors (default 3).

parallel

logical, run the MCMC on multiple processors (default TRUE).

seed

integer, seed to ensure reproducibility.

quiet

logical, when TRUE, suppress output of JAGS (or rjags) when updating models

Value

results An object of class runjags

call Model call

model Name of the ordinal model that was fit

a Value the user specified for a

b Value the user specified for b

featureNames Names of the penalized predictors

center Value the user specified for center

scale Value the user specified for scale

y Observed ordinal response

x Matrix of penalized predictors used in model fitting

w Matrix of unpenalized predictors used in model fitting

gamma.ind Value the user specified for gamma.ind

pi.fixed Value the user specified for pi.fixed if gamma.ind="fixed"

c.gamma Value the user specified for c.gamma if gamma.ind="random"

d.gamma Value the user specified for d.gamma if gamma.ind="random"

sigma2.0 Value the user specified for sigma2.0 if model="normalss"

sigma2.1 Value the user specified for sigma2.1 if model="normalss"

lambda0 value the user specified for lambda0 if model="dess"

See Also

print.ordinalbayes, summary.ordinalbayes, coef.ordinalbayes

Examples


# The number of adaptSteps, burnInSteps, and numSavedSteps was reduced for package testing
data("cesc")
data(reducedSet)
fit<-ordinalbayes(Stage~1, data=cesc, x=cesc[,5:45],
         model="regressvi", gamma.ind="fixed", pi.fixed=0.99,
         adaptSteps=1000, burnInSteps=1000, nChains=2,
         numSavedSteps=2000, thinSteps=2, seed=26)


[Package ordinalbayes version 0.1.1 Index]