Fluorite | Level 6

## How to calculate the standard error of β4+β5.

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Diamond | Level 26

## Re: How to calculate the standard error of β4+β5.

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
5 REPLIES 5
Diamond | Level 26

## Re: How to calculate the standard error of β4+β5.

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
Fluorite | Level 6

## Re: How to calculate the standard error of β4+β5.

Fluorite | Level 6

## Re: How to calculate the standard error of β4+β5.

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?

Diamond | Level 26

## Re: How to calculate the standard error of β4+β5.

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

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
Fluorite | Level 6