Marginal Effect Analysis of a Conditional Logit Regression
Dear Stata programmers,
I have firm-year data, and I need help with a conditional logit regression. I have pre-period (post_period variable=0) and post period (post period variable=1).
Here are the two equations I have:
dummy_1= a + b1* dummy_x + b2*dummy_y +e
dummy_2= a + b1* dummy_x + b2*dummy_y +e
The e_dummy is for both he pre and the post period while the a_dummy is for just the post period.
clogit dummy_1 dummy_x dummy_y if post ==0, group(id) vce(cluster id)
clogit dummy_1 dummy_x dummy_y if post ==1, group(id) vce(cluster id)
clogit dummy_2 dummy_x dummy_y if post ==1, group(id) vce(cluster id)
[CODE]
I would like to get the code for the predicted probability (iprob) when dummy_x =0 or dummy_x =1 while dummy_y is at its mean value. Iprob is estimated each year using the observations in all prior years separately for post=0 and post=1. I have the numbers for the full sample above and the sample below is only 200 observations. Still, I am interested in generating this code and I am not sure how to do it.
Dear Stata programmers,
I have firm-year data, and I need help with a conditional logit regression. I have pre-period (post_period variable=0) and post period (post period variable=1).
Here are the two equations I have:
dummy_1= a + b1* dummy_x + b2*dummy_y +e
dummy_2= a + b1* dummy_x + b2*dummy_y +e
The e_dummy is for both he pre and the post period while the a_dummy is for just the post period.
- The code I used to estimate the conditional logit regressions is below. Is this the correct code for a conditional logit
clogit dummy_1 dummy_x dummy_y if post ==0, group(id) vce(cluster id)
clogit dummy_1 dummy_x dummy_y if post ==1, group(id) vce(cluster id)
clogit dummy_2 dummy_x dummy_y if post ==1, group(id) vce(cluster id)
[CODE]
- I am looking for a marginal effects analysis:
Post=1 for dummy 1 | ||
dummy_x | dummy_y | |
Mean | -0.071 | 0.126 |
IPROB at 0 | 0.535 | 0.489 |
IPROB at 1 | 0.678 | 0.745 |
Change | 0.143 | 0.256 |
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long id int date float(dummy_1 dummy_2 dummy_x dummy_y post) 4864 18262 0 0 -1 0 1 30647 14975 0 0 0 0 0 11499 18747 0 0 0 0 1 4311 17531 0 0 0 0 1 15855 19083 0 1 0 0 1 10297 13695 0 0 0 1 0 25124 18627 1 0 0 0 1 10991 18992 0 0 0 0 1 30479 13634 0 0 0 0 0 62388 17166 1 1 1 0 1 31578 14609 1 0 1 0 0 31843 17897 1 0 0 0 1 12697 13514 1 0 -1 0 0 139665 16436 0 0 0 0 1 5496 16801 0 0 0 0 1 148950 17531 0 0 0 0 1 8542 17166 0 0 -1 0 1 19150 18262 0 1 0 1 1 1050 18627 0 0 0 0 1 66065 18992 0 0 0 0 1 30152 17531 1 0 1 0 1 65967 14244 0 0 0 0 0 184700 18992 0 0 0 0 1 2697 18992 0 0 -1 0 1 26021 17166 0 0 0 0 1 30008 16801 0 0 0 0 1 29339 14975 0 0 1 0 0 2295 16982 0 0 0 0 1 102045 16436 0 0 -1 0 1 12075 16617 0 0 0 0 1 116770 17439 0 0 0 0 1 62745 14244 0 0 0 0 0 10156 18627 0 0 0 0 1 65640 16556 0 0 0 0 1 11618 14244 0 0 -1 0 0 16775 14244 1 0 0 0 0 9069 14183 0 0 1 0 0 12212 16436 0 0 0 0 1 8293 16436 0 0 0 0 1 17239 17166 0 0 -1 0 1 134384 16436 0 0 0 0 1 166208 18627 0 0 0 0 1 106900 14975 0 0 0 0 0 1914 16436 0 0 0 0 1 14538 13514 0 0 0 0 0 14986 14244 1 0 1 0 0 8133 13514 0 0 0 0 0 6135 18627 0 0 0 0 1 4737 16436 0 0 0 0 1 6078 17897 0 0 0 0 1 14001 13514 0 0 0 0 0 30751 13604 0 0 0 0 0 8240 17166 1 0 0 1 1 140044 17166 1 0 0 0 1 3962 17897 0 0 -1 1 1 11910 17836 0 0 0 0 1 7228 16921 0 0 0 0 1 4839 17166 0 0 0 0 1 178706 17897 0 0 0 0 1 12458 16982 0 0 0 0 1 144809 17531 0 0 -1 0 1 118042 18627 0 0 0 0 1 1274 18262 0 1 0 1 1 65244 16617 0 0 0 0 1 21107 13879 0 0 0 0 0 60893 16436 0 0 0 0 1 14140 18627 0 0 0 0 1 14340 14609 1 0 1 1 0 1611 18627 0 0 0 1 1 6653 17987 0 1 0 0 1 6223 18992 0 1 0 0 1 2034 16436 0 0 0 0 1 16888 13879 0 0 0 1 0 24720 16801 0 0 0 0 1 4124 14425 1 0 0 0 0 11513 16436 0 0 0 0 1 29645 14975 0 0 0 0 0 27932 18262 0 0 0 0 1 224604 16436 0 0 0 0 1 10991 16436 0 0 0 0 1 125474 17166 1 0 1 0 1 13081 13665 0 0 -1 0 0 21519 16740 0 0 0 0 1 28485 13969 0 0 0 0 0 12635 16801 0 0 0 0 1 65886 18627 0 0 0 0 1 11904 13453 1 0 -1 0 0 12761 17531 0 1 0 0 1 1773 16436 0 1 0 0 1 24689 13514 0 0 0 1 0 27783 14975 0 0 0 1 0 15101 18992 0 0 0 0 1 15617 18992 0 1 0 1 1 166482 17439 0 0 0 0 1 63172 16679 0 0 0 0 1 163948 18627 0 0 0 0 1 138205 17531 0 0 -1 0 1 64166 16436 1 0 0 0 1 3607 14244 0 0 0 0 0 62197 14244 1 0 -1 0 0 end format %td date
Comment