get_coefs {itsadug} | R Documentation |
Get coefficients for the parametric terms (intercepts and random slopes).
Description
Wrapper around the function coef
,
and loosely based on summary.gam
. This function
provides a much faster alternative for summary(model)$p.table
.
The function summary.gam
) may take considerably
more time for large models, because it additionally needs to calculate
estimates for the smooth term table.
Usage
get_coefs(model, se = TRUE)
Arguments
model |
|
se |
Logical: whether or not to return the standard errors. |
Value
The coefficients of the parametric terms.
Author(s)
Jacolien van Rij
See Also
Other Model predictions:
get_difference()
,
get_fitted()
,
get_modelterm()
,
get_predictions()
,
get_random()
Examples
data(simdat)
# Condition as factor, to have a random intercept
# for illustration purposes:
simdat$Condition <- as.factor(simdat$Condition)
# Model with random effect and interactions:
m1 <- bam(Y ~ Group * Condition + s(Time),
data=simdat)
# extract all parametric coefficients:
get_coefs(m1)
# calculate t-values:
test <- get_coefs(m1)
test <- cbind(test, test[,1] / test[,2] )
colnames(test)[3] <- 't-value'
test
# get_coefs returns the same numbers as shown in the parametric summary:
summary(m1)
# get_coefs is based on the function coef. This function returns
# values of all coefficients, and does not provide SE:
coef(m1)
[Package itsadug version 2.4.1 Index]