| get_coefs | R Documentation |
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.
get_coefs(model, se = TRUE)
model |
A gam object, produced by |
se |
Logical: whether or not to return the standard errors. |
The coefficients of the parametric terms.
Jacolien van Rij
Other Model predictions:
get_difference(),
get_fitted(),
get_modelterm(),
get_predictions(),
get_random()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.