BookmarkSubscribeRSS Feed
JOEY21
Calcite | Level 5

Hi all,

 

I'm trying to analyze if there are differences in Cover Averages of native plants between 4 different treatments over time. My data is organized as follows:

 

MONTHBLOCK/TREATMENTTREATMENTCOVER AVERAGE
11/110.234
21/110.2105
31/110.1675
41/110.0775
51/110
61/110.0255
71/110.1505
81/110.141
91/110.141
12/110.053
22/110.0325
32/110.015
42/110
52/110
62/110.001
72/110.0075
82/110.015
92/110.0155
 
My code is here:
 
 
PROC GENMOD DATA=WORK.IMPORT DESCENDING;
CLASS BLOCK_TREATMENT TREATMENT COVER_AVERAGE MONTH;
MODEL COVER_AVERAGE = BLOCK_TREATMENT TREATMENT MONTH;
REPEATED SUBJECT = BLOCK_TREATMENT / type=IND;
RUN;
 
 
Right now my output doesn't make much sense and every online article is over my head. I'm stuck with what I'm doing wrong.
4 REPLIES 4
PaigeMiller
Diamond | Level 26

Show us the output. Explain what parts don't make sense.

--
Paige Miller
JOEY21
Calcite | Level 5

My apologies, the output is attached.

PaigeMiller
Diamond | Level 26

I asked you to provide two pieces of information. You only provided one piece of information... I need the other piece of information.

--
Paige Miller
SteveDenham
Jade | Level 19

First off, the response values should not be modeled with a multinomial distribution.  That implies levels, and nothing will ever converge with only one observation per level.  So, remove cover_average from the CLASS statement.  Then you may want to consider what distribution to use to model this variable.  I would suggest a beta distribution, but it only has support on the open interval (0, 1), and I see you have some zeroes in your responses.  Consider adding a very small bit to the zeroes (say 1e-6) and try fitting this code:

 

PROC GENMOD DATA=WORK.IMPORTMODIFIED ;
CLASS BLOCK_TREATMENT TREATMENT COVER_AVERAGE MONTH;
MODEL COVER_AVERAGE = BLOCK_TREATMENT TREATMENT MONTH/ dist=beta;
REPEATED SUBJECT = BLOCK_TREATMENT / type=IND;
RUN;

Perhaps a better approach would be to use PROC GLIMMIX, so that a covariance structure could be applied to the repeated measure MONTH.  

 

PROC glimmix DATA=WORK.IMPORTMODIFIED ;
CLASS BLOCK_TREATMENT TREATMENT COVER_AVERAGE MONTH;
MODEL COVER_AVERAGE = BLOCK_TREATMENT TREATMENT MONTH treatment*month/ dist=beta;
random block_treatment;
 random month/ SUBJECT = BLOCK_TREATMENT type=AR(1);
RUN;

My changes are all in lower case.

 

SteveDenham

 

 

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