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
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 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
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
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;
/*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;
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?
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.
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.
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
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 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.