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
Regression logistic (fixit)Hello I am doing a logistic regression model but I have this error message and I do not understand i…
Missing valuesDear all, I want to supplement the current missing values using the values around it . Below is my …
Census DDF filesThe help file for the -ddf2dct- (https://fmwww.bc.edu/repec/bocode/d/ddf2dct.html) program suggests …
append fails to workHi, I am new to Stata. Suppose I would like to append dataset2 to dataset 1 dataset 1 reads: Name…
YYYYMMDD date variableHello I have a date variable in% tc format. How can I create a new numeric variable of type (not for…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with using margins
Post a Comment