Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | David Torres <writeon4truth2@msn.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | st: Graphing regression models |
Date | Wed, 20 Nov 2013 13:02:58 -0500 |
Hello, I have some two-level model output that I would like to graph, but am not familiar with the process of going about doing this. HLM7 makes it look easy, but Stata is a bit more complicated. About my models: 1. I don't know if it matters, but one of the predictors is instrumented, so I'm using the -xtivreg- command to run the models. 2. At level 1 I have my intercept, the linear and quadratic functional forms for age, and three other time-varying coefficients. 3. At level 2 I have a number of demographic variables, among them race, gender, poverty status. What I would like to graph: I would like to graph the curves for race (i.e., cross-level interactions with the intercept and the linear and quadratic age variables). (See model 1 below, specifically the variables black, hispan, othrace, y2, y3, y4, yy2, yy3, yy4.) And I would like to graph the curves for race when I add an additional cross-level interaction (besides those in the preceding line) with a third time-varying variable. (See the additional race dummy interactions with the third time-varying variable diffsch in model 2; they are d2, d3, and d4.) CAN SOMEONE PLEASE ASSIST ME? (1) (2) smsc smsc diffsch 12.44 24.49** (7.747) (7.825) outzone -0.705 -0.992 (1.570) (1.781) female 5.297*** 5.181** (1.104) (1.989) black -23.22*** -18.59*** (2.719) (3.267) hispan -25.64*** -17.40*** (2.650) (3.078) othrace 4.346 12.99* (3.115) (5.325) c_medrent 0.873 1.716** (0.700) (0.543) c_medvehic 0.880 0.807* (0.496) (0.390) c_medhhinc 4.659*** 5.663*** (1.017) (0.776) c_medage 1.116* 1.372*** (0.460) (0.397) c_pctminor 1.659** 0.620 (0.567) (0.434) civic -0.923* -1.687*** (0.448) (0.371) relig 0.0983 -0.0950 (0.201) (0.163) socadv 1.102 2.286*** (0.773) (0.646) year 54.37*** 54.24*** (1.331) (2.049) y0 0.156 1.399 (1.269) (1.882) y1 -3.039*** -2.563* (0.841) (1.293) y2 -4.026** -4.412* (1.436) (2.209) y3 2.483 2.211 (1.408) (2.166) y4 13.07*** 12.76*** (2.274) (3.507) yearsq -2.650*** -2.497*** (0.328) (0.502) yy0 0.219 -0.0960 (0.314) (0.467) yy1 0.921*** 0.703* (0.207) (0.317) yy2 -0.249 -0.117 (0.354) (0.542) yy3 -0.695* -0.575 (0.347) (0.531) yy4 -2.597*** -2.666** (0.560) (0.859) d1 -0.596 (10.243) d2 13.15 (11.362) d3 -20.70* (9.736) d4 -22.60 (17.622) _cons 499.9*** 494.1*** (3.228) (2.778) N 28021 28021 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/