Dear Statalist users,
Is it possible to save the margins that are calculated for each observation as an additional variable when using the margins command?
Here is an example of what I'm looking for. Let's say we have estimated the following probit model
webuse margex, clear
probit outcome age distance
If we use the command
margins, eyex(age)
calculations are made at the observational level and are then averaged.
The number that is reported (4.325736) is the resulting average from the calculations done for each observation.
Is it possible to access the result of the calculations done for each observation and save those as another variable?
Thanks.
Is it possible to save the margins that are calculated for each observation as an additional variable when using the margins command?
Here is an example of what I'm looking for. Let's say we have estimated the following probit model
webuse margex, clear
probit outcome age distance
If we use the command
margins, eyex(age)
calculations are made at the observational level and are then averaged.
The number that is reported (4.325736) is the resulting average from the calculations done for each observation.
Is it possible to access the result of the calculations done for each observation and save those as another variable?
Thanks.
Comment