Dear statalist
I have a problem using margins on stata command.
I'm doing some research related to the effect of election on corporate investment.
I generate control variables called victory (which is defined as the numbers of vote that the winner got from the election) and difofvote (vote difference between the winner and the running-up).
My problem is that I want to create another dummy variable called "Close" that sets to one if the vote difference(difofvote) between the winner and the running-up is below the 25th percentile of the (victory) margin distribution. I'm new to use margins, so I'm not sure.
Here are my codes:
reg difofvote victory, allbaselevels
margins, dydx(victory) at((p25) victory)
Can anyone here help me please.
Thank you!
Related Posts with Problem with using margins
Incorrect margins/pred. probabilities after ivprobit - instrument should be ignored?Hello, I am using the ivprobit command and want to calculate predicted probabilities with the margi…
Tempfile and error due to "spaces" at the end of a do-file lineHello to everyone. I really hope someone can help me with this. I have a dataset in which I am runni…
In need of help with Survey data analysis, survey settings/svysetHello there I am trying to perform a multinominal logistic regression using survey data and having t…
Fixed effects and instrumental variablesHello all, I have 3 years of cross sectional data of which 2 years have information on my independe…
Edit graph with codeI've got 20 .gph files and I need to change the titles on all of them. Can I do that with Stata comm…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with using margins
Post a Comment