Hello, I have some questions about using `margins` command after estimate logit reg
Given the example code as follows:
Then if I run:
Q01:
→ This will simply use the mean value of gre and gpa then replaced into logit regression → Is this correct?
Q02:
→ This will replace GRE=500 while keeping GPA at mean value → Is this correct?
Q03:
Then what if I run with dummy variables:
→ which value of the rank dummy is used here?
→ If Stata use the average value of rank (2.485) then which coefficient (out of the 4 coefficient for rank) does it use?
Here is the result:
Q04: I want to calculate the economic effect for each variables in the logit equation. This is done by allowing the selected variable to vary by one standard deviation (mean +/- std) while keeping the rest variables at mean value. The difference between the two probability is the economic effect
Is it possible to do this using margin command? I get stuck at:
Given the example code as follows:
Code:
use https://stats.idre.ucla.edu/stat/stata/dae/binary.dta, clear logit admit gre gpa
Q01:
Code:
margins, atmeans
Q02:
Code:
margins, at(gre=(500))
Q03:
Then what if I run with dummy variables:
Code:
logit admit gre gpa i.rank
Code:
margins, atmeans
→ If Stata use the average value of rank (2.485) then which coefficient (out of the 4 coefficient for rank) does it use?
Here is the result:
Code:
Adjusted predictions Number of obs = 400 Model VCE: OIM Expression: Pr(admit), predict() At: gre = 587.7 (mean) gpa = 3.3899 (mean) 1.rank = .1525 (mean) 2.rank = .3775 (mean) 3.rank = .3025 (mean) 4.rank = .1675 (mean) ------------------------------------------------------------------------------ | Delta-method | Margin std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- _cons | .2986299 .0244784 12.20 0.000 .2506532 .3466066 ------------------------------------------------------------------------------
Q04: I want to calculate the economic effect for each variables in the logit equation. This is done by allowing the selected variable to vary by one standard deviation (mean +/- std) while keeping the rest variables at mean value. The difference between the two probability is the economic effect
Is it possible to do this using margin command? I get stuck at:
Code:
margins, at(...)
Comment