Frankly, most of this appears unanswerable to me.
As with another recent poster you seem to be
expecting Statalist to play the same role as
your advisor or committee of advisors. That's
not fair on us -- or on them.
I will peel off one point, as I am the author
of the -chitest- command.
It is difficult to comment without seeing what
you typed or the output you got (compare advice
in the Statalist FAQ), but -chitest- is indicating
a problem with your data. Is that right or is it wrong?
For example, consider these observed frequencies, the
frequencies of 0 to 9 in the first 608 digits
in the decimal expansion of pi. Any hypothesis
to be considered by -chitest- should imply
that the totals of observed and expected frequencies
are identical.
. l
+------+
| freq |
|------|
1. | 60 |
2. | 62 |
3. | 67 |
4. | 68 |
5. | 64 |
|------|
6. | 56 |
7. | 62 |
8. | 44 |
9. | 58 |
10. | 67 |
+------+
Here the sum is 608
. su freq, meanonly
. di r(sum)
608
and so a simple hypothesis of uniform frequencies
yields expected frequencies that are all
. gen exp = 60.8
. chitest freq exp
observed frequencies from freq; expected frequencies from exp
Pearson chi2(9) = 7.4934 Pr = 0.586
likelihood-ratio chi2(9) = 7.9287 Pr = 0.541
+-------------------------------------------+
| observed expected obs - exp Pearson |
|-------------------------------------------|
| 60 60.800 -0.800 -0.103 |
| 62 60.800 1.200 0.154 |
| 67 60.800 6.200 0.795 |
| 68 60.800 7.200 0.923 |
| 64 60.800 3.200 0.410 |
|-------------------------------------------|
| 56 60.800 -4.800 -0.616 |
| 62 60.800 1.200 0.154 |
| 44 60.800 -16.800 -2.155 |
| 58 60.800 -2.800 -0.359 |
| 67 60.800 6.200 0.795 |
+-------------------------------------------+
Now the frequencies had added to 610, -chitest-
would have issued a warning
. replace exp = 61
(10 real changes made)
. chitest freq exp
observed frequencies from freq; expected frequencies from exp
Warning: totals of freq and exp differ
total
freq 608
exp 610
Pearson chi2(9) = 7.4754 Pr = 0.588
likelihood-ratio chi2(9) = 3.9352 Pr = 0.916
+-------------------------------------------+
| observed expected obs - exp Pearson |
|-------------------------------------------|
| 60 61.000 -1.000 -0.128 |
| 62 61.000 1.000 0.128 |
| 67 61.000 6.000 0.768 |
| 68 61.000 7.000 0.896 |
| 64 61.000 3.000 0.384 |
|-------------------------------------------|
| 56 61.000 -5.000 -0.640 |
| 62 61.000 1.000 0.128 |
| 44 61.000 -17.000 -2.177 |
| 58 61.000 -3.000 -0.384 |
| 67 61.000 6.000 0.768 |
+-------------------------------------------+
which seems fair enough to me. The threshold for a warning is that
| observed sum - expected sum | must not exceed 0.01. Thus it
is for the user to decide what is acceptable.
Nick
[email protected]
Narasimhan Sowmyanarayanan
> 1. When I get values of expected success the sum of expected success
> does not equal the sum of actual success for some of my functions. Is
> this normal ? and what do you make out of it. When I do my Chi-Square
> tests it gives me a message in stata that the numbers dont match (I am
> using a downloaded script "chitest")
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/