Functional Dirichlet Process Spatial Temporal Aggregated Predictor in a Linear Mixed Effects Regression Model

fdp_staplmer(
  formula,
  benvo,
  weights = NULL,
  alpha_a = 1,
  alpha_b = 1,
  sigma_a = 1,
  sigma_b = 1,
  tau_a = 1,
  tau_b = 1,
  K = 5,
  iter_max = 1000,
  burn_in = 500,
  thin = 1,
  fix_alpha = FALSE,
  seed = NULL
)

Arguments

formula

Similar as for sstap_lmer, though fdp_staplmer is currently restricted to only one stap term.

benvo

built environment - Benvo - object from containing the relevant subject - Built Environment data

weights

weights for weighted regression - default is vector of ones

alpha_a

alpha gamma prior hyperparameter or alpha if fix_alpha = TRUE

alpha_b

alpha gamma prior hyperparameter

sigma_a

precision gamma prior hyperparameter

sigma_b

precision gamma prior hyperparameter

tau_a

penalty parameters gamma prior hyperparameter

tau_b

penalty parameters gamma prior hyperparameter

K

truncation number

iter_max

maximum number of iterations

burn_in

number of burn in iterations

thin

number by which to thin samples

fix_alpha

boolean value indicating whether or not to fix the concentration parameter

seed

random number generator seed will be set to default value if not by user

Value

a stapDP model object

Details

This function fits a linear mixed effects regression model in a Bayesian paradigm with improper priors assigned to the "standard" regression covariates designated in the formula argument and a Dirichlet process prior with normal-gamma base measure assigned to the stap basis function expansion using penalized splines via jagam. normal priors are placed on the latent group variables and an improper prior is placed on the correlation matrix leading to a Wishart posterior.

The concentration parameter is assigned a gamma prior with hyperparameters shape alpha_a and scale alpha_b. Precision parameters sigma_a,sigma_b, tau_a,tau_b are similar for the residual and penalties' precision, respectively.