Hi Statalist,
I cannot figure out how to do this... the attached graph is exactly what we want, but not the linear fit line; we want the predicted probabilities instead of the lfit. Here is the syntax that I used to get the attached graph. The spline regression is what we want (before 2002 and after 2002), but not the linear fit line. Is there a way to make this graph BUT with the predicted probabilities line and splined?
(note: num_inadeq is a 0-6 count var and the IV of interest is ostomyyears (which is a surgery year) and that ranges from 1953 to 2017)
Syntax:
** Piecewise scatter plot with predicted probabilities
nbreg num_inadeq ostomyyears ib5.educ_revised white female AGE
predict inadeq
twoway (scatter inadeq OSTOMY_DATE_YR) (lfit inadeq OSTOMY_DATE_YR if ostomyyears <=2002) ///
(lfit inadeq OSTOMY_DATE_YR if ostomyyears >=2002)
Any suggestions?
Related Posts with Tried several variations...need help with graphing a predicted probabilities plot with twoway scatter plot and splined
about synth instruction questionhello great master I have a question My stata version is 14 when I perform the instruction, it alway…
how to estimate individual betas of coefficients in a province-sector-year panel data (with 2 sectional identifiers)Hello everyone: I'm trying to estimate production functions for a panel data of manufacturing with 2…
Timevar for survival analysisDear All, This might be a silly question, but it is driving me crazy. I am managing data which wer…
Discriminate analysis using stataHello everyone ; i need to apply 'Discriminate analysis' on stata , how can i apply it and get both …
Time varying covariate in Cox Regression modelHi all. After a thorough search online I can't seem to find a solution to my problem, which is why I…
Subscribe to:
Post Comments (Atom)
0 Response to Tried several variations...need help with graphing a predicted probabilities plot with twoway scatter plot and splined
Post a Comment