Turn on suggestions

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

Showing results for

- JMP User Community
- :
- Discussions
- :
- Can I use a nominal factor as a random effect (nested within subject) using Mixe...

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

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 1, 2016 6:54 AM
(7639 views)

Using the Mixed Model personality when I try to use a nominal factor (nested within participant) it will not allow me specificy the effect as random (e.g., "nest random coefficients").

It gives me the following error: "Effect id cannot be in a Group. Outside of the nesting, no non-continuous terms allowed in a group."

If I do the same analysis in Fir Model, and define subject as random, I am able to interact the nominal factor with the random subject, but I am unable to define the effect of the nominal variable as random slopes within person, in theMixed Model personality.

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Thanks for sharing the data.

The two models you fit (saved as Fit Model 1 and Fit Model 2) are so-called random-effect model or variance components model, in which Subject and Cycle-Prop are specified as two sources of variation but no covariance between the two is allowed. They are not random coefficients models.

I fit a random coefficients model using Nest Random Coefficient button (see the attached table). The results are different.

Hope this helps.

6 REPLIES 6

Highlighted
##

Yes, you can. Use the Nest button to specify a nested random effect. Nest Random Coefficients button is used for creating random coefficients models

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Can I use a nominal factor as a random effect (nested within subject) using Mixed Models?

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Can I use a nominal factor as a random effect (nested within subject) using Mixed Models?

Thanks, this is a pretty simple solution.

However, this leads me to another question regarding the difference between "Nest" and "Nest Random Coefficients" options, because if "Nest" gives you the random effect of the nested factor, then what does the "Nest Random Coefficients" do differently?

To understand the difference between "Nest" and "Nest Random Coefficients" I ran a model with data I'm more used to: Observations nested within subject, when both the predictor and outcome are continuous. This is a simple random intercepts and slopes model. I ran this model using the Nest command (including subject as a random factor, then the predictor nested within subject); then I ran the analysis using the "Nest Random Coefficients" (with random intercepts and slopes).

The results are identical. Not surprising, really. However, this makes it seem that the only difference between the "Nest" option and the "Nest Random Coefficients" option is that the former is a bit more flexible because it allows random effects for a nominal variable.

Am I missing something?

Thanks, Jeff

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Can I use a nominal factor as a random effect (nested within subject) using Mixed Models?

Could you post the data with the saved scripts for models you fit for me to take a look at it?

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Can I use a nominal factor as a random effect (nested within subject) using Mixed Models?

Hi,

and thanks for the help.

I didn’t see how to attach a data file on the message board, so I’ll try to attach it to this massage. The file is very simple (3 variables) and the scripts are saved. Note that these are the data and analyses I used to compare the Nested and Nest Random Coefficients analyses, and do not include a nominal nested factor which was part of the original question.

Thanks again, Jeff

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Thanks for sharing the data.

The two models you fit (saved as Fit Model 1 and Fit Model 2) are so-called random-effect model or variance components model, in which Subject and Cycle-Prop are specified as two sources of variation but no covariance between the two is allowed. They are not random coefficients models.

I fit a random coefficients model using Nest Random Coefficient button (see the attached table). The results are different.

Hope this helps.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Can I use a nominal factor as a random effect (nested within subject) using Mixed Models?

Great, this helps, I see the mistake I was making while using the Nest Random Coefficients button.

Thanks again for all of your help, Jeff