LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sun, 5 Mar 2006 09:22:20 -0800
Reply-To:   Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Arthur Tabachneck <art297@NETSCAPE.NET>
Organization:   http://groups.google.com
Subject:   Re: Two-sample t-test question
Comments:   To: sas-l@uga.edu
In-Reply-To:   <1141547076.604973.106590@u72g2000cwu.googlegroups.com>
Content-Type:   text/plain; charset="iso-8859-1"

Jato,

Jay already addressed most of your questions, but I wanted to add my 2-cents worth regarding your first question. Technically, you aren't testing whether there were any significant differences but, rather, whether you could reject the null hypothesis that the average chg value was equal to zero. Since the sd was so large, the hypothesis couldn't be rejected. That doesn't say that the mean wasn't different from zero, simply that statistics couldn't help you show whether it was or wasn't.

> According to Proc Means result, if ABC-123 group shows a significant > increase in mean FEV, while the Placebo group does not , then I think > there should be a significant difference between the means of two > groups. But the Proc ttest result indicates no significant difference

Why? The first two were testing whether the means were different from zero, the second testing whether you could reject the argument that the ABC-123 and placebo means were the same -- two unrelated questions. If the groups' variances had stayed the same, but the placebo had experienced a non-significant decline, then you still would have failed to reject the null hypothesis for the placebo, but would have rejected the second null hypothesis. For example, if you change the data step to reverse the FEV0 and FEV6 values for the placebo group, as shown below, then you would indeed fail to reject the first null hypothesis, but end up rejecting the second.

DATA FEV; INPUT PATNO TRTGRP $ FEV0 FEV6 @@; CHG = FEV6 - FEV0; IF CHG = . THEN DELETE; else if TRTGRP eq "P" then do; HOLD=FEV6; FEV6=FEV0; FEV0=HOLD; CHG = FEV6 - FEV0; end; DATALINES; 101 A 1.35 . 103 A 3.22 3.55 106 A 2.78 3.15 108 A 2.45 2.30 109 A 1.84 2.37 110 A 2.81 3.20 113 A 1.90 2.65 116 A 3.00 3.96 118 A 2.25 2.97 120 A 2.86 2.28 121 A 1.56 2.67 124 A 2.66 3.76 102 P 3.01 3.90 104 P 2.24 3.01 105 P 2.25 2.47 107 P 1.65 1.99 111 P 1.95 . 112 P 3.05 3.26 114 P 2.75 2.55 115 P 1.60 2.20 117 P 2.77 2.56 119 P 2.06 2.90 122 P 1.71 . 123 P 3.54 2.92 ; run;

HTH, Art ------------- jato wrote: > I am reading the book "Common Statistical Methods for Clinical Research > with SAS Examples" by Glenn A. Walker. I got two questions about > Example 5.1, following is the sample code: > > /* Example 5.1: FEV1 Changes */ > > DATA FEV; > INPUT PATNO TRTGRP $ FEV0 FEV6 @@; > CHG = FEV6 - FEV0; > IF CHG = . THEN DELETE; > DATALINES; > 101 A 1.35 . 103 A 3.22 3.55 106 A 2.78 3.15 > 108 A 2.45 2.30 109 A 1.84 2.37 110 A 2.81 3.20 > 113 A 1.90 2.65 116 A 3.00 3.96 118 A 2.25 2.97 > 120 A 2.86 2.28 121 A 1.56 2.67 124 A 2.66 3.76 > 102 P 3.01 3.90 104 P 2.24 3.01 105 P 2.25 2.47 > 107 P 1.65 1.99 111 P 1.95 . 112 P 3.05 3.26 > 114 P 2.75 2.55 115 P 1.60 2.20 117 P 2.77 2.56 > 119 P 2.06 2.90 122 P 1.71 . 123 P 3.54 2.92 > ; > > PROC FORMAT; > VALUE $TRT 'A' = 'ABC-123' > 'P' = 'PLACEBO'; > RUN; > > PROC PRINT DATA = FEV; > VAR PATNO TRTGRP FEV0 FEV6 CHG; > FORMAT TRTGRP $TRT. FEV0 FEV6 CHG 5.2; > TITLE1 'Two-Sample t-Test'; > TITLE2 'EXAMPLE 5.1: FEV1 Changes'; > RUN; > > PROC MEANS MEAN STD N T PRT DATA = FEV; > BY TRTGRP; > VAR FEV0 FEV6 CHG; > FORMAT TRTGRP $TRT.; > RUN; > > PROC TTEST DATA = FEV; > CLASS TRTGRP; > VAR CHG; > FORMAT TRTGRP $TRT.; > RUN; > > 1. When use Proc Means to illustrate the one-sample t-tests for the > significance fo the with-group changes, the book states that ABC-123 > group shows a significant increase in mean FEV(p=0.0094), while the > Placebo group does not (p=0.1107). > But when use Proc ttest to do the two-sample t-test, the result > indicates no significant difference in the FEV increase between groups. > > According to Proc Means result, if ABC-123 group shows a significant > increase in mean FEV, while the Placebo group does not , then I think > there should be a significant difference between the means of two > groups. But the Proc ttest result indicates no significant difference > in the FEV increase between groups. Why what I think is wrong??? I > think this a question more about math than about SAS, but the export > here should be able to help me out. > > 2. Proc ttest gives t-tests when variance is equal and unequal, I just > wonder when to use the t-value and p-value corresponding to "Equal" > under the "Variance" column and when to use the t and p values > corresponding to "Unequal" under the "Variance" column. How can you > tell it is "Equal" or "Unequal"? > > Thanks a lot.


Back to: Top of message | Previous page | Main SAS-L page