BookmarkSubscribeRSS Feed
TomHsiung
Pyrite | Level 9

Hello, everyone

 

Today I read this research paper "Plozasiran (ARO-APOC3) for Severe Hypertriglyceridemia
The SHASTA-2 Randomized Clinical Trial" (doi:10.1001/jamacardio.2024.0959).

 

I am very interested in the line of Figure 2. According to my understanding, the model used in this research probably is a linear mixed model, and follow-up time is an independent factor. What I am not sure is how the author estimated the confidence interval of the outcomes in Figure 2? Using the linear mixed model? Or other methods?

 

Please let me know your ideas. Thank you.

 

Figure 2

Figure 2Figure 2

19 REPLIES 19
Ksharp
Super User

Check @Rick_SAS blogs:

https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html

 

data have;
call streaminit(123);
do subject=1 to 100;
 do time=1 to 10;
   sex=ifc(rand('bern',0.4),'F','M');
   weight=rand('normal',4,100);
   height=rand('normal',0,2);
   output;
 end;
end;
run;

proc mixed data=have;
class  subject sex time;
model weight=height sex time/s;
random int/subject=subject;
repeated time/subject=subject ;
store out=mixedmodel;
run;
proc plm source=mixedmodel;
   effectplot INTERACTION(x=time  sliceby=sex /*plotby=CigsPerDay*/ )/limits connect;
run;

Ksharp_0-1720928968274.png

 

TomHsiung
Pyrite | Level 9

@Ksharp Hello, Ksharp. Thank you for your answer. Would you mind if you tell me whether it is appropriate to use only one of the random and repeated statements?

 

I think either the random or repeated statement can adjust the intra-individual relationship.

 

Tom

Ksharp
Super User
Yes. You can. But you have to have TIME variable in MODEL to plot the interaction graph.
TomHsiung
Pyrite | Level 9

One more thing, I am thinking of what the codes should be if the response variable is not continuous (e.g., weight) but binary (e.g., event present). In this case, individuals are repeatedly measured to collect their status of the binary response variable and we would like to have a similar series graph. The x-axis remains the sequence of the repeated measurement, but the y-axis represent the risk (i.e., proportion) for the event to occur, along with its confidence interval.

 

Many thanks.

 

Tom

Ksharp
Super User

If your Y variable is a binary variable,you could use PROC GLIMMIX instead of PROC MIXED.

data have;
call streaminit(123);
do subject=1 to 10;
 do time=1 to 5;
   y=rand('bern',0.8);
   sex=ifc(rand('bern',0.4),'F','M');
   weight=rand('normal',4,100);
   height=rand('normal',0,2);
   output;
 end;
end;
run;

/*Take TIME as R side random effect */
proc glimmix data=have;
class  subject sex time;
model y=height sex time/solution dist=binary ;
random int/subject=subject;
random time/subject=subject residual;
store out=mixedmodel;
run;
proc plm source=mixedmodel;
   effectplot INTERACTION(x=time  sliceby=sex /*plotby=CigsPerDay*/ )/limits connect;
run;

Ksharp_0-1724119270755.png

 



/*Take TIME as G side random effect */
proc glimmix data=have;
class  subject sex ;
model y=height sex time/solution dist=binary ;
random int time/subject=subject;
store out=mixedmodel;
run;
proc plm source=mixedmodel;
   effectplot slicefit(x=time  sliceby=sex /*plotby=CigsPerDay*/ )/limits ;
run;

Ksharp_1-1724119398058.png

 

TomHsiung
Pyrite | Level 9
Thank you for your information.

What will happen if we treat the variable of time as a category variable in the class statement? Here, the time we use is not a continuous variable. Instead, it's a proxy of the number of a series of repeated measurements. For example, we monitor the individuals and we test their blood several times during the following period. Thx.
Ksharp
Super User
Check my code
/*Take TIME as R side random effect */
..........
TomHsiung
Pyrite | Level 9

NOTE: An R-side variance component is confounded with the profiled variance.
NOTE: The GLIMMIX procedure is modeling the probability that inr_attain='1'.
NOTE: Did not converge.
NOTE: The GLIMMIX procedure deleted the model item store WORK.MIXEDMODEL because of incomplete information for a subsequent
analysis.

Problem with the raw data?

 

Ksharp
Super User
Yes.
NOTE: Did not converge.
it stands for your model is not right or trust .
Change your model syntax or Check the data.
TomHsiung
Pyrite | Level 9
proc glimmix data = highlow_1;
class  Patient_ID Gender;
model inr_attain(event = '1') = measure Gender / dist = binary solution;
random intercept / subject = Patient_ID;
*random measure / subject = Patient_ID residual;
store out = mixedmodel;
run;

proc plm source = mixedmodel;
effectplot slicefit(x = measure sliceby = Gender) / limits;
run;

This is the measure as G side random effect and it produces the graph.

Unknown.png

TomHsiung
Pyrite | Level 9

But we would like to treat the variable of measure as a class variable.

 

proc glimmix data = highlow_1;
class  Patient_ID Gender measure;
model inr_attain(event = '1') = measure Gender / dist = binary solution;
random intercept / subject = Patient_ID;
random measure / subject = Patient_ID residual;
store out = mixedmodel;
run;

proc plm source = mixedmodel;
effectplot interaction(x = measure sliceby = Gender) / limits connect;
run;

And this produced the "Did not converge." outcome.

TomHsiung
Pyrite | Level 9

The fix should be this,

proc glimmix data = highlow_1;
class  Patient_ID Gender measure;
model inr_attain(event = '1') = measure Gender / dist = binary solution;
*random intercept / subject = Patient_ID;
random measure / subject = Patient_ID residual;
store out = mixedmodel;
run;

proc plm source = mixedmodel;
effectplot interaction(x = measure sliceby = Gender) / limits connect;
run;

The graph

Unknown-2.png

Ksharp
Super User
Yes.
That what my code wrote for R side random effect (take variable of measure as a class variable.).
TomHsiung
Pyrite | Level 9

Thanks for the update and I have additional questions.

 

What is the function of this line?

 

*random intercept / subject = Patient_ID;

With this line un-asterisked, I had the error:

 

NOTE: An R-side variance component is confounded with the profiled variance.
NOTE: The GLIMMIX procedure is modeling the probability that inr_attain='1'.
NOTE: Did not converge.
NOTE: The GLIMMIX procedure deleted the model item store WORK.MIXEDMODEL because of incomplete information for a subsequent
analysis.

In addition, in proc mixed, the random and repeated statements are used to represent between- and within-individual differences. What about the proc glimmix?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 19 replies
  • 2418 views
  • 5 likes
  • 3 in conversation