There is a problem, of some kind, with your question!
Since it is a logistic regression model, the observed outcome will
be 0 or 1 (though if you have several cases at the same values of
the covariates these can be grouped into a binomial outcome of
'r' 1s out of 'n' cases, but you do not describe your data enough
to make it clear which is the case).
The expected outcome, at a given set of covariate values, will be the
fitted probability P of Outcome=1, for some value of P with 0 < P < 1.
So (Observed - Expected) = (1 - P), or (0 - P) = -P.
Since this can have only two values, the concept of a "confidence
interval" for it is a bit elusive. There is, of course, uncertainty
in the value of P, which can be expressed as a standard error for P
(which any decent statistical software should be able to supply).
So there is certainly a confidence interval for P; but the binary
nature of the Observed still interferes with getting one for the
(Observed - Expected).
It is not like a standard linear regression, where the predicted
(Expected) value has uncertainty and varies continuously, and the
Outcome is distributed about the true mean with (usually) a Normal
distribution, so that (Oberved - Expected) is a continuous variable
for which one can certainly calculate a "confidence interval"
(combining the uncertainty about the Expected value with the random
distribution of the Observed value).
There is also the question: What is the interest in calculating
a "confidence interval" for (Observed - Expected) anyway?
If you told us more about what is going on, it may be possible
to give a properly targeted answer.
Hoping this helps,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.H...@manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 03-Nov-09 Time: 16:57:20
------------------------------ XFMail ------------------------------
<<
Sorry for not giving enough details, I was trying to be brief but I was probably too brief.
What I'm ultimately trying to do is compare the performance of several "testers" who are diagnosing a certain disease within animals. I have created a logistic model to predict whether an animal should be diseased or not based on well known (from previous studies) predictors. I now want to compare the observed number of diseased animals with the predicted number to be able to rank the testers in order of performance for diagnosing disease in the animals (the test is fairly subjective). I have summed the number of observed and predicted for each tester and I now want to calculate the confidence interval around the O-E, but I wasnt too sure how to do this. I hope this makes a little more sense?
>>>
I think this is a continuation of an earlier post of yours.
If I recall correctly, you had several testers, each testing different animals - I think it was a hundred or som animals per tester.
You then say that you have a logistic regression program that predicts the number of diseased animals.
so, you now have something like this
Tester Predicted by model Diagnosed by tester
1 45 52
2 51 57
3 42 38
etc.
Is that right?
And you are saying that the numbers -7, -6 and +4 are indicative of the skill of the testers.
This may be, I think, a mistake.
First, it assumes that the prediction of the model is always correct. If you have such a model, then
why do you need testers who use a subjective test?
Second, it assumes that calling a sick animal healthy is equivalent to calling a healthy animal sick ... I am not sure if this is sensible.
But, assuming that these values ARE what you want, I think the way to go is NOT to try to find the SE of O-E, but to turn these numbers into proportions, and then compare the proportions.
Peter
Peter L. Flom, PhD
Statistical Consultant
Website: www DOT peterflomconsulting DOT com
Writing; http://www.associatedcontent.com/user/582880/peter_flom.html
Twitter: @peterflom
> What I'm ultimately trying to do is compare the performance of several
> "testers" who are diagnosing a certain disease within animals. I have
> created a logistic model to predict whether an animal should be diseased
> or not based on well known (from previous studies) predictors. I now
> want to compare the observed number of diseased animals with the
> predicted number to be able to rank the testers in order of performance
> for diagnosing disease in the animals (the test is fairly subjective).
> I have summed the number of observed and predicted for each tester and I
> now want to calculate the confidence interval around the O-E, but I
> wasnt too sure how to do this. I hope this makes a little more sense?
Why not use sensitivity and specificity here?
Let the prediction of the logistic model be your "gold standard" of
disease. Let the results of an individual tester be a "diagnostic test".
Suppose the "gold standard" calls 50 animals as diseased. Among these 50
animals, the tester gets 35 right and 15 wrong. Then your sensitivity is
70%.
Among the 200 healthy animals (by the gold standard) a tester gets 180
right and 20 wrong. Then your specificity is 90%.
Plot each raters sensitivity/specificity pair on a scatterplot. You can
also show confidence limits for these pairs using standard formulas for
a confidence interval for a single proportion.
The problem here, of course, is that you won't be able to rank the
performance easily. Is someone who has sens=70% and spec=90% better or
worse than someone who has sens=90% and spec=70%? If the cost of a false
positive diagnosis and the cost of a false negative diagnosis are both
the same, then it would not be too outrageous to compute an overall
accuracy. For the first rater, it would be (35+180)/(50+200) = 86%. Note
that this is not the same as the average of 70% and 90% but rather is
weighted towards the specificity because of the greater number of
healthy animals.
I hope this helps.
--
Steve Simon, Standard Disclaimer
Second free statistics webinar, Wed, Nov 4, 11am-noon CST.
"The first three steps in data entry, with examples in PASW/SPSS"
Details at www.pmean.com/webinars
Dear Peter and Steven
Thank you both very much for your helpful suggestions.
I agree with Peter that I am making the assumption that the model is a gold standard. I know it isn’t but I think it’s the best I have to predict which animals are probably diseased in order to rank the testers.
----- Original Message -----From: Ellen Ann