crTest: Test of linearity for Component + Residual Plots
Description
This function estimates a linear model and a loess model on the component-plus-residual plot (i.e., a partial residual plot) for each quantitative variable in the model. The residual sums of squares for each are used to calculate an F-test for each quantitative variable.
Usage
crTest(model, adjust.method="none", ...)
Arguments
model
A model object of class lm
adjust.method
Adjustment method for multiple-testing procedure, using p.adjust from stats.
...
Other arguments to be passed down to the call to loess.
Value
A matrix with the following columns for each variable:
RSSpResidual sum-of-squares for the parametric (linear) model.
RSSnpResidual sum-of-squares for the non-parametric (loess) model.
DFnumNumerator degrees of freedom for the F-test: tr(S)-(k+1).
DFdenomDenominator degrees of freedom for the F-test: n-tr(S)
FF-statistic
pp-value, potentially adjusted for multiple comparisons.