cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
bordini
Level III

SAS code in JMP?

I would like to know if there is a way I can run a SAS code (below) in JMP. Or how I can emulate the SAS code below in JMP. 

 

 

proc mixed
Class year week treatment rep;
model stdmisummax=year|week|treatment/ddfm=kr residual;
random rep(year) treatment*rep(year);
repeated week/type=ar(1) subject=treatment*rep(year);
run;

 

 

My factors are: Treatment, week (repeated measure), year, rep (replicate). 

 

Thank you in advance.

 

PS: I've tried to run something similar in JMP using the repeated measures add in, but it won't work out, because I can't cross three factors to make the subject id. 

I think my JMP version is not pro or it is some sort of pro version for the university.

I do not have SAS software.

2 ACCEPTED SOLUTIONS

Accepted Solutions

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" )
);

View solution in original post

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.

View solution in original post

19 REPLIES 19
uday_guntupalli
Level VIII

Re: SAS code in JMP?

@bordini , 
    I know you say you dont have SAS, but did you know you could download SAS University edition for free ? If you really need to test SAS code, you could download SAS university edition and try it. 

 

https://www.sas.com/en_us/software/university-edition/download-software.html

 

   I dont know how to perform the equivalent step in JMP, so I will be watching for other answers too :)

Best
Uday
bordini
Level III

Re: SAS code in JMP?

@uday_guntupalli Thanks for your reply. Yes, I know that, but I don't want to get into SAS. I got this code from a colleague, because I was unable or could not find out how to run the same analyses with factors stipulated that way in JMP.

 

Thank you :)

Re: SAS code in JMP?

In case this applies to your situation, you should know that JMP is a full client to SAS. So just as SAS runs as a client, so can JMP. It requires a SAS Server connection. That server might run on the same computer, as is the case of my work laptop computer, or it might be remote through a network connection. Do you have access to a remote SAS server (company, university)? If so, then paste your SAS code into a JMP script editor. Right-click in the editor and select Submit SAS.

 

Select File > Preferences and set up the connection to the SAS server first.

bordini
Level III

Re: SAS code in JMP?

@Mark_Bailey Thanks for your reply. The problem is that I do not want to run the analyses in SAS. I want to know if it is possible to run this code in JMP somehow or how I can emulate that code in a JMP script or in Fit Model.

Thank you.

Re: SAS code in JMP?

Sorry for the confusion. No, it is not possible to run SAS programs in JMP.

 

JMP Is able to perform some simple repeated measures analyses. See this note. More complex situations (i.e., not simple covariance structures) require the Mixed Model platform in JMP Pro.

bordini
Level III

Re: SAS code in JMP?

@Mark_Bailey  Thanks for sharing this note. I've read it before.

 

I have the Mixed Platform in my JMP version. The problem is that I cannot correctly stipulate the subject ID in this platform, because my subject is an interaction of treatment*rep(year). That platform does not allow me to cross and nest to add the subject "treatment*rep(year)" in the Subject ID box. It allows you to add only one factor.

 

Thank you

Re: SAS code in JMP?

I am not an expert in mixed effects models in general or this JMP Pro platform in particular. Perhaps someone who is such an expert will join the discussion. If not, you might send it along to JMP Technical Support for more suggestions.

Re: SAS code in JMP?

It would be helpful to know a little more about the structure of the data table. What would it look like for one subject? Do repetitions occur within week? You will need JMP Pro to use the AR(1) covariance structure.

bordini
Level III

Re: SAS code in JMP?

 

Hi @DonMcCormack , I've attached a screen shot of how the data table looks like for each subject.JMP DISCUSSION.png

 

I have 4 replicates, 6 treatments and 2 years. Samples were collected at 3 different days after treatments were applied. I'm calling these sampling days of Sampling No. in the data table and they're called "week" in the SAS script.

 

I have JMP Pro 13.

 

Thank you in advance,

 

Isadora