random_spec | R Documentation |
This function can be used as part of dynamiteformula()
to define
whether the group-level random effects should be modeled as correlated or
not.
random_spec(correlated = TRUE, noncentered = TRUE)
correlated |
[ |
noncentered |
[ |
With a large number of time points random intercepts can become challenging sample with default priors. This is because with large group sizes the group-level intercepts tend to be behave similarly to fixed group-factor variable so the model becomes overparameterized given these and the common intercept term. Another potential cause for sampling problems is relatively large variation in the intercepts (large sigma_nu) compared to the sampling variation (sigma) in the Gaussian case.
An object of class random_spec
.
Model formula construction
dynamite()
,
dynamiteformula()
,
lags()
,
lfactor()
,
splines()
data.table::setDTthreads(1) # For CRAN
# two channel model with correlated random effects for responses x and y
obs(y ~ 1 + random(~1), family = "gaussian") +
obs(x ~ 1 + random(~1 + z), family = "poisson") +
random_spec(correlated = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.