gvlma {gvlma} | R Documentation |
Create a Gvlma Object
Description
Top-level function for Global Validation of Linear Models Assumptions.
Usage
gvlma(x, data, alphalevel = 0.05, timeseq, ...)
gvlma.form(formula, data, alphalevel = 0.05, timeseq = 1:nrow(data), ...)
gvlma.lm(lmobj, alphalevel = 0.05, timeseq)
Arguments
x |
Either a formula, in which case |
formula |
A linear models formula interpretable within the
dataframe |
lmobj |
An object resulting from a call to |
data |
Required if |
alphalevel |
Level of significance at which to perform the global and directional tests for linear models assumptions. |
timeseq |
A vector of length the number of observations in the linear model that gives a "time ordering" for the observations. This time sequence is used in the heteroscedasticity test statistic. Defaults to 1:n where n is the number of observations in the linear model. |
... |
Additional arguments such as |
Details
gvlma
is the top-level function to create a gvlma
object
for assessment of linear models assumptions.
Value
A gvlma
object is returned. This is a list of class
“gvlma” that contains all of the components returned by the call to
lm
for fitting the linear model, plus an additional component
entitled “GlobalTest.” This new GlobalTest
component is a list with
the following components:
LevelOfSignificance |
The level of significance at which the decisions reported for the global and directional tests were made. |
GlobalStat4 |
A list consisting of the components |
DirectionalStat1 |
A list consisting of the |
DirectionalStat2 |
A list consisting of the |
DirectionalStat3 |
A list consisting of the |
DirectionalStat4 |
A list consisting of the |
timeseq |
The ordering of the observations used when computing the heteroscedasticity directional statistic. |
call |
The call used to invoke |
Author(s)
Slate, EH slate@stat.fsu.edu and Pena, EA pena@stat.sc.edu.
References
Pena, EA and Slate, EH (2006). “Global validation of linear model assumptions,” J.\ Amer.\ Statist.\ Assoc., 101(473):341-354.
See Also
plot.gvlma
, deletion.gvlma
,
update.gvlma
,
lm
Examples
data(CarMileageData)
CarModelAssess <- gvlma(NumGallons ~ MilesLastFill + NumDaysBetw,
data = CarMileageData)
CarModelAssess
summary(CarModelAssess)
CarModel2 <- gvlma(lm(NumGallons ~ MilesLastFill + NumDaysBetw,
data = CarMileageData))
CarModel2
summary(CarModel2)
plot(CarModel2)