fdp_staplmer | R Documentation |
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 = 5L,
iter_max = 1000L,
burn_in = floor(iter_max/2),
thin = 1L,
chains = 1L,
fix_alpha = FALSE,
seed = NULL,
scale = TRUE,
center = TRUE,
subsample_yhat = NULL,
...
)
formula |
Similar as for |
benvo |
built environment - |
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 |
chains |
number of randomly initialized chains to run |
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 |
scale |
boolean determining if fixed effects matrix is scaled for estimation |
center |
boolean determining if fixed effects matrix is centered for estimation |
subsample_yhat |
integer value indicating how many samples to subsample of yhat samples. Useful when N is big. |
... |
optional arguments to |
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
group covariance 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.
a stapDP model object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.