View source: R/methods_interop.R
| fixef | R Documentation |
The fixed-effect point estimates, equivalent to coef() on a tulpa_fit.
Provided under the fixef name for code written against the lme4 / nlme
interface: lme4::fixef(fit) and nlme::fixef(fit) dispatch here too when
either package is installed, so a tulpa_fit can be dropped into an
lme4-shaped workflow.
fixef(object, ...)
## S3 method for class 'tulpa_fit'
fixef(object, ...)
object |
A |
... |
Ignored. |
Note the deliberate difference from lme4::coef.merMod, which returns
per-group sums of the fixed and random effects. On a tulpa_fit, coef()
returns the fixed effects alone and fixef() is its synonym; the random
effects are ranef().
Named numeric vector of fixed-effect estimates.
coef.tulpa_fit(), ranef()
set.seed(1)
df <- data.frame(x = rnorm(80))
df$y <- rpois(80, exp(0.5 + 0.3 * df$x))
fit <- tulpa(y ~ x, data = df, family = "poisson")
fixef(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.