MEPS Tutorial 8: Estimating slopes from a regression model using R

In a previous tutorial, I reviewed how we can perform trend analysis using R on survey-weighted estimates. However, I neglected to discuss how to estimate the average slope across time. Rather, I focused on estimate the predicted values at each year.

In this tutorial, I show how you can use the margins command in R to estimate the survey-weighted average total healthcare expenditures across years for males and females. You can read the tutorial on my RPubs page (link).