getF {amer} | R Documentation |
get the estimated function values from an amer-Fit
getF(object, which, n=100, newdata, interval=c("NONE", "MCMC", "RW"), addConst=TRUE, varying=1, level=0.9, sims=1000)
object |
a fitted additive (mixed) model of class amer-class |
which |
(optional) an integer vector or a character vector of names giving the smooths for which fitted values are desired. Defaults to all. |
n |
if no newdata is given, fitted values for a regular grid with n values in the range of the respective covariates are returned |
newdata |
An optional data frame in which to look for variables with which to predict |
interval |
what mehod should be used to compute pointwise confidence/HPD intervals: RW= bias-adjusted empirical bayes, MCMC uses mcmcsamp |
addConst |
boolean should the global intercept and intercepts for the levels of the by-variable be included in the fitted values (and their CIs) can also be a vector of the same length as which |
varying |
value of thevarying -covariate (see tp ) to be used if no newdata is supplied.
Defaults to 1. |
level |
level for the confidence/HPD intervals |
sims |
how many iterates should be generated for the MCMC-based HPD-intervals |
a list with one data.frame
for each function, giving newdata
or the values of the generated grid plus the fitted values (and confidence/HPD intervals)
if MCMC-intervals were rquested, the listhas an attribute "mcmc" containing the result of the call to mcmcsamp
, a merMCMC-class
object.
The formula used for the pointwise bias-adjusted CIs is taken from Ruppert and Wand's 'Semiparametric Regression' (2003), p. 140.
These leave out the uncertainty associated with the variance component estimates.
MCMC-intervals based on results from mcmcsamp
don't seem to be very reliable yet and should be used with caution, especially for more complex models.
Fabian Scheipl
plotF
, tests/optionsTests.r
and the vignette for examples