BookmarkSubscribeRSS Feed
SH1125
Calcite | Level 5

1) Did I write this coding correctly?  I'm running a CRD with subsamples.  Fixed variables: Treatment and Rows(Treatment). Random variables Phenology.

2) I collected subsamples over three years but the years should not be pooled.  How can I ask SAS to analyze only one year without altering my data set by hand?

3) How can I ask SAS to compare each row within each treatment and phenology but not between them?  For example, I would like to compare 'Phenology Lvl 1, Trt Lvl 1, Row Lvl 1' vs. 'Phenology 1, Trt 1, Row 2' but I do not want to view 'Phenology 1, Trt 1, Row 1' vs. 'Phenology 2, Trt 2, Row 1.'

PROC MIXED DATA = Abundance3Year METHOD = TYPE3;

CLASS TREATMENT RowOrder PhenologyRef;

MODEL PairsRecovdRate = RowOrder(Treatment);

RANDOM PhenologyRef PhenologyRef*Treatment;

LSMEANS RowOrder(Treatment) / PDIFF;

RUN; QUIT;

Thanks for your help.

.

1 REPLY 1
SteveDenham
Jade | Level 19

1.  Ought to work.  I'm more used to the usual notation of A*B, rather than A(B) for the model and lsmeans statements, but they should work.  I am curious why you would use type3 analysis rather than the default REML with this design, though.

2.  A BY statement would give separate analyses by year.  Be sure the data are sorted appropriately.

3.  But phenology is a random effect, so if you want to do this, you will have to construct ESTIMATE statements to compare the BLUPs at each phenology.  This could become tedious.

Steve Denham

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
  • 1 reply
  • 1231 views
  • 0 likes
  • 2 in conversation