

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Sociology 362 Data Exercise 5 Logistic Regression 1
The purpose of this problem set is to help you gain a feel for modelling a binary dependent variable and for moving between the different scales (log-odds, odds, and probability).
The form of the data below is “grouped” because we do not have observations on individuals, but rather on sets of individuals who have been grouped by their age. For each group, we know how many individuals are in it, and how many had y = 1 (and, by subtraction, how many had y = 0). In fact, the data have the same form as the data for the handout entitled real simple logit analysis, except instead of 2 categories of the independent variable “sex,” we have here 8 categories of the independent variable “age.”
age nj rj 20 704 21 25 628 32 30 775 70 35 338 43 40 784 46 45 789 89 50 1016 169 55 434 98
where nj is the number of people in the sample from the jth age category and rj is the number who have consumed psychotropic drugs in the last week. These data will have to be entered into Stata e.g., input age n r, which you will use to do the following problems.
a) Interpret the coefficient of age in terms of the effect of age on 1) the ln(odds); 2) the plain odds of being on drugs; and 3) the probability πj of being on drugs.
b)Find the fitted odds that someone age 35 is on drugs and compare it to the fitted odds that someone
who is 34 is on drugs. Does the ratio of the first to the second fitted odds equal e βˆ^?
c) What is the expected difference in π for people who are 20 compared to 30 years old? What is the expected difference in π for people who are 35 compared to 40 years old? Are these two differences the same? Why or why not?
d) Compute the rest of the fitted probabilities ˆπj by hand (that is how you will need to do it on a test) and compare them to the observed proportions. (As a check on your computations, after the blogit command issue the command predict prob,p, where prob is the name you made up for the fitted probabilities.) Are the model probabilities a perfect fit to the observed proportions as they were on the handout real simple logit analysis? Why or why not?