BookmarkSubscribeRSS Feed
buhl2752
Fluorite | Level 6

Hello,

 

I am trying to code a model that is a little different than others I have done and am not sure I have the code right.  My design consists of several sites with each of these sites measured 2 years.  Each year, the sites were measured several dates.  At each survey what was recorded was the date, the presence/absence of factor a, and the response variable.  The presence/absence of factor a can vary with date for each site and year.  Dates also vary with site and year.  So I have 2 repeated measures: year and date - year would be categorical but would like date to be continuous.  I then I have a categorical (or binary) factor measured each date (this is the part I am not sure how to code).  The model I am running is given below but I am not sure this is correct.  I am using compound symmetry while trying to get the rest of the code correct, but can change that later.  So ignoring that part, do I have the model correct or am I missing some other covariance terms.


PROC MIXED;
CLASS YEAR SITE FACTORA;
MODEL S=YEAR|FACTORA|DATE;
RANDOM SITE;
REPEATED / SUBJECT=SITE*YEAR TYPE=CS;

 

Also, would it be valid to treat year as a random factor and if yes, how would I code that model?

 

Thank you for your time and any help you can give me.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 0 replies
  • 326 views
  • 0 likes
  • 1 in conversation