Description Usage Arguments Details Value See Also Examples
View source: R/nauf_stan_regs.R
The Bayesian mixed effects regression functions nauf_stan_lmer
, nauf_stan_glmer.nb
,
and nauf_stan_glmer
fit linear, negative binomial, and other generalized
linear mixed effects models, respectively, impelementing
nauf_contrasts
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | nauf_stan_glmer(formula, data = NULL, family = gaussian, subset, weights,
na.action = na.pass, offset, contrasts = NULL, ncs_scale = attr(formula,
"standardized.scale"), ..., prior = rstanarm::normal(),
prior_intercept = rstanarm::normal(), prior_aux = rstanarm::cauchy(0, 5),
prior_covariance = rstanarm::decov(), prior_PD = FALSE,
algorithm = "sampling", adapt_delta = NULL, QR = FALSE,
sparse = FALSE)
nauf_stan_lmer(formula, data = NULL, subset, weights, na.action = na.pass,
offset, contrasts = NULL, ncs_scale = attr(formula, "standardized.scale"),
..., prior = rstanarm::normal(), prior_intercept = rstanarm::normal(),
prior_aux = rstanarm::cauchy(0, 5), prior_covariance = rstanarm::decov(),
prior_PD = FALSE, algorithm = "sampling", adapt_delta = NULL,
QR = FALSE)
nauf_stan_glmer.nb(formula, data = NULL, subset, weights,
na.action = na.pass, offset, contrasts = NULL, link = "log",
ncs_scale = attr(formula, "standardized.scale"), ...,
prior = rstanarm::normal(), prior_intercept = rstanarm::normal(),
prior_aux = rstanarm::cauchy(0, 5), prior_covariance = rstanarm::decov(),
prior_PD = FALSE, algorithm = "sampling", adapt_delta = NULL,
QR = FALSE)
|
formula, data, family, subset, weights, na.action, offset, contrasts, ncs_scale |
See
|
... |
Further arguments to be passed to |
algorithm |
Changes from the default |
link, prior, prior_intercept, prior_aux, prior_covariance, prior_PD, adapt_delta, QR, sparse |
See
|
nauf_stan_lmer
, nauf_stan_glmer
, and nauf_stan_glmer.nb
are based on
the rstanarm
functions stan_lmer
, stan_glmer
,
and stan_glmer.nb
, respectively, but implement
nauf_contrasts
. The nauf
functions have all the same
arguments as the functions they are based on, but additionally
ncs_scale
, which is passed to nauf_model.frame
. Other
than ncs_scale
, the arguments have the same functions as they do in
the functions they are based on. The default values for na.action
and
contrasts
cannot be changed (see nauf_model.frame
).
The default priors for the nauf
Bayesian mixed effects regression
functions are the defaults from rstanarm
version 2.15.3; if you have
a later version of the rstanarm
package, then the default priors for
the nauf
regression fitting functions may be different from the
rstanarm
defaults.
A nauf.stanreg
object.
nauf_contrasts
for a description of the treatment of
NA
values, stan_glmer
for a description of
the priors, and the documentation for Stan
and the rstan
and
rstanarm
packages for algorithmic details.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
sobj <- standardize(vdur ~ place + stress + spont +
(1 + place + stress + spont | speaker) + (1 | item),
subset(plosives, dialect == "Cuzco" & voicing == "Voiceless"))
mod <- nauf_stan_lmer(sobj$formula, sobj$data,
prior = normal(0, 1, autoscale = FALSE),
prior_intercept = normal(0, 1, autoscale = FALSE),
prior_aux = normal(0, 1, autoscale = FALSE),
prior_covariance = decov(2, 1.5, 2, 0.25)
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.