Point-wise and simultaneous confidence intervals for derivatives of smooths
Calculates point-wise confidence or simultaneous intervals for the first derivatives of smooth terms in a fitted GAM.
## S3 method for class 'fderiv' confint( object, parm, level = 0.95, type = c("confidence", "simultaneous"), nsim = 10000, ncores = 1L, ... )
object |
an object of class |
parm |
which parameters (smooth terms) are to be given intervals as a vector of terms. If missing, all parameters are considered. |
level |
numeric, |
type |
character; the type of interval to compute. One of |
nsim |
integer; the number of simulations used in computing the simultaneous intervals. |
ncores |
number of cores for generating random variables from a
multivariate normal distribution. Passed to |
... |
additional arguments for methods |
a data frame with components:
term
; factor indicating to which term each row relates,
lower
; lower limit of the confidence or simultaneous interval,
est
; estimated derivative
upper
; upper limit of the confidence or simultaneous interval.
Gavin L. Simpson
load_mgcv() dat <- gamSim(1, n = 1000, dist = "normal", scale = 2) mod <- gam(y ~ s(x0) + s(x1) + s(x2) + s(x3), data = dat, method = "REML") ## first derivatives of all smooths... fd <- fderiv(mod) ## point-wise interval ci <- confint(fd, type = "confidence") head(ci) ## simultaneous interval for smooth term of x1 x1.sint <- confint(fd, parm = "x1", type = "simultaneous", nsim = 2500) head(x1.sint)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.