refund (version 0.1-23)

gibbs_mult_wish: Multilevel FoSR using a Gibbs sampler and Wishart prior

Description

Fitting function for function-on-scalar regression for multilevel data. This function estimates model parameters using a Gibbs sampler and estimates the residual covariance surface using a Wishart prior.

Usage

gibbs_mult_wish(
  formula,
  Kt = 5,
  data = NULL,
  verbose = TRUE,
  N.iter = 5000,
  N.burn = 1000,
  alpha = 0.1,
  Az = NULL,
  Bz = NULL,
  Aw = NULL,
  Bw = NULL,
  v = NULL,
  SEED = NULL
)

Arguments

formula

a formula indicating the structure of the proposed model.

Kt

number of spline basis functions used to estimate coefficient functions

data

an optional data frame, list or environment containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which the function is called.

verbose

logical defaulting to TRUE -- should updates on progress be printed?

N.iter

number of iterations used in the Gibbs sampler

N.burn

number of iterations discarded as burn-in

alpha

tuning parameter balancing second-derivative penalty and zeroth-derivative penalty (alpha = 0 is all second-derivative penalty)

Az

hyperparameter for inverse gamma controlling variance of spline terms for subject-level effects

Bz

hyperparameter for inverse gamma controlling variance of spline terms for subject-level effects

Aw

hyperparameter for inverse gamma controlling variance of spline terms for population-level effects

Bw

hyperparameter for inverse gamma controlling variance of spline terms for population-level effects

v

hyperparameter for inverse Wishart prior on residual covariance

SEED

seed value to start the sampler; ensures reproducibility

References

Goldsmith, J., Kitago, T. (2016). Assessing Systematic Effects of Stroke on Motor Control using Hierarchical Function-on-Scalar Regression. Journal of the Royal Statistical Society: Series C, 65 215-236.