|
I'll jump into this discussion on the 'asking' side ... :)
I am using Chi-Square to test reporting level scores against national scores
(Chi-Square was the direction of the client, so no, I can't use T-test or
others). I have already generated the summary score dataset (output from
PROC MEANS), and appended national scores to the dataset. Currently, I
process this via direct math - ie, I wrote out a macro to do, by hand, the
chi square test (using effective base size and percentage as inputs for each
of the four cells). I imagine the code would be much easier to read if I
can do it not by hand (ie, using PROBCHI or a PROC on the full dataset).
I am limited in this largely by my lack of statistical background - I
understand basic statistics to some extent, but college was a long time ago,
and I'm really more of a programmer than a statistician :) PROBCHI takes as
input the score, the DF (which I can derive from the effective base size, I
believe, something like (FB-2); or does it involve both effective base
sizes?) and the 'non-centrality' parameter. Am I correct in guessing that
the NC parameter is equivalent to the 'benchmark' score that I'm comparing
it to, or is that not relevant? Also, if I do it that way, it sounds like
the effective base size for the overall group does not matter- that feels
wrong to me given the formula I use, but perhaps it doesn't actually matter?
I've also looked at the PROC FREQ options for chi square tests, but those
seem to be roughly the same, and require nonsummarized data to compare to,
which I'd prefer not to do (summarizing this takes hours, and there are a
lot of levels, which PROC FREQ doesn't deal well with, as opposed to using
CLASS)...
I guess my ultimate question is, is it best to just use the directly written
formula still, or is there a superior way using a built in formula?
Thanks!
-Joe
My data, by the way, roughly looks like this:
level1 , level2 , level3 , score1, effbase1, score2 , effbase2
,,,.80,150,.70,100
,,A,.70,50,.75,40
,,B,.90,50,.77,30
,,C,.80,50,.60,30
,1,A,.75,20,.80,15
... etcetera
which I then appended the first row (the overall numbers) scores and
effective base sizes to every row below it, to get the comparison values.
On Tue, Feb 17, 2009 at 9:31 AM, Kevin Viel <citam.sasl@gmail.com> wrote:
> On Mon, 16 Feb 2009 00:53:53 -0800, kumar <urs.kumar22@GMAIL.COM> wrote:
>
> >I want caculate the Chi-Square in SAS
>
> Kumar,
>
> A bit vague. Please see the PROBCHI() and PDF() functions.
>
> HTH,
>
> Kevin
>
|