BookmarkSubscribeRSS Feed
atavenard
Calcite | Level 5

Hi,

 

I would need help to understand how the pvalue is computed when using UPPER option in a PROC MIXED.

Here is my mixed procedure:

PROC MIXED data=dummyall plots=residualpanel method=reml;

     CLASS   diet timec id timeplan;

     MODEL pulse= diet timec diet*timec pulsebase/ ddfm=kr;

     REPEATED timec / type=sp(pow)(timeplan) subject=id;

     LSMEANS diet*timec/diff=all cl;

     LSMESTIMATE diet*timec 'Change at Timec=2 - Diet 1 vs diet 2'  1 0 0 -1 0 0 / upper alpha=0.05 cl ;

RUN;

 

I have the impression the pvalue of the one sided test is 0.5*(pvalue two tailed) in case the pvalue is significant and the pvalue of the one sided test is 1-0.5*(pvalue two tailed) in case the pvalue is not significant. Though I thought the pvalue calculation was based on which alternative hypothesis is considered (diff>0 or diff<0). Why does the way the pvalue is computed change according to the results?

Can anyone help me to understand?

 

Thanks!

1 REPLY 1
SteveDenham
Jade | Level 19

I believe your interpretation is correct.  The directionality of one-tailed tests leads to the definition of the p value.  Let's suppose the alternative is that d>0, but you obtain a negative estimate for d.  The p value is then everything under the pdf curve to the right of d.  That is, 0.5 + (1 - the amount to the LEFT of the value of d).  A similar case comes out of an alternative hypothesis of d<0, and you obtain a positive estimate for d.  A pictorial representation of this should make this clearer, so just draw a Gaussian curve centered on 0, and put in some values for d, and then look at the part under the curve.

 

SteveDenham

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 542 views
  • 0 likes
  • 2 in conversation