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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

5 Steps to Your First Analytics Project Using SAS

For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.

Find more tutorials on the SAS Users YouTube channel.

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