max_q2_iar: Update prior probabilities of model inclusion at each...

View source: R/max_q2_iar.R

max_q2_iarR Documentation

Update prior probabilities of model inclusion at each iteration.

Description

Uses stan to optimize the term in the EM algorithm that depends on the prior probabilities of inclusion in the model, p_j.

Usage

max_q2_iar(
  iar.data,
  p,
  opt.algorithm = "LBFGS",
  tau.prior = "none",
  tau.manual = NULL,
  p.bound = c(0.01, 0.99),
  stan_manual = NULL
)

Arguments

iar.data

A list of output from mungeCARdata4stan that contains the necessary inputs for the IAR prior.

p

A vector containing the prior probabilities of inclusion for each parameter at the current iteration.

opt.algorithm

One of the optimization algorithms available from optimizing.

tau.prior

One of c("none", "manual", "cauchy"). This argument determines the precision parameter in the Conditional Autoregressive model for the (logit of) prior inclusion probabilities. When "none", the precision is set to 1; when "manual", the precision is manually entered by the user (and still not random); when "cauchy", the inverse precision is assumed to follow a Cauchy distribution with mean 0 and scale 2.5. Note that at this stage of development, only the "none" option has been extensively tested, so the other options should be used with caution.

tau.manual

When tau.prior = "manual", use this argument to specify a common precision parameter.

p.bound

A vector defining the lower and upper boundaries for the probabilities of inclusion in the model, respectively. Defaults to c(0.01, 0.99).

stan_manual

A stan_model that is manually specified.

Value

A vector containing updated probabilities of inclusion.

Note

This function borrows from the work of Mitzi Morris, who describes how to fit an intrinsic autoregression in stan \insertCiteMorris:2017,Morris:2019ssnet.

References

\insertRef

Morris:2017ssnet

\insertRef

Morris:2019ssnet

\insertRef

Tang:2017ssnet


jmleach-bst/ssnet documentation built on March 4, 2024, 5:04 p.m.