BookmarkSubscribeRSS Feed
tbanh
Fluorite | Level 6

Hi all,

 

I have a dataset below and I wanted to fit a mixed model using PROC MIXED. I have a BY variable named Size, which indicates the sample size. I was wondering if there was any way I could limit the analyses to just Size = 5. So something like:

 

PROC MIXED data = SimulatedData;
by Size = 5;
model...;
random...;
repeated...;
run;

but the BY statement will not allow me to specify a certain condition for the variable. Does anybody have any ideas?

 

Screen Shot 2016-03-04 at 3.23.57 PM.png

 

4 REPLIES 4
ballardw
Super User

Try

WHERE size=5;

tbanh
Fluorite | Level 6
In the BY statement?

##- Please type your reply above this line. Simple formatting, no
attachments. -##
Reeza
Super User

If you only have one size the BY doesn't matter - you only have one set of results. 

The WHERE is its own statement. 

 

You our can leave the BY in, if your using it to generate titles. 

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

To be clear, use:

proc mixed data=simulateddata(where=(size=5));

...

 

 

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
  • 4 replies
  • 1479 views
  • 0 likes
  • 4 in conversation