My questions concerns how precisely standard errors for average marginal effects are computed by the stata margins command using the delta method. I have searched the documentation for specifics to no avail so I am turning to the list.

My data-analytic problem involves a logistic regression analysis (analyzed by the logit command) with two predictors: group (dichotomous factor variable) and covar (continuous covariate). My goal is to estimate the average marginal effects (AMEs) for each group (i.e., the average of the probabilities for the individual S's in each group) using the margins command. I am familiar with the delta method and have no trouble understanding or reproducing the estimates and standard errors in the stata output when attempting to estimate marginal effects for each group at the mean of the covariate (i.e. MEMs). One just uses the standard multivariate delta formula (transpose gradient times VC matrix times gradient) plugging in the mean for covar in the gradient component. However, I don't understand how the delta method standard error is generated when computing the average marginal effect across subjects. The computation of the AME estimate itself is not an issue -- it's the standard error computation that confuses me. My understanding is that the delta method would normally require entry of a specific value for covariate but I can't figure out what precisely that value would be when computing an AME (as opposed to a MEM). One might suspect that it's again the mean of covar and that results would not be identical to the MEM computation because of differing predicted probabilities in the MEM and AME cases. However, I've tried this and can't reproduce the standard error estimate for the AME. I've tried various approaches here to reproduce the stata output (e.g., computing the variances and standard errors for specific cases and averaging) but have not succeeded. Thanks for any help you might offer.

Andy Tomarken

My data-analytic problem involves a logistic regression analysis (analyzed by the logit command) with two predictors: group (dichotomous factor variable) and covar (continuous covariate). My goal is to estimate the average marginal effects (AMEs) for each group (i.e., the average of the probabilities for the individual S's in each group) using the margins command. I am familiar with the delta method and have no trouble understanding or reproducing the estimates and standard errors in the stata output when attempting to estimate marginal effects for each group at the mean of the covariate (i.e. MEMs). One just uses the standard multivariate delta formula (transpose gradient times VC matrix times gradient) plugging in the mean for covar in the gradient component. However, I don't understand how the delta method standard error is generated when computing the average marginal effect across subjects. The computation of the AME estimate itself is not an issue -- it's the standard error computation that confuses me. My understanding is that the delta method would normally require entry of a specific value for covariate but I can't figure out what precisely that value would be when computing an AME (as opposed to a MEM). One might suspect that it's again the mean of covar and that results would not be identical to the MEM computation because of differing predicted probabilities in the MEM and AME cases. However, I've tried this and can't reproduce the standard error estimate for the AME. I've tried various approaches here to reproduce the stata output (e.g., computing the variances and standard errors for specific cases and averaging) but have not succeeded. Thanks for any help you might offer.

Andy Tomarken

## Comment