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
Running a function for a subset of observationsHello colleagues, I have a long shaped dataset of 200 countries. I would like to run functions, for…
Escape character in shell commandI have a long command in a shell escape that includes semicolons. If use -#delimit ;- to allow for a…
range of the estimate of the first differenced independent variable of dependent variable in dynamic panelhi, I am estimating dynamic panel model(n=50, t=15). My question is about the range of the estimate …
Difference-in-difference regression interpretationGood afternoon, I know there have been previous posts regarding this topic, however I first wanted …
How to include conditions in program (.ado file)Hi, I am very new to writing programs in Stata. My current project is to write an ado-file to get t…
Subscribe to:
Post Comments (Atom)
0 Response to Help with interrupted time series margins plot
Post a Comment