Hello all,
I am working on graphing yhat of death by month to illustrate the impact of a health care intervention (implemented in month 10), but I am having trouble putting together the appropriate code.
1. The model is a mixed effects logistic regression model [using meglm] and the design is interrupted time series
2. The below code is essentially what I want because it shows the predicted values of the outcome of interest before and after the intervention (intervention at month 10) for each month
twoway(scatter yhat month) (line yhat month if month < 10, sort) (line yhat month if month >= 10, sort), xline(10)
3. However, I'm trying to make it work for my purposes and I would love help!!
- I need to store yhats for each month for each meglm model (reason: takes days for each meglm model to run!)
- I want to adapt the above code so I am showing yhats for each month using stored estimates while hiding the scatter plot, it is looking too messy
- I need to find a way of storing the graphs and then editing them once they are stored (way of storing graphs as is and then editing them?)
Thanks for any advice!
Amy
Related Posts with Help with interrupted time series margins plot
Differences in margins postestimation command for tpoisson relative to poissonI'm currently using a truncated poisson model with command tpoisson and ll(0) and ul(6) for a depend…
Help with understanding country-specific time trendsHi all, I am running a regression using data on individuals from different countries. All variables…
3200 conformability errorDear statalist, I am estimating spatial durbin model with two spatial weights using spm package foll…
synthetic control errorHello, I am new at the synth command. I am using Stata 15. I want to estimate a treatment effect us…
Manipulating panel data based on previous time valuesHi, I am working with a district-year panel data set in which there are 10 years. I am interested i…
Subscribe to:
Post Comments (Atom)
0 Response to Help with interrupted time series margins plot
Post a Comment