BookmarkSubscribeRSS Feed
knveraraju91
Barite | Level 11

Dear,

 

I need help in my proc freq steps.  In the first proc freq, calculating confidence intervals and in second proc proc freq step, pval value is calculated.

The results for confidence interval:   Lower ci  0.3587    Upeerci    0.9746

 

The pvalue    is   :  0.09

 

Please suggest  why p value is greater than 0.05   but confidence interval does not include 0.  How do I fix in my code

data have;
input trt01an avalct1n;
datalines;
1 1
1 1
2 2
2 1
2 1
2 2
1 1
2 2
2 2
2 1
2 2
2 2
;





 proc freq data = have;
           
            tables trt01an*avalct1n / riskdiff cl alpha = 0.05 ;
           ods output riskdiffcol1 = aa(keep = ordx ord control risk lowercl uppercl where = (control)) ;
          run ;
          
              proc freq data = have;
                                          table avalct1n*trt01an / alpha = 0.05 fisher pdiff cl nocol nopercent ;
                                          exact fisher / alpha = 0.05 ;
                                          ods output fishersexact = exact ;
                                          output out = ac(rename = (xpr_fish = pval)) fisher ;
                                  run ;

 

 

3 REPLIES 3
PaigeMiller
Diamond | Level 26

What specific tests in the output are you looking at when you see the Confidence Interval?

 

What specific tests in the output are you looking at when you see the p-value?

--
Paige Miller
knveraraju91
Barite | Level 11

Thank you very much.

I need to calculate both CI and Pvalue using  Fisher exact since number of subjects less than 5 in one of treatments. 

Reeza
Super User

I think your assumption of 0 being required in the interval may be incorrect. What makes you think you need 0 in the interval?

 

EDIT: If you're looking at the risk ratio, aren't you looking for the presence of 1, similar to odds ratio rather than 0?

 


@knveraraju91 wrote:

Dear,

 

I need help in my proc freq steps.  In the first proc freq, calculating confidence intervals and in second proc proc freq step, pval value is calculated.

The results for confidence interval:   Lower ci  0.3587    Upeerci    0.9746

 

The pvalue    is   :  0.09

 

Please suggest  why p value is greater than 0.05   but confidence interval does not include 0.  How do I fix in my code

data have;
input trt01an avalct1n;
datalines;
1 1
1 1
2 2
2 1
2 1
2 2
1 1
2 2
2 2
2 1
2 2
2 2
;





 proc freq data = have;
           
            tables trt01an*avalct1n / riskdiff cl alpha = 0.05 ;
           ods output riskdiffcol1 = aa(keep = ordx ord control risk lowercl uppercl where = (control)) ;
          run ;
          
              proc freq data = have;
                                          table avalct1n*trt01an / alpha = 0.05 fisher pdiff cl nocol nopercent ;
                                          exact fisher / alpha = 0.05 ;
                                          ods output fishersexact = exact ;
                                          output out = ac(rename = (xpr_fish = pval)) fisher ;
                                  run ;

 

 


 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 431 views
  • 0 likes
  • 3 in conversation