Description Usage Arguments Details Value Author(s) References See Also Examples
Top-level function for Global Validation of Linear Models Assumptions.
1 2 3 |
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 |
gvlma
is the top-level function to create a gvlma
object
for assessment of linear models assumptions.
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 |
Slate, EH slate@stat.fsu.edu and Pena, EA pena@stat.sc.edu.
Pena, EA and Slate, EH (2006). “Global validation of linear model assumptions,” J.\ Amer.\ Statist.\ Assoc., 101(473):341-354.
plot.gvlma
, deletion.gvlma
,
update.gvlma
,
lm
1 2 3 4 5 6 7 8 9 10 | 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)
|
Call:
lm(formula = NumGallons ~ MilesLastFill + NumDaysBetw, data = CarMileageData)
Coefficients:
(Intercept) MilesLastFill NumDaysBetw
5.48051 0.01867 0.08220
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = NumGallons ~ MilesLastFill + NumDaysBetw, data = CarMileageData)
Value p-value Decision
Global Stat 24.25918 7.087e-05 Assumptions NOT satisfied!
Skewness 0.03298 8.559e-01 Assumptions acceptable.
Kurtosis 17.24229 3.290e-05 Assumptions NOT satisfied!
Link Function 6.90499 8.596e-03 Assumptions NOT satisfied!
Heteroscedasticity 0.07892 7.788e-01 Assumptions acceptable.
Call:
lm(formula = NumGallons ~ MilesLastFill + NumDaysBetw, data = CarMileageData)
Residuals:
Min 1Q Median 3Q Max
-1.82036 -0.30011 0.02332 0.34082 2.32954
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.480512 0.525739 10.424 < 2e-16 ***
MilesLastFill 0.018666 0.001324 14.095 < 2e-16 ***
NumDaysBetw 0.082196 0.015536 5.291 3.16e-07 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.5553 on 202 degrees of freedom
Multiple R-squared: 0.4959, Adjusted R-squared: 0.4909
F-statistic: 99.34 on 2 and 202 DF, p-value: < 2.2e-16
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = NumGallons ~ MilesLastFill + NumDaysBetw, data = CarMileageData)
Value p-value Decision
Global Stat 24.25918 7.087e-05 Assumptions NOT satisfied!
Skewness 0.03298 8.559e-01 Assumptions acceptable.
Kurtosis 17.24229 3.290e-05 Assumptions NOT satisfied!
Link Function 6.90499 8.596e-03 Assumptions NOT satisfied!
Heteroscedasticity 0.07892 7.788e-01 Assumptions acceptable.
Call:
lm(formula = NumGallons ~ MilesLastFill + NumDaysBetw, data = CarMileageData)
Coefficients:
(Intercept) MilesLastFill NumDaysBetw
5.48051 0.01867 0.08220
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(NumGallons ~ MilesLastFill + NumDaysBetw, data = CarMileageData))
Value p-value Decision
Global Stat 24.25918 7.087e-05 Assumptions NOT satisfied!
Skewness 0.03298 8.559e-01 Assumptions acceptable.
Kurtosis 17.24229 3.290e-05 Assumptions NOT satisfied!
Link Function 6.90499 8.596e-03 Assumptions NOT satisfied!
Heteroscedasticity 0.07892 7.788e-01 Assumptions acceptable.
Call:
lm(formula = NumGallons ~ MilesLastFill + NumDaysBetw, data = CarMileageData)
Residuals:
Min 1Q Median 3Q Max
-1.82036 -0.30011 0.02332 0.34082 2.32954
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.480512 0.525739 10.424 < 2e-16 ***
MilesLastFill 0.018666 0.001324 14.095 < 2e-16 ***
NumDaysBetw 0.082196 0.015536 5.291 3.16e-07 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.5553 on 202 degrees of freedom
Multiple R-squared: 0.4959, Adjusted R-squared: 0.4909
F-statistic: 99.34 on 2 and 202 DF, p-value: < 2.2e-16
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma(x = lm(NumGallons ~ MilesLastFill + NumDaysBetw, data = CarMileageData))
Value p-value Decision
Global Stat 24.25918 7.087e-05 Assumptions NOT satisfied!
Skewness 0.03298 8.559e-01 Assumptions acceptable.
Kurtosis 17.24229 3.290e-05 Assumptions NOT satisfied!
Link Function 6.90499 8.596e-03 Assumptions NOT satisfied!
Heteroscedasticity 0.07892 7.788e-01 Assumptions acceptable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.