blatentControl {blatent}R Documentation

blatent estimation specifications

Description

Creates control specifics for estimation options for estimating Bayesian latent variable models.

Usage

blatentControl(
  calculateDIC = TRUE,
  calculateWAIC = TRUE,
  defaultPriors = setDefaultPriors(),
  defaultInitializeParameters = setDefaultInitializeParameters(),
  estimateLatents = TRUE,
  estimator = "blatent",
  estimatorType = "R",
  estimatorLocation = "",
  executableName = "",
  fileSaveLocation = paste0(getwd(), "/"),
  HDPIntervalValue = 0.95,
  maxTuneChains = 0,
  minTuneChains = 0,
  missingMethod = "omit",
  nBurnin = 1000,
  nChains = 4,
  nCores = -1,
  nSampled = 1000,
  nThin = 5,
  nTuneIterations = 0,
  parallel = FALSE,
  posteriorPredictiveChecks = setPosteriorPredictiveCheckOptions(),
  seed = NULL
)

Arguments

calculateDIC

Calculates DIC following Markov chain. DIC will be marginalized for models with latent variables. Defaults to TRUE.

calculateWAIC

Calculates WAIC following Markov chain. WAIC will be marginalized for models with latent variables. Defaults to TRUE.

defaultPriors

Sets priors for all parameters that are not specified in priorsList of blatentEstimate. Defaults to list set by setDefaultPriors function. Values in list currently allowed are

  • normalMean for the mean of a normal distribution (defaults to 0).

  • normalVariance for the variance of a normal distribution (defaults to 1000).

  • normalCovariance for the covariance of a multivariate normal distribution (defaults to 0).

defaultInitializeParameters

List of values that sets distributions used to initialize parameters. Defaults to list set by setDefaultInitializeParameters function. Values in list currently allowed are:

  • normalMean for the mean of a normal distribution (defaults to 0).

  • normalVariance for the variance of a normal distribution (defaults to 1).

  • normalCovariance for the covariance of a multivariate normal distribution (defaults to 0).

estimateLatents

Estimate latent variables summaries for each observation following MCMC estimation. Defaults to TRUE.

estimator

Sets the estimation algorithm to be used. Currently, one option is available that works. The eventual values will be:

  • "blatentEstimator" Sets the estimation algorithm to be used to the R package blatentEstimator, which must be installed (default).

  • "GPDCM" Gibbs Probit Diagnostic Classification Model is allowed but not functional.

estimatorType

Sets location of estimator. Currently, only one option (the default) works.

  • "R" Sets estimation via R packages (default).

  • "external" for estimation routines external to R. Currently external syntax does not work.

estimatorLocation

Sets the path to the location of estimator executable, if estimatorType is "external". Currently set to "".

executableName

Sets the name for the executable file for the estimator. Defaults to ""

fileSaveLocation

Sets the path for output files used for external estimation routines. Only used when estimatorType = "external".

HDPIntervalValue

Sets the value for all highest density posterior interval parameter summaries. Defaults to 0.95.

maxTuneChains

Sets the maximum number of tuning chains for MCMC sampling algorithm, if needed. Currently, no Metropolis steps exist in algorithm, so is unused. Defaults to 0.

minTuneChains

Sets the minimum number of tuning chains for MCMC sampling algorithm, if needed. Currently, no Metropolis steps exist in algorithm, so is unused. Defaults to 0.

missingMethod

Sets the way missing observed variables are treated within algorithm. Defaults to "skip". Current options are:

  • "skip" Skips all missing variables in model likelihoods. For dependent variables predicted variables with missing values, omits any case with missing values.

  • "imputeBayes" Model-based imputation using Bayes theorem.

nBurnin

Sets the number of burnin iterations. Defaults to 1000.

nChains

Sets the number of independent Markov chains run by the program. Defaults to 4.

nCores

Sets the number of cores used in parallel processing if option parallel is TRUE. Defaults to -1. Values are semi-indicative of how many processors will be used:

  • -1 indicates that all but one available processor will be used.

  • 0 indicates that all available processors will be used.

  • >0 indicates that specific number of processors will be used, if available.

Note: currently, parallel processing is unavailable, so this is unused.

nSampled

Sets the number of posterior draws to sample, per chain. Defaults to 1000.

nThin

Sets the thinning interval, saving only the posterior draws that comes at this value. Defaults to 5.

nTuneIterations

Sets the number of iterations per tuning chain, if needed. Currently, no Metropolis steps exist in algorithm, so is unused. Defaults to 0.

parallel

If TRUE, enables parallel processing of estimation and PPCM analyses. Currently, parallel processing is unavailable, so this is unused. Defaults to FALSE.

posteriorPredictiveChecks

List of values that sets options for posterior predictive model checks. Defaults to list set by setPosteriorPredictiveCheckOptions function. Values in list currently allowed are:

seed

Sets the random number seed for the analysis. Defaults to NULL, which does not set the seed and uses current session value per each analysis.

Value

A list of values containing named entries for all arguments shown above.


[Package blatent version 0.1.2 Index]