get_fitted | R Documentation |
Get model all fitted values.
get_fitted( model, se = 1.96, rm.ranef = NULL, as.data.frame = FALSE, print.summary = getOption("itsadug_print") )
model |
A gam object, produced by |
se |
A number to scale the standard error. Defaults to 1.96, resulting in 95% confidence intervals. For 99% confidence intervals use a value of 2.58. |
rm.ranef |
Logical: whether or not to remove random effects. Default is FALSE. Alternatively a string (or vector of strings) with the name of the random effect(s) to remove. |
as.data.frame |
Logical: return values as data frame or as vector. Default is FALSE (as vector). |
print.summary |
Logical: whether or not to print a summary of the
values selected for each predictor.
Default set to the print info messages option
(see |
A data frame with estimates and optionally errors.
Jacolien van Rij
Other Model predictions:
get_coefs()
,
get_difference()
,
get_modelterm()
,
get_predictions()
,
get_random()
data(simdat) ## Not run: m1 <- bam(Y ~ Group + s(Time, by=Group)+ s(Subject, bs='re'), data=simdat) # as.data.frame FALSE and rm.ranef=NULL results in fitted(): all( get_fitted(m1) == fitted(m1) ) # now fitted values without random effects: all( get_fitted(m1, rm.ranef=TRUE) == fitted(m1) ) head(get_fitted(m1, rm.ranef=TRUE)) # without summary: infoMessages('off') head(get_fitted(m1, rm.ranef=TRUE)) infoMessages('on') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.