turn on suggestions

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
- /
- Does it make sense to specify a repeated effect th...

Topic Options

- 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
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-10-2017 12:20 PM

The concentration of a certain nutrient is measured in soil each fall after harvest in a set of research plots. I want to model the change in nutrient concentration over a number of years, but I'm inclined to express the time variable in days since the start of the study, as the number of days between measurements is not constant.

Here's the SAS code of my present approach:

```
PROC MIXED DATA = soil;
CLASS year plot;
MODEL concentration = daysIntoStudy / DDFM = kr;
REPEATED year / SUB = plot TYPE = ar(1) r;
RUN;
```

I want to indicate an autoregressive covariance structure for the residuals as the same plots are being sampled each year, and I know that the repeated effect must be categorical, but I'm not sure if this is the right way to do it given that the variable *year* does not explicitly appear in the model.

Is this correct? Also, should the predictor *daysIntoStudy* be specified as a random effect?

Accepted Solutions

Solution

05-12-2017
03:09 PM

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

Posted in reply to user42

05-12-2017 12:30 AM

It depends This is my take:

Your REPEATED statement specifies two parameters: the variance among observations among subjects taken in the same *year*, and the covariance between two any observations (any two *year*s) taken on the same subject. If *year* is not included in the MODEL statement as a fixed effect, then you are assuming that *year* does not affect the mean value of *concentration*; that *year* affects only the variance of *concentration*.

For some of the disciplines I work with (e.g., field work in natural resources), that assumption--that mean response is not a function of year--is patently untenable. But typically we work with data observed over very few years. If we had 100 years and did not believe in global climate change, then that might be a totally different scenario.

Given that your study involves soils, I suspect you, too, have few years. Are you measuring each plot in multiple years? How many years? How many days since harvest do you measure? Have you plotted concentration versus days since harvest each year for each plot, and if so, are the profiles roughly parallel for years within each plot? These are things I would consider as I pondered model structure.

Generally for what I think might be your scenario, I would consider days_since_harvest and year as fixed effects factors, and plot as a random effect factor.

All Replies

Solution

05-12-2017
03:09 PM

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

Posted in reply to user42

05-12-2017 12:30 AM

It depends This is my take:

Your REPEATED statement specifies two parameters: the variance among observations among subjects taken in the same *year*, and the covariance between two any observations (any two *year*s) taken on the same subject. If *year* is not included in the MODEL statement as a fixed effect, then you are assuming that *year* does not affect the mean value of *concentration*; that *year* affects only the variance of *concentration*.

For some of the disciplines I work with (e.g., field work in natural resources), that assumption--that mean response is not a function of year--is patently untenable. But typically we work with data observed over very few years. If we had 100 years and did not believe in global climate change, then that might be a totally different scenario.

Given that your study involves soils, I suspect you, too, have few years. Are you measuring each plot in multiple years? How many years? How many days since harvest do you measure? Have you plotted concentration versus days since harvest each year for each plot, and if so, are the profiles roughly parallel for years within each plot? These are things I would consider as I pondered model structure.

Generally for what I think might be your scenario, I would consider days_since_harvest and year as fixed effects factors, and plot as a random effect factor.