BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar
Highlighted

Re: SAS code in JMP?

Isadora,

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.

Don

bordini
Community Trekker

Re: SAS code in JMP?

@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.

 

Thank you!

 

Isadora

0 Kudos

Re: SAS code in JMP?

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.

bordini
Community Trekker

Re: SAS code in JMP?

 @DonMcCormack That is very helpful!

 

Thanks for sharing it with me, and for giving me your opinion on which solution is the best approach. I really appreciate that.

 

Isadora

0 Kudos

Re: SAS code in JMP?

Hi Isadora,

 

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.

 

Thanks,

Adam

 

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" )
);
bordini
Community Trekker

Re: SAS code in JMP?

@adammorris , you have been so helpful!

 

Thank you so much for sharing your knowledge and all this good information! I appreciate that.

0 Kudos