Cox regression plots for interaction ... PreviousNext
Mplus Discussion > Growth Modeling of Longitudinal Data >
Message/Author
 lamjas posted on Tuesday, July 30, 2019 - 8:57 am
Hi,

I am new to cox regression. Is it possible to plot the survival curves for a significant interaction in Mplus, using model constraint and loop function? If so, could you please show me the formula I should put in? I appreciate your help.

Variable:
Days tc x1 x2;

Survival = Days;
Timecensored = tc (0 = RIGHT 1 = NOT);

Usevariables are
Days tc x1 x2 INT;

DEFINE:
INT = x1 * x2;

Model:
Days on x1 (p1)
x2 (p2)
INT (p1xp2);
 lamjas posted on Wednesday, July 31, 2019 - 8:31 am
It is a follow-up of my post.

If I can use model constraint and loop function to plot survival curve, is the following code correct?

!say x1 is sex, 0=male, 1=female
!say x2 is age

Model constraint:
Plot (ML MH FL FH);
Loop (Time,0,50,1);

ML = Time x EXP(p1*0 + p2*20 + p1xp2*0*20);

MH = Time x EXP(p1*0 + p2*40 + p1xp2*0*40);

FL = Time x EXP(p1*1 + p2*20 + p1xp2*1*20);

MH = Time x EXP(p1*1 + p2*40 + p1xp2*1*40);
 Tihomir Asparouhov posted on Wednesday, July 31, 2019 - 12:33 pm
I don't see how loop can help. Instead follow these directions.
1. Add plot:type=plot3; to your input file
2. Click the "view plots" button.
3. Click "Curves for specific covariate values / estimated survival curve"
4. click Next
5. Enter ML in the "name a set of values"
6. Click X1 and in "specify a value for variable" enter 0
7. Click X2 and in "specify a value for variable" enter 20
8. Click INT and in "specify a value for variable" enter 0
9. Enter MH in the "name a set of values"
10. Click X1 and in "specify a value for variable" enter 0
11. Click X2 and in "specify a value for variable" enter 40
12. Click INT and in "specify a value for variable" enter 0
13. Repeat those 4 steps for FL and MH changing the values accordingly
14. Click Finish and you should get the 4 survival curves you need.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: