I have a regression model with a bunch of indicator variables interacting with regressors. In this case P-values may work well for model selection. I know Stata has a command called margins
, and it really helps in this case. Example:
margins, dydx(*)
From the relevant Stata manual
Description
Margins are statistics calculated from predictions of a previously fit model at fixed values of some covariates and averaging or otherwise integrating over the remaining covariates. The
margins
command estimates margins of responses for specified values of covariates and presents the results as a table. Capabilities include estimated marginal means, least-squares means, average and conditional marginal and partial effects (which may be reported as derivatives or as elasticities), average and conditional adjusted predictions, and predictive margins.
Is there any similar function in R?