Tag Archives: 선형모델

11. Unusual and Influential Data – 11.1 Outlier, Leverage, and Influence

library(car) data(Davis) davis<-cbind(Davis,”sex_cd”=ifelse(davis$sex==’M’, 0,1)) head(davis) reg<-lm(repwt~weight*sex_cd, data=davis) summary(reg) > summary(reg) Call: lm(formula = repwt ~ weight * sex_cd, data = davis) Residuals: Min 1Q Median 3Q Max -29.2230 -2.3247 -0.1325 2.0741 15.5783 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.35864 3.27719 0.415 0.679 weight 0.98982 0.04260 23.236 <2e-16 *** sex_cd 39.96412 3.92932 10.171 <2e-16… Read More »