ss_ranef_alpha: ss_ranef_alpha

View source: R/ss_ranef.R

ss_ranef_alphaR Documentation

ss_ranef_alpha

Description

ss_ranef_alpha() fits a random intercepts model with a spike-and-slab prior on the random effects

Usage

ss_ranef_alpha(
  y,
  unit,
  burnin = 1000,
  iter = 1000,
  chains = 4,
  priors = NULL,
  vars2monitor = c("alpha", "gamma", "sigma", "tau", "theta")
)

Arguments

y

A vector containing the outcome

unit

A vector of the same length as y containing a unique identifier

burnin

The number of iterations to use as burnin. Defaults to 1000.

iter

The number of iterations to use for estimating the parameters. Defaults to 1000.

chains

The number of MCMC chains to use. Defaults to 4.

priors

A named list to specify priors. Defaults to NULL. See README for details.

vars2monitor

A vector containing the names of which parameters to monitor. See details below.

Details

The parameters that can be tracked are:

  • alpha: The fixed effect for the intercept

  • gamma: The inclusion indicators for the random effects

  • sigma: The residual standard deviation

  • tau: The standard deviation of the random effects

  • theta: The random effects

Value

An object of type ssranef.


josue-rodriguez/SSranef documentation built on March 23, 2022, 3:27 p.m.