BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Nebulus
Calcite | Level 5

I'm trying to get SAS to spit out t-values for my contrasts in LSMEANS. Is there any way to achieve this? It just reports p-values for each comparison.

My code is

LSMEANS species*wax / pdiff stderr;

1 ACCEPTED SOLUTION

Accepted Solutions
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

I think you should switch to PROC MIXED (or GLIMMIX). Much better functionality, and you get the t values and df (using many different possible df methods).

View solution in original post

4 REPLIES 4
Rick_SAS
SAS Super FREQ

In general, if p is a probability for a t-distributed statistic, then you can recover the t value by using the QUANTILE function. You can use the OUT= option on the LSMEANS statement to produce an output data set, or you can use ODS OUTPUT.

However, you have to know the degrees of freedom for the pairwise comparison and the significance level of the test. A discussion with formulas is in the doc: SAS/STAT(R) 13.1 User's Guide

I am not an expert in multiple comparisons, but I know that they can be tricky, which might be why the procedure does not output the degrees of freedom.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

I think you should switch to PROC MIXED (or GLIMMIX). Much better functionality, and you get the t values and df (using many different possible df methods).

SteveDenham
Jade | Level 19

I agree with , but if you must use GLM, make the following your LSMEANS statement:

LSMEANS species*wax /tdiff pdiff stderr;

Steve Denham


sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1736 views
  • 9 likes
  • 4 in conversation