I talked with Adam Morris about your question. Independently, I came up with the same results as him, even though I set the model up in a slightly different fashion. I liked his set up a bit better, so I'd use that one. Please let me know if you have additonal questions.
@DonMcCormack Thank you very much for your response.
Would you mind sharing your solution as well? I'd like to compare them, because I'm interested in learning more about coding in JMP and other approaches for my data.
My solution is below:
Fit Model( Y( :Response ), Effects( :Treatment, :Week, :Treatment * :Week, :Year, :Treatment * :Year, :Week * :Year, :Treatment * :Week * :Year ), Random Effects( :Rep[:Treatment, :Year] ), NoBounds( 1 ), Personality( "Mixed Model" ), Subject( :Treatment, :Year, :Rep ), Repeated Effects( :Week2 ), Repeated Structure( "AR(1)" ), Run( Variogram( AR1( 1 ) ) ) );
There are only two differences. For the additional random effect, I nested Rep in Year. I used Treatment, Year, and Rep to implicitly define Subject. I find Adam's approach of explicitly defining Subject more intuitively appealing, though.
To share with others reading this thread, the proposed solution (from JMP Technical Support) is to create a new Subject column that is the concatenation of the 3 variables identifying the subjects (Treatment, Year, and Rep).
It is also necessary to create a continuous copy of the Week column for use as the Repeated variable.
JMP Pro cannot fit the exact same model as specified by the SAS Code (For AR(1) models, JMP nests the random effects in the subject variable). However, JMP can fit the model omitting the Rep(Year) term. The script below shows how one might set this up.
New Column("Subject", Character, Formula( :Treatment || ", " || Char( :Year ) || ", " || Char( :Rep ) )); New Column("Week2", numeric, continuous, formula(:Week)); Fit Model( Y( :response ), Effects( :Treatment, :Week, :Year, :Treatment * :Week, :Treatment * :Year, :Week * :Year, :Treatment * :Week * :Year ), Random Effects( :Treatment*:Year*:Rep ), Subject(:Subject), Repeated Effects( :Week2 ), Repeated Structure( "AR(1)" ), Personality( "Mixed Model" ) );
You can add more than one random effect in the analysis of repeated measures. However you will get a note saying “The repeated subject column has been nested in all random effects.” See the screenshot below. I think that is why Adam suggested dropping Rep(Year) because it will nest in Treatment.
Have you tried including two random effects? What have you seen?
@jiancao Thank you for your explanation.
Every time I include more than one random effects, I get "0" for Estimate, Std Error (see scren shot) for one of the random effects. Why would that be? Is it because of the nesting?
Thank you for your help,
There are no labels assigned to this post.