Use car package for advanced residual analysis (Assumption check) layout(1) # Studentized residuals for first 10 observations DFFITS: Change in the fitted value when the observation is deleted (standardized by the standard error).DFBETAS: Changes in coefficients when the observations is deleted.Cook's distance': Detects observations that have a disproportionate impact on the determination of the model parameters (large change in parameters if deleted).Jackknife residuals (studentized residual):.Leverages: Capacity of an observation to be influential due to having extreme predictor values (unusual combination of predictor values).Heteroscedasticity 16.126 0.0000593 Assumptions NOT satisfied! Link Function 0.397 0.5285123 Assumptions acceptable. Kurtosis 0.376 0.5395040 Assumptions acceptable. Skewness 1.316 0.2512972 Assumptions acceptable. Global Stat 18.216 0.0011197 Assumptions NOT satisfied! USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM: (Intercept) age lwt smoke ht ui ftv.catNoneĢ947.32 -2.91 4.22 -307.34 -568.63 -494.11 -56.50įtv.catMany race.catBlack race.catOther preterm>=1ĪSSESSMENT OF THE LINEAR MODEL ASSUMPTIONS Lm(formula = bwt ~ age + lwt + smoke + ht + ui + ftv.cat + race.cat + Gvlma package for global test of linear model assumptions library(gvlma) # Residual analysis for assumptions (independence, linearity, normality, and homoscedasticity) Homoscedasticity: See the Residual vs Fitted plot for horizontal fan-like shape.Linearity: See the Residual vs Fitted plot for a systematic depature from the horizontal line.Normality: See the Normal Q-Q plot for departure from a straight line.Independence: Not interpretable from graphs.Multiple R-squared: 0.255, Adjusted R-squared: 0.213į-statistic: 6.08 on 10 and 178 DF, p-value: 0.0000000609Ĭreate residual plots using default plot for assumption check and outlier check Residual standard error: 647 on 178 degrees of freedom Performed to check for validity of assumptions and presence of outliers. Applied Regression Analysis and Other Multivariable Methods. Opts_chunk$set(comment = "", warning = FALSE, message = FALSE, tidy = FALSE,Įcho = TRUE, fig.width = 7, fig.height = 7) Residual analysis in linear regression (work in progress) Residual analysis in linear regression (work in progress) # Settings for RMarkdown
0 Comments
Leave a Reply. |