BookmarkSubscribeRSS Feed
jcl1
Calcite | Level 5

I conducted a study for two years with two locations (fields) in the first year and two different locations (fields) in the second year for a total of 4 site-year combinations. At each location I have 4 blocks. Within each block is the whole plot of cover crop (3 factors) and a sublplot factor of N rate (3 factors). We took soil samples in each plot three times during the year.

My objective is to determine how different cover crop and N rate treatments affect various soil measurements and if that varies by sample timing and/or the site and year combinations. Below is the code I have so far. I am not sure if it is correct or not.

 

proc mixed data = CCSHCorn1   covtest plots = studentpanel ; 
              class block siteyear sampletiming covercrop nratecat ;
              model activeC =siteyear|covercrop|nratecat|sampletiming /ddfm=kr2;
              random   block block(siteyear) covercrop*block(siteyear) ;
			  repeated sampletiming/subject=block(covercrop*nratecat)type=un;
              lsmeans siteyear*covercrop*nratecat*sampletiming /diff adjust = Tukey;
              ods output tests3=tests3 
                        CovParms = RandomVar ;
			ods exclude lsmeans;
			ods exclude diffs;
            ods output diffs=ppp lsmeans=mmm;
              run; 

 

1 REPLY 1
tanakma5
Calcite | Level 5

The three groups are split by a specific trait, and all receive the same intervention. So yes, it is similar to three different classrooms of students that each receive the same teaching intervention.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 236 views
  • 0 likes
  • 2 in conversation