BookmarkSubscribeRSS Feed
pnpatel2
Calcite | Level 5

I am using SAS studio to run a data file with lsmeans of tukey. I used JMP which is package within SAS to run the same data file and found that student's t lsmeans works better for my data than tukey. I wanted to ask what is the equivalent of student's t in SAS studio specifically for the "adjust =" line to JMP student's t?  In JMP you have an option to choose which lsmeans you want to run. In SAS studio you have to specify in the "adjust=NAME_HERE". What would the NAME_HERE be to run the data for the same lsmeans? Simply stated what is the student's t lsmeans called in SAS studio?

3 REPLIES 3
PaigeMiller
Diamond | Level 26

You didn't say what SAS PROC you are using.

 

In PROC GLM, you can choose the T option in the MEANS statement. https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_glm_syntax15.htm

--
Paige Miller
pnpatel2
Calcite | Level 5

Here is the code I am using. If I change the "adjust=tukey" to "adjust=t" the code crashes. Am I doing something wrong? I want to test the lsmeans for student's t comparisons. How do I do this?

proc import datafile='/home/u48644977/Priyanka/305_All_Dry_Yield_Data_Adjusted.xlsx'
out=work.dryYield dbms=xlsx replace;
run;

proc mixed plot=all covtest data=work.dryYield;
class year harvest block treatment;
model yield = block treatment|harvest|year /residual outp=resid s;
random block*treatment;
repeated / type=un subject=plot r;
lsmeans treatment|harvest|year/ adjust=tukey;
ods output diffs=ppp lsmeans=mmm;
run;

proc univariate noprint data=resid;
histogram resid/ normal;
inset n mean std="Std Dev" skewness;
ppplot resid/normal (L=1 mu=est sigma=est);
qqplot resid /normal (L=1 mu=est sigma=est) square;
inset n mean std="Std Dev" skewness;
run;

%include '/home/u48644977/Priyanka/pdmix800.sas';
%pdmix800(ppp,mmm,alpha=.1,sort=yes);
run;

PaigeMiller
Diamond | Level 26

There is no such option in PROC MIXED. In fact, I don't think there is a Student's T test for LSMEANS, it exists only for MEANS.

--
Paige Miller

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 752 views
  • 3 likes
  • 2 in conversation