Date: Mon, 23 Sep 2002 12:16:32 -0400
Reply-To: Jay Weedon <jweedon@EARTHLINK.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jay Weedon <jweedon@EARTHLINK.NET>
Organization: http://extra.newsguy.com
Subject: Re: How to run Goodman-Kruskal Gamma test in SAS?
Content-Type: text/plain; charset=us-ascii
On Mon, 23 Sep 2002 13:44:33 +0800, "YCF" <yiu628fan@yahoo.com.hk>
wrote:
>Hi all,
> I have a dataset which is about the relationship between the income and
>job satisfication:
>
>Income dissatisfed no opinion satisfied total
><6000 20 24 80 124
>6000-15000 22 38 28 88
>15000-25000 13 28 81 122
>>25000 7 18 54 79
>
>Total 62 108 243 413
>
> Now, I would like to apply the gamma test to see whether they are
>independent or not, also I would like to find out the asymptotic variance of
>the test statistics. How can I archieve this?
RTFM: In other words, look up GAMMA in the documentation and you'll
see that you can get it by running proc freq with the /measures option
in the tables statement. For your table gamma=0.067, asymptotic
SE=0.0633.
If the dataset actually resembles the above (i.e., it has only 4
records), you can remove the totals then transpose it:
proc transpose data=old out=new name=satisfaction prefix=freq;
by notsorted income;
before running weighted frequencies:
proc freq data=new; tables income*satisfaction /measures;
weight freq1;
run;
JW