BookmarkSubscribeRSS Feed
Melk
Lapis Lazuli | Level 10

I have the below SAS code for a data with 2 groups (tx and control), time (continuous - including baseline at 0), and 2 covariates (cov1 is dichotomous and cov2 is continuous).

 

proc mixed data=dat;
    class id tx (ref='0') cov1 (ref='0');
    model y=time|tx cov1 cov2/s cl noint;
    random intercept time/type=un sub=id;
        estimate 'Control rate' time 1 time*tx 0 1/cl;
        estimate 'Tx rate' time 1 time*tx 1 0/cl;
        lsmeans tx /at time=0 cl;
run;

 

When I look at the lsmeans output, I see that it is forcing time to be 0 and cov2 to be some value that is the same for both tx levels, cov1 is not in the output. What is the value that lsmeans is setting cov2 to and why is cov1 omitted? How can I interpret this? My intention is to get the mean estimates of y at each tx at baseline (time=0) while adjusting for differences in cov1 and cov2.

 

 

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Show us the ouptut

--
Paige Miller
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

Unless you specify otherwise, the continuous covariate is set to its mean value. The lsmean is a marginal mean over a balanced population and roughly speaking averages over the levels of a categorical factor that is not specified in the LSMEANS statement.

 

See the LSMEANS documentation for more details. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 3 replies
  • 1811 views
  • 1 like
  • 3 in conversation