ranef.tramME | R Documentation |
Extract the conditional modes and conditional variances of random effects in a formatted or unformatted way.
## S3 method for class 'tramME'
ranef(
object,
param = NULL,
newdata = NULL,
fix_smooth = !is.null(newdata),
condVar = FALSE,
raw = FALSE,
...
)
object |
A |
param |
An optional named list of parameter values (beta and theta). See details. Optionally, gamma elements can also be added, which leads to 'fixing' those random effects terms at the supplied values. |
newdata |
An optional |
fix_smooth |
Logical; it is set to |
condVar |
If |
raw |
Return the unformatted RE estimates as fitted by the model. |
... |
Optional arguments (for consistency with generic) |
raw = TRUE
returns the whole vector of random effects (i.e. with
parameters of smooth shift terms), while raw = FALSE
only returns
the formatted list of actual random effects (i.e. for grouped
observations) values. For the conceptual differences between the two types
of random effects, see Hodges (2014, Chapter 13).
The conditional variances of the fixed random effects are set to NA
.
Depending on the value of raw
, either a numeric vector or a
ranef.tramME
object which contains the conditional mode and variance
estimates by grouping factors.
The function has several optional arguments that allow great flexibilty beyond its most basic usage. The user should be careful with setting these, because some combinations might not return sensical results. Only limited sanity checks are performed.
Hodges, James S. (2014). Richly Parameterized Linear Models: Additive, Time Series, and Spatial Models Using Random Effects. Chapman & Hall/CRC Texts in Statistical Science Series.
data("sleepstudy", package = "lme4")
fit <- BoxCoxME(Reaction ~ Days + (Days | Subject), data = sleepstudy, order = 5)
ranef(fit, raw = TRUE)
ranef(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.