e<-lm(Amount.Charged....~Household.Size+Income...1000s.,data = my2)
二元线性回归
第一次,正态性和线性假设通过,同方差性假设不通过,综合验证不通过
第二次,对因变量进行幂指数变换后:同方差性假设通过,正态性和线性假设通过,综合验证不通过
两次综合验证的结果相同,如下
> library(gvlma)
> gvmodel<-gvlma(c)
> summary(gvmodel)
Call:
lm(formula = Amount.Charged.... ~ Household.Size + Income...1000s.,
data = my2)
Residuals:
Min 1Q Median 3Q Max
-1180.62 -155.31 7.05 194.56 1309.66
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1304.905 197.655 6.602 3.29e-08 ***
Household.Size 356.296 33.201 10.732 3.12e-14 ***
Income...1000s. 33.133 3.968 8.350 7.68e-11 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 398.1 on 47 degrees of freedom
Multiple R-squared: 0.8256, Adjusted R-squared: 0.8181
F-statistic: 111.2 on 2 and 47 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 = c)
Value p-value Decision
Global Stat 31.4194 2.514e-06 Assumptions NOT satisfied!
Skewness 1.3841 2.394e-01 Assumptions acceptable.
Kurtosis 17.5261 2.834e-05 Assumptions NOT satisfied! # 峰度检验
Link Function 0.2835 5.944e-01 Assumptions acceptable.
Heteroscedasticity 12.2258 4.713e-04 Assumptions NOT satisfied! # 异方差性检验
对于上述峰度检验和异方差性检验不通过不理解啊?求指教
这是数据