So I need to calculate the partial effect at the average and the average partial effect of a probit model.
More specifically:
  1. Calculate the partial effect at the average of election day violence from the probit model (that is, calculate effect on the probability that fraud = 1 for a marginal increase in election viol for the “average” observation, by plugging in the mean of the X variables).
  2. As well as calculate the average partial effect of election day violence from the probit model (that is, calculate the partial effect on the probability that fraud = 1 for a marginal increase in election viol for each observation and take the mean).
I have been using the code
margins, dydx(fraud fraud_probit) atmeans

but I keep getting:
invalid dydx() option;
fraud not found in list of covariates

r(322);

I have included my do file and the .csv
Thanks for your help.