Programming the statistical procedures from SAS

SAS code

Reply
New Contributor
Posts: 4

SAS code

What is the code for simple lattice design over years and locations? Both location and year are random.

Esteemed Advisor
Posts: 5,156

Re: SAS code

PROC LATTICE?

Data never sleeps
Community Manager
Posts: 291

Re: SAS code

[ Edited ]

Hi  @Sepehr,Thanks for your question. I've moved your question to this topical forum on Statistical Procedures as more experts will be able to help here.  Hope this is the right forum although someone will advise if not... Have a good day, 

Best,

Lainie

SAS Super FREQ
Posts: 3,306

Re: SAS code

You might want to browse this web page that includes many standard experimental designs and SAS code to analyze them.

 

New Contributor
Posts: 4

Re: SAS code

As far as know the code that I am looking for is something like the following code, but I'm not 100% positve if this code is the correct one!

 

proc mixed method=type3; class YR L BLOCK TRT; model yield=TRT; random BLOCK TRT L YR*L BLOCK*YR*L YR*TRT L*TRT YR*L*TRT; lsmeans TRT/diff;

 

New Contributor
Posts: 4

Re: SAS code

YEAH! I THINK I FIGURED OUT THE ANSWER:

data;
input YEARS LOCATIONS BLOCKS REP TREATMENT yield ;
datalines;
.
.

;

PROC MIXED;CLASS YEARS LOCATIONS REP BLOCKS TREATMENT;
MODEL yield=TREATMENT;
RANDOM YEARS LOCATIONS YEARS*LOCATIONS REP*YEARS*LOCATIONS BLOCKS*REP*YEARS*LOCATIONS TREATMENT*YEARS TREATMENT*LOCATIONS TREATMENT*YEARS*LOCATIONS;lsmeans TREATMENT/diff;
run;


New Contributor
Posts: 4

Re: SAS code

I'm looking forward to hearing your comments and suggestions.
Ask a Question
Discussion stats
  • 6 replies
  • 305 views
  • 1 like
  • 4 in conversation