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
Reshape wide with no time/order variableHello. I am working with a dataset that has multiple observations for most of the identifiers labele…
covariates and distal outcomes in a latent class modelHi Statalist Is there a way to implement the 3-step Latent Class Analysis (to include the covariates…
optimization with STATAI am unfamiliar with STATA programming, and I am trying to program some very rudimentary optimizatio…
ivreg2 - despite using partial option I get full rank errorIn a multiple instrument regression using ivreg2 with gmm2s option I'm using partial. Despite using …
Coefplot - multiple models with different dependent variablesAll, I am running multiple regressions with the same independent variable and 29 different dependent…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with using margins
Post a Comment