Calculate Kullback-Leibler projection of smoothing spline ANOVA fits for model diagnostics.
project(object, ...)
# S3 method for ssanova
project(object, include, ...)
# S3 method for ssanova9
project(object, include, ...)
# S3 method for gssanova
project(object, include, ...)
# S3 method for ssden
project(object, include, mesh=FALSE, ...)
# S3 method for ssden1
project(object, include, drop1=FALSE, ...)
# S3 method for sscden
project(object, include, ...)
# S3 method for sscden1
project(object, include, ...)
# S3 method for sshzd
project(object, include, mesh=FALSE, ...)
# S3 method for sscox
project(object, include, ...)
# S3 method for sshzd1
project(object, include, ...)
# S3 method for ssllrm
project(object, include, ...)
The functions return a list consisting of the following elements.
KL(fit0,fit1)/KL(fit0,null); the smaller the value, the more feasible the reduced model is.
KL(fit0,fit1).
For regression fits, the list also contains the following element.
KL(fit0,fit1)/KL(fit0,null)+KL(fit1,null)/KL(fit0,null); a value closer to 1 is preferred.
For density and hazard fits, the list may contain the following optional element.
The evaluations of the projection.
Object of class "ssanova"
, "gssanova"
,
"ssden"
, "ssden1"
, "sscden"
,
"sscden1"
, "sshzd"
, "sshzd1"
, or
"ssllrm"
.
Additional arguments. Ignored in project.x
.
List of model terms to be included in the reduced
model space. The partial
and offset
terms, if
present, are to be specified by "partial"
and
"offset"
, respectively.
Flag indicating whether to return evaluations of the projection.
If TRUE, calculate p<-length(include)
projections
with include[-i]
, i=1,...,p
.
The entropy KL(fit0,null) can be decomposed as the sum of KL(fit0,fit1) and KL(fit1,null), where fit0 is the fit to be projected, fit1 is the projection in the reduced model space, and null is the constant fit. The ratio KL(fit0,fit1)/KL(fit0,null) serves as a diagnostic of the feasibility of the reduced model.
For regression fits, smoothness safe-guard is used to prevent interpolation, and KL(fit0,fit1)+KL(fit1,null) may not match KL(fit0,null) perfectly.
For mixed-effect models from ssanova
and gssanova
,
the estimated random effects are treated as offset.
Gu, C. (2004), Model diagnostics for smoothing spline ANOVA models. The Canadian Journal of Statistics, 32, 347--358.
Fitting functions ssanova
, gssanova
,
ssden
, sshzd
, and sshzd1
.