Outline: - Probit model / logit model - Basic estimation, ordered version - Postestimation diagnostics Microeconometrics dr Katarzyna Kopczewska Class 05 This datset is for 2002 for Poland from Polish General Social Survey (PGSS) boss hours job_success job_satisfaction income age sex_male home_population are You a boss? how many hours You work in a week is it important to be successful in a job Are You satisfied with Your job what is Your income how old are You are You male? how many members of family live with You 1 YES, 0 NO … 1 YES, 0 NO 1 - definitely yes, 2 - rather yes, 3 - rather not, 4 - definitely not … … 1 YES, 0 NO … Logit (so called logistic regression) 1. To estimate the model use . logit y x1 x2, or or . logistic y x1 x2 command. 2. Interpretation in terms of odds ratio (logistic) (exp(b)) – a one unit change in Xi leads to exp(b) change in odds ratio. Odds ratio is chance of success / chance of failure. In terms of coefficients (b) - a one unit change in Xi leads to ln(b) change in odds ratio Assume: coefficient(x1) = 0.69, intercept=-6.15, x1=10 predicted log(y) is calculated as: . display 0.69*10-6.15 # result is 0.75 . display exp(0.75) # result is 2.117 this is odds ratio for x1=10 . display 2.117/(1+2.117) # probability = odds / (1 + odds), result is 0.6971 . display exp( _b[x1] ) # conversion from b to exp(b) 3. Prediction – one can predict odds ratio or probability for given levels of explanatory variables. Use then: . adjust, by(x1) pr # for probabilities . adjust, by(inc) exp # for odds ratio Change in odds ratio when x increases by 1 should be the same as odds ratio coefficient. Prediction can be made also for given level of x1, ex. . adjust, x1=5 x2=17, by(x3) xb se ci 4. To assess the quality of forecast one can use . lstat (of . estat clas) command, which summarizes correctly classified forecast observations. One can also use . lroc command, which compares sensitivity and specificity. We are interested in field under the curve which is as big as possible. To check the cut-off point graphically use . lsens. 5. As always one can test for equal coefficients using after . logit…, or command: . test x1 x2 6. To check if “bigger” model is better than “smaller” one use . lrtest model1 model2. Using . est store name save restricted (smaller) and unrestriccted (bigger) models. H0 is that there is no significant difference between restricted and unrestricted model H1 is that bigger model performs better. 7*. One can install . fitstat command to get more meaures of goodness of fit Probit 1. To estimate the model use . probit y x1 x2 command. 2. Interpretation in terms of coefficients (. probit y x1 x2) – a one unit change in Xi leads to change In z-score of Y. One can also think in terms of marginal effects (. dprobit y x1 x2) - probability of success p following probit (in given point). Automatically mean values are assumed. To be more flexible use: . mfx compute, at(x1=0, x2=1, x3=0); Multinominal logit* 0. mlogit……. - in terms of coefficients (b) 1. mlogit, rrr - in terms of relative-risk-ratio (exp(b)) Ordered probit / logit* 2. oprobit or ologit - estimation 3. lincom _b[/cut2] - _b[/cut1] – testing for equality of cut-off points Postestimation* 4. estat sum – summary of variables 5. estat ic – AIC + BIC Tasks: 1. Calculate logit model. Check few sets of explanstory variables – what is the best structure of the model. What about accuracy of prediction – are You satisfied? What is the interpretation of Your results?