Hello,
I am trying to run covariate-adjusted discrete-time survival analysis, specifically using the Cox model. I've been referring to the survival package guidebook, but am struggling to understand how to properly execute what I hope to achieve.
For some background, I have a person-period dataset, where I have the following variables: studentID, schoolID, districtID, math_disability, lowincome, timepoint, and group. Within a 9-year time period, each studentID can have timepoints that range from 3 to 9. Basically, there are a certain number of timepoints nested in each student ID, studentIDs nested in schoolIDs, and schoolIDs nested in districtIDs. This is a typical educational dataset structure, as you can see. Outcome of interest is math_disability (0/1) and student-level covariate is lowincome (0/1). Each student ID has a group identifier, which includes 9 possible values (A, B, C, D, E, F, G, H, I).
I want to generate a survival probability plot that presents 9 different lines (1 for each "group") for the probability of receiving math_disability (=1) across the 9 timepoints (0-8). I've tried using the stset to set my person-period dataset and use stcox to generate survival probabilities, but I can't generate by-timepoint survival probabilities by "group" while also controlling for the student-level covariate, "lowincome".
I'd very much appreciate any guidance on this. I'm happy to clarify, of course!
Related Posts with Need guidance with covariate-adjusted discrete-time survival analysis (Cox model)
calculating r square for a model estimated with multiply imputed data (mi estimate)Dear all, I would very much appreciate your help with calculating r-squared for models estimated wi…
oaxaca: reference categoryDear Statalisters, I am using the Blinder-Oaxaca decomposition with the following code: Code: oa…
Interpreting pvarsoc command (optimal lag)I want to use a dynamic panel data model and I am trying to figure out what will be the optimal lag …
Code on Idiosyncratic SkewnessDear STATA Fraternity I am not good in writing codes. Somehow i tried to write a code for calculati…
Test the effect that the combined level of education in couples has on financesHi Statalist. I would like to test the effect of the combined level of education of each partner in…
Subscribe to:
Post Comments (Atom)
0 Response to Need guidance with covariate-adjusted discrete-time survival analysis (Cox model)
Post a Comment