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

fdp_staplmer.fit(
  y,
  Z,
  X,
  W,
  S,
  subj_mat,
  subj_n,
  weights = rep(1, length(y)),
  alpha_a = 1,
  alpha_b = 1,
  sigma_a = 1,
  sigma_b = 1,
  tau_a = 1,
  tau_b = 1,
  K = 5,
  iter_max,
  burn_in,
  thin = 1,
  fix_alpha = FALSE,
  bw = FALSE,
  seed = NULL
)

Arguments

y

vector of outcomes

Z

design matrix

X

stap design matrix

W

group terms design matrix from glFormula

S

list of penalty matrices from jagam

subj_mat

matrix indexing subject-measurement locations in (Z,X,W)

subj_n

vector of number of subject measurements

weights

weights for weighted regression - default is vector of ones

alpha_a

alpha gamma prior hyperparameter

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 for DP mixture components

iter_max

maximum number of iterations

burn_in

number of iterations to burn-in

thin

number by which to thin samples

fix_alpha

boolean value

bw

boolean value indicating whether or not subject decomposition is used

seed

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