# NOT RUN {
data(simdat)
# }
# NOT RUN {
m1 <- bam(Y ~ Group + te(Time, Trial, by=Group)
+ s(Time, Subject, bs='fs', m=1), data=simdat)
plot_parametric(m1, pred=list(Group=c('Adults', 'Children')))
# Note the summary that is printed.
# use rm.ranef to cancel random effects:
plot_parametric(m1, pred=list(Group=c('Adults', 'Children')),
rm.ranef = TRUE)
# It is possible to get estimates that do not make sense:
out <- plot_parametric(m1,
pred=list(Group=c('Adults', 'Children'), Subject=c('a01', 'a02', 'c01')))
print(out)
# }
# NOT RUN {
# see the vignette for examples:
vignette('overview', package='itsadug')
# }
Run the code above in your browser using DataLab