210 likes | 363 Views
AMMBR II. Gerrit Rooks. Checking assumptions in logistic regression. Hosmer & Lemeshow Residuals Multi-collinearity Cooks distance. Hosmer & Lemeshow. Test divides sample in subgroups, checks whether difference between observed and predicted is about equal in these groups.
E N D
AMMBR II Gerrit Rooks
Checking assumptions in logistic regression • Hosmer & Lemeshow • Residuals • Multi-collinearity • Cooks distance
Hosmer & Lemeshow Test divides sample in subgroups, checks whether difference between observed and predicted is about equal in these groups Test should not be significant (indicating no difference)
Hosmer & Lemeshow Average Probability In j th group
Residuals • Residual = observed value – predicted value / square root of variation
Cooks distance (< 1) Prediction for j from all observations Prediction for j for observations excluding observation i Number of parameter Means square error
To Stata • Use apilog.dta • Awards = dependent variable • For Awards inspect frequency counts • Recode Awards into binary variable • Estimate a LR model using yr_rnd meals enroll as predictors
To Stata • Inspect classification table • Perform Hosmer & Lemeshow test • Inspect standardized residuals • Inspect cooks distance • See if interaction effects improve fit
Is the Wald test an accurate test to the significance of coefficients in Logisticregressionanalysis? • Yes, justlikeregressionanalysis. • Yes, it is accurate, although a Likelihood ratio test is more efficient • No, unlikeregressionanalysis, the Wald test is biased, especiallyforrelativelysmallcoefficients . • No, unlikeregressionanalysis, the Wald test is biased, especiallyforrelativelylargecoefficients .
Use LRtest to check the significance effect of the variable yr_rnd • Use auto.dta (if not on your pc then) • use http://www.stata-press.com/data/r11/auto • Predict which car will be foreign, using weigth and mpg as predictors
Is the interaction between weigth and mpg significant? • Tip: always center variable before making interactionvariable.
use http://www.stata-press.com/data/r11/choice • Does income, gender or type of car (European, Japanese or American) predict whether a car will be bought (choice)?