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 ;
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?
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.
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 ;
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.