Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Test for SigDiff by Date in Proc MIXED repeated me...

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-18-2017 04:58 PM

I have a code written for a split-plot analysis with repeated measures written with Proc MIXED. However, I have not been able to write a code that will deliver results for whether dates are significantly different from each other. LS Means commands do this quite nicely, but i haven't been able to write an LS Means code that produces an output. 4 plots in 4 Blocks (N=4), and the plot is what the repeated measures are performed on (n=16). PlotID was written to give each plot a unique ID. Compound Symmetry was determined to be the best covariance structure for the data. How do i write code to test if the mean logN2O values differ by Date?

Code:

ODS graphics on ;

proc mixed data=AllEvents covtest;

Class Block Fert Nfix Date PlotID;

Model logN2O= Fert Nfix Fert*Nfix / s;

Random Block Block*Fert;

Repeated / Type=CS subject=plotID r;

run;

Accepted Solutions

Solution

07-19-2017
06:03 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to AaronJ

07-19-2017 04:54 PM

The design structure of your study is not totally clear to me. If levels of *both* FERT and NFIX are assigned randomly to plots within blocks, then something like this might be appropriate:

```
proc mixed data=AllEvents covtest;
class block fert nfix date plotid;
model logN2O= fert|nfix|date / s;
random block;
```

*random block*fert*nfix; /* deliberately omitted for type=cs */
repeated date / subject=block*fert*nfix type=cs;
run;

Note that block*fert*nfix identifies the same levels of a random effects factor as does plotid.

See http://onlinelibrary.wiley.com/doi/10.1002/1097-0258(20000715)19:13%3C1793::AID-SIM482%3E3.0.CO;2-Q/... for a discussion of when

`random block*fert*nfix;`

would be included depending on covariance structure type.

See the SAS documentation for the REPEATED statement in MIXED for details about using "repeated date / subject=..." rather than "repeated / subject=...".

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to AaronJ

07-19-2017 03:55 PM

If you want to compare mean logN2O among dates, the DATE factor must be in the MODEL statement.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-19-2017 04:05 PM

I assume that is true as well. The question then becomes how to correctly write the error term(s) for including Date? Or does Proc MIXED do that automatically?

Solution

07-19-2017
06:03 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to AaronJ

07-19-2017 04:54 PM

The design structure of your study is not totally clear to me. If levels of *both* FERT and NFIX are assigned randomly to plots within blocks, then something like this might be appropriate:

```
proc mixed data=AllEvents covtest;
class block fert nfix date plotid;
model logN2O= fert|nfix|date / s;
random block;
```

*random block*fert*nfix; /* deliberately omitted for type=cs */
repeated date / subject=block*fert*nfix type=cs;
run;

Note that block*fert*nfix identifies the same levels of a random effects factor as does plotid.

See http://onlinelibrary.wiley.com/doi/10.1002/1097-0258(20000715)19:13%3C1793::AID-SIM482%3E3.0.CO;2-Q/... for a discussion of when

`random block*fert*nfix;`

would be included depending on covariance structure type.

See the SAS documentation for the REPEATED statement in MIXED for details about using "repeated date / subject=..." rather than "repeated / subject=...".