ancovaReg | R Documentation |
Computes diagnostic statistics for an analysis of covariance (ANCOVA) with a single factor variable.
ancovaReg(object, find.best = TRUE, trace = FALSE)
object |
the linear regression model object. |
find.best |
select the "best" subset of terms in the model? |
trace |
print the results of the selection process if |
The input model object (object
) can be the complete ancova model
including all interaction terms or it can be any form of an ANCOVA model.
Most often, if it is not the complete ancova model, then find.best
should be FALSE
.
The find.best
option uses the step
function to select the "best" subset of terms in the model. In general, this
can be used to retain or drop significant interaction terms. It will not
look at individual factor levels in the model.
A list of class "ancovaReg" containing these components:
aovtab |
the analysis of variance table from the original model |
parmests |
a summary of the final |
vif |
a named vector of variance inflation factors. |
diagstats |
a data.frame containing the observed values, predicted values, residuals, standardized residuals, studentized residuals, leverage, Cook's D, and dfits for each observation. |
crit.val |
a named vector of the critical values for leverage, Cook's D, and dfits. |
flagobs |
a logical vector indicating which observations exceeded at least one of the critical values. |
object |
the |
x |
the model matrix of explanatory variables. |
factor.var |
the name of the factor variable |
x.fr |
the model frame of explanatory variables. |
If no factor variable
is found in the final model, either because one was not specified or it was
dropped from the model, then an object of class "multReg" is returned
instead. See multReg
for details.
Objects of class "ancovaReg" have print
and plot
methods.
Draper, N.R. and Smith, H., 1998, Applied Regression Analysis, (3rd ed.): New York, Wiley, 724 p.
lm
, plot.ancovaReg
,
multReg
,
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.