multinomial logistic regression. read the data use clear describe the data codebook summarize...

of 38/38
Multinomial Logistic Regression

Post on 20-Dec-2015

215 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Slide 1
  • Multinomial Logistic Regression
  • Slide 2
  • Read the data use http://www.ats.ucla.edu/stat/stata/dae/mlogit, clear Describe the data Codebook Summarize Tabulate Make graphs
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • The outcome variable is brand. The variable female is coded as 0 for male and 1 for female. Let's start with some descriptive statistics of the variables of our interest.
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Using the Multinomial Logit Model Now we have warmed up to building our model. Our goal is to associate the brand choices with age and gender. We will assume a linear relationship between the transformed outcome variable and our predictor variables female and age. Since there are multiple categories, we will choose a base category as the comparison group. Here our choice is the first brand (brand=1).
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • The output above has two parts, labeled with the categories of the outcome variable brand. log(P(brand=2)/P(brand=1)) = b_10 + b_11*female + b_12*age log(P(brand=3)/P(brand=1)) = b_20 + b_21*female + b_22*age, with b's being the raw regression coefficients from the output.
  • Slide 17
  • For example, we can say that for one unit change in the variable age, the log of the ratio of the two probabilities, P(brand=2)/P(brand=1), will be increased by 0.368, and the log of the ratio of the two probabilities P(brand=3)/P(brand=1) will be increased by 0.686. Therefore, we can say that, in general, the older a person is, the more he/she will prefer brand 2 or 3.
  • Slide 18
  • The ratio of the probability of choosing one outcome category over the probability of choosing the reference category is often referred as relative risk (and it is also sometimes referred as odds). We can use the rrr option for mlogit command to display the regression results in the language of risk.
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • We can also present the regression result graphically. For example, we can create three variables p1, p2 and p3 for the predicted probabilities and plot them against a predictor variable. In the example below, we plot p1 against age separated by the variable female.
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38