# NOT RUN {
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')
# }
Run the code above in your browser using DataLab