BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ykoba
Fluorite | Level 6

I want to let the computer to calculate the estimate and standard error of β45.
I think I should use estimate statement but I could not understand by myself.

 

My current code is as follows,

 

proc mixed method=reml noclprint=10 covtest; 
class id;
model logcd4 = week week_16 trt*week trt*week_16 / s chisq;
random intercept week week_16 / subject=id type=un g gcorr; 
run;

 

"week" and "week_16" are continuous variables.

I don't include the effect of the "trt" at baseline because this study is supposed to be RCT.
Also, I assume a different trend before and after week 16, so I include the effect of week_16. What I want to do here is to assess the effect of "trt" is different between "trt=0" and "trt=1".

 

In my thought, The actual model statement is as follows,

 

logCD4=β12week+β3week_16+β4trt*week+β5trt*week_16

 

I have attached xlsx file.

I appreciate any kinds of help.
Thank you in advance for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

The variance of the sum of two random variables is:

 

Variance (X+Y) = Var(X) + Var(Y) +2cov(X,Y)

 

So from PROC MIXED, you want the COVB option in the MODEL statement. This will give you the variances and covariance needed to find the variance of β4+β5

--
Paige Miller

View solution in original post

5 REPLIES 5
PaigeMiller
Diamond | Level 26

The variance of the sum of two random variables is:

 

Variance (X+Y) = Var(X) + Var(Y) +2cov(X,Y)

 

So from PROC MIXED, you want the COVB option in the MODEL statement. This will give you the variances and covariance needed to find the variance of β4+β5

--
Paige Miller
ykoba
Fluorite | Level 6

I really appreciate your help!!

ykoba
Fluorite | Level 6

Please teach me how to calculate the standard error of β4+β5, not standard deviation. 

In this case, the standard error and the standard deviation is the same? 

PaigeMiller
Diamond | Level 26

I believe the words standard error and standard deviation in this case mean the same thing. (Not true in other cases)

 

From the documentation at https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_reg_syntax08.htm&docsetVersion=14...

 

2018-11-27 07_49_52-Start.png

So, you can take the results of the COVB statement, specifically the variances of beta4 and beta5 and the covariance of (beta4,beta5) and use the formula given above to get the (standard error)-squared, then take the square root.

--
Paige Miller
ykoba
Fluorite | Level 6

I would like to thank you for your advice.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1637 views
  • 4 likes
  • 2 in conversation