Message/Author 

Amy Hartl posted on Saturday, September 22, 2012  3:22 pm



Greetings, I'm running a DTSA and would like to view the survival and hazard plots. I specify Plot2 in the output command, but it says the only plots available are: Histograms (sample values, estimated factor scores) Scatterplots (sample values, estimated factor scores) Item characteristic curves Information curves Are survival plots only available for continuous time SA? If not, how can I obtain these? I am following example 6.19 from the manual and am running version 6.11. Thank you! Amy 


You need to use the DSURVIVAL option of the VARIABLE command to specify which variables are the discretetime survival variables. Then you will get the plots. 

Amy Hartl posted on Sunday, September 23, 2012  9:13 am



Great, thank you! This yielded the estimated baseline survival curves. Is there a way I can get the estimated baseline hazard curves? It won't let me select it when I'm the plot menu. Below is the syntax in case that's useful. Thank you! TITLE: DTSA time and fship freq only DATA: FILE IS rec7to12.dat; VARIABLE: NAMES ARE dyadn f1 f2 freqF1 freqF2 u7 u8 u9 u10 u11 u12 ; USEVARIABLES= freqF1 freqF2 u812 ; CATEGORICAL = u8u12; dsurvival= u8u12; MISSING ARE ALL (9999.00); ANALYSIS: ESTIMATOR = MLR; MODEL: f BY u8u12@1; f ON freqF1 freqF2; f@0; OUTPUT: sampstat; stdyx; PLOT: TYPE IS Plot3; 


That plot is for continuoustime survival. 

Amy Hartl posted on Wednesday, September 26, 2012  9:09 am



I see. Okay, thank you! 

Amy Hartl posted on Wednesday, September 26, 2012  11:37 am



I see that loading all of the indicators @1 enforces the proportional odds assumption. How can I test the constant hazard rate assumption, i.e., how can I constrain the hazard rate to be equal across time? Can I do this without using type=mixture and a latent class design? Thank you for your help! 


You can run the model saying e.g. u1u5 on x; versus u1u5 on x (1); The latter approach is the same as saying f by u1u5@1; f on x; Twice the loglikelihood difference for the 2 models gives a chisquare test. 


Hi, I try see how the change of family cohesion during middle school influences high school substance use. The former was modeled as a growth curve and the later was a discrete survival. How can I combine the two in one model? I want to see if the family cohesion change will influence survival function. Is my syntax right? variable: names are age income sex sub4 sub5 sub6 w1f w2f w3f; usevariables are age income sex w1f w2f w3f sub4 sub5 sub6; categorical are sub4 sub5 sub6; missing is blank; classes=c(1); analysis: type=mixture; starts=100 10; ALGORITHM=INTEGRATION; model: %overall% if sfw1f@0 w2f@1 w3f@2; sd4sd6 on if sf(1); sd4sd6 on age sex income(2); Thank you. 


You say sd4sd6 on if sf(1); but those sd vbles are not in your usev list. They need to be scored as discretetime survival variables. And you may want to specify f by sd4sd6@1; f on age sex income; 

WenHsu Lin posted on Wednesday, May 20, 2015  7:25 pm



Thank you Dr./Prof. Muthen May I ask one follow up. The effect of all the covariates on the survival function is modeled on the on statement right? The explanation of such coefficient is similar to those we would get in the regular survival analysis right (i.e., the increase one unit in a covariate will increase the risk of experiencing the event)? Thank you. 


Drs. Muthen I am conducting a basic discretetime survival analysis. Here is my syntax: Variable: names are chatid eventBL event6MO event12MO event18MO AgeBL AdExp6MO AdExp12MO AdExp18MO female male LivComf MeetNeed JustMeet DontMeet HSEDHigh HSEDLess White Black Hispanic Other; usevariables are event6MO event12MO event18MO AgeBL female MeetNeed JustMeet DontMeet HSEDLess Black Hispanic Other AdExp6MO AdExp12MO AdExp18MO; categorical are event6MO event12MO event18MO; dsurvival event6MO event12MO event18MO; missing are all (99); Analysis: estimator=mlr; model: f by event6MOevent18MO@1; f on AgeBL female MeetNeed JustMeet DontMeet HSEDLess Black Hispanic Other; event6MO on AdExp6MO; event12MO on AdExp12MO; event18MO on AdExp18MO; f@0; Plot: type is plot2; When I select to view the discrete survival curves, I do not have the option to look at curves by covariates. Am I missing something in my syntax? Thank you, Lindsay 


Using type = plot3 it is the third plot option: Sample proportions.... and then you choose the 4th option: Plot estimated prob's, conditional on a set of covariates 

Jordan davis posted on Tuesday, December 13, 2016  11:47 am



Hello! I just finished running a survival mixture analysis. I wanted to get a sense of the output. NO COVARIATES: 1. I am assuming that the value under "means" for my survival variable are the log odds? so values below 1 (e.g., 0.414) represent a lower hazard of experiencing the event? 2. Is there a way to test differences between survival curves across classes? COVARIATE: 3. when I add a covariate predicting class as well as survival  what exactly is the interpretation of the regressions for T on X; C on X; and should I simply investigate the odds ratio's (under 'categorical latent variables') for C on X? 


1. Yes 2. Use the Model Constraint command to express the differences using parameter labels given in Model. 3. I don't know what T is. C on x is a regular multinomial logistic regression  see end of UG Chapter 14 for ways to describe this. 

Jordan davis posted on Thursday, December 15, 2016  8:08 am



Hi Dr. Muthen, Thanks for the quick response. T is my survival time variable. Example 8.17 2. do you mean simply calling the means of my survival time variable under each class and simply doing an equality check? %C1#1% [CL5#1@13.136]; [CL5#2@9.092]; [CL5#3@11.211]; [CL5#4@0.528]; [t] (p1); .... MODEL CONSTRAINT: p1 = p2; 3. When adding a co variate (x) predicting survival time (T) as well as class membership (C) I'm wondering how does T ON X influence my interpretation of survival probability (estimate of T) %OVERALL% T ON PTSD12; !PTSD predict survival C1 ON PTSD12; !PTSD predict classes 


Right  you can use Model Constraint that way, or New(diff); diff = p1p2; With a covariate x influencing T you can center x in which case [T] is the effect at the average x. 

Jordan davis posted on Wednesday, December 21, 2016  3:53 pm



Thanks Dr. Muthen, So, after reading the paper you and Dr. Maysn wrote on DTSA I've switched over. Instead of doing a GMMDTSA I'm just doing an LCADTSA (3class solution). my discrete survival time is by AGE (1425 years) so I have data set up in an accelerated longitudinal framework. USEVARIABLES = CL3 U14  U25; CATEGORICAL ARE U14  U25; DSURVIVAL = U14  U25; NOMINAL ARE CL3; CLASSES = C1(3); DATA SURVIVAL: NAMES = DEP4_14DEP4_25; CUTPOINT = 0; BINARY = U14  U25; MODEL: %OVERALL% F BY U14  U25@1; F@0; !F on PTSD12; !effect of PTSD on survival time %C1#1% [CL3#1@2.920]; [CL3#2@1.016]; ..... my questions are: 1) I'm using LOGRANK to test differences in survival curves  is this appropriate? 2) does Mplus provide median surivial time? by class? 3) if I add F on PTSD12 in the OVERALL statement is this a a hazard ratio? even though the effect is the same across classes? 4) When plotting if I choose to plot "esitmated survival curves" and choose PTSD at value 1 does this adjust my curves for the co variate? 


1) Yes 2) Yes, use "output:basehazard" and look at the 50% mark 3) You can estimate different effect across classes. For interpretation see 7.5.2 http://data.princeton.edu/wws509/notes/c7s6.html 4) Yes 

Jordan davis posted on Thursday, December 22, 2016  12:40 pm



Thank you for this info  very useful! I also found Dr. Muthen and Maysn's article on DTSA to help with the interpretation of a co variate on survival time. I suppose I could use exp(B) and get the hazard ratio as well? in regards to the basehazard output. my survival time is by "age" from 14  25 years old. the output gives me baseline survival rate. Is it ok to simply count from 14 at T1 and say, "at 18 years old, class 1 had a survival rate of XX%" Baseline Survival Rates for Class 1 are below: thus at 18 years old survival rate was 19%? TIME SURVIVAL RATE 0.000 1.000 1.000 1.000 1.000 0.758 2.000 0.758 2.000 0.506 3.000 0.506 3.000 0.354 4.000 0.354 4.000 0.247 5.000 0.247 5.000 0.191 ..... 


I would recommend you to read http://data.princeton.edu/wws509/notes/c7s6.html There are two extensions of the continuous PH model to discrete times 7.5.2 (logit what Mplus does) and 7.5.3 (complimentary loglog not available in Mplus), and hazard is defined differently than in the continuous case. It is the logit of the hazard that is proportional in 7.5.2. Depending on the point of view either of the two can be preferred to be the natural extension of Cox PH model. Your reading of the basehazrd output is correct. The median is age 17 (pass age 16 only 0.506 survived). Every number in the second column is doubled as to show the interval if you are to plot the KAPLAN  MEIER curve  it makes it a little hard to read. 

JH posted on Friday, November 01, 2019  9:19 am



I am interested in generating standard errors for the estimated survival probabilities in a DTSA with 8 time intervals (at select covariate values). I attempted to do so in Mplus (ex. 6.19) using MODEL CONSTRAINT. First, I generated the conditional hazard probabilities at select covariate values using the formula provided by Masyn (2014): 1 / (1 + exp((threshold for Dx + b1*x + b2*m + ...)), where Dx = the unique thresholds for the D1D8 survival variables. Second, I converted these into survival probabilities by multiplying the complements of the hazard probabilities for each time period. E.g., S3 = (1 – Ph1)*(1Ph2)*(1Ph3), where Ph = the conditional hazard probability for each interval. The issue is that the conditional hazard probabilities do not match those obtained using other methods (e.g., Singer & Willett, 2003). The hazards generated in Mplus appear to consistently be slightly too small. Is there an error in my formula for the hazards? The consistent underestimates of the hazards implies there may be an error with the threshold portion of my formula, but I am not sure. Any clarification you can provide would be much appreciated. Alternatively, if there is a better method to generate the standard errors of the predicted probabilities in Mplus, please let me know. 


I can't tell what would be going wrong. You might have to send your example to support@statmodel.com Here is how you can do this in User's Guide example 6.19, for X=1. The parameters k1k4 give you the estimated kaplanmeier curve. TITLE: this is an example of a discretetime survival analysis DATA: FILE IS ex6.19.dat; VARIABLE: NAMES ARE u1u4 x; CATEGORICAL = u1u4; MISSING = ALL (999); ANALYSIS: ESTIMATOR = MLR; MODEL: f BY u1u4@1; f ON x (b); f@0; [u1$1u4$1] (t1t4); output:tech10 residual; model constraint: new(p1p4); p1=Exp(t1b)/(1+Exp(t1b)); p2=Exp(t2b)/(1+Exp(t2b)); p3=Exp(t3b)/(1+Exp(t3b)); p4=Exp(t4b)/(1+Exp(t4b)); new(s1s5); s1=1p1; s2=p1*(1p2); s3=p1*p2*(1p3); s4=p1*p2*p3*(1p4); s5=p1*p2*p3*p4; new(k1k4); k1=p1; k2=p1*p2; k3=p1*p2*p3; k4=p1*p2*p3*p4; 

Back to top 