[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: T-Test
From:       John Whittington <johnw () MAG-NET ! CO ! UK>
Date:       1996-09-30 17:46:52
[Download RAW message or body]

On Mon, 30 Sep 1996, Haiyi Xie <Haiyi.Xie@DARTMOUTH.EDU> wrote:

>        I wanted to do a whole bunch of t-test for two independent means,  but
>I don't have RAW DATA.  Only thing I have is means for each group, standard
>deviations and N for each group.
>        I can write a formula to compute t scores, but it is too much work.  I
>am wondering if there is a setup in SAS to do t-test for the info. I have.
>        Thank you very much,

Haiyi, it's not really 'too much work'.  If you are already able write the
formula to calculate the t-scores, just put it in a DATA step.  Assuming you
have the summary data in an external data file, something like: -

data done_it ;
    infile whatever ;
    input m1 sd1 n1 m2 sd2 n2 ;
    t = [your formula in terms om m1, sd1, n1, m2, sd2, n2 ] ;
    df = n1 + n2 -2 ;
    p = 2 * (1 - probt(t, df)) ;  /* omit 2* for one-sided */
run ;

you can then just print the resulting dataset with PROC PRINT.
Alternatively, you could make it a 'null' DATA step and include:

   put t= df= p= ;

to put the reults into your log, or an output file.

Regards,

John

-----------------------------------------------------------
Dr John Whittington,        Voice:      +44 1296 730225
Mediscience Services        Fax:        +44 1296 738893
Twyford Manor, Twyford,     E-mail:     johnw@mag-net.co.uk
Buckingham  MK18 4EL, UK    CompuServe: 100517,3677
-----------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic