Data analysis: normal approximation for binomial

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Data analysis: normal approximation for binomial

colstat
Dear R experts,

I am trying to analyze data from an article, the data looks like this

Patient Age Sex Aura preCSM preFreq preIntensity postFreq postIntensity
postOutcome
1 47 F A 4 6 9 2 8 SD
2 40 F A/N 5 8 9 0 0 E
3 49 M N 5 8 9 2 6 SD
4 40 F A 5 3 10 0 0 E
5 42 F N 5 4 9 0 0 E
6 35 F N 5 8 9 12 7 NR
7 38 F A 5 NA 10 2 9 SD
8 44 M A 4 4 10 0 0 E
9 47 M A 4 5 8 2 7 SD
10 53 F A 5 3 10 0 0 E
11 41 F N 5 6 7 0 0 E
12 49 F A 4 6 8 0 0 E
13 48 F A 5 4 8 0 0 E
14 63 M N 4 6 9 15 9 NR
15 58 M N 5 9 7 2 8 SD
16 53 F A 4 3 9 0 0 E
17 47 F N 5 4 8 1 4 SD
18 34 F A NA  5 9 0 0 E
19 53 F N 5 4 9 5 7 NR
20 45 F N 5 5 8 5 4 SD
21 30 F A 5 3 8 0 0 E
22 29 F A 4 5 9 0 0 E
23 49 F N 5 9 10 0 0 E
24 24 F A 5 5 9 0 0 E
25 63 F N 4 19 7 10 7 NR
26 62 F A 5 8 9 11 9 NR
27 44 F A 5 3 10 0 0 E
28 38 F N 4 8 10 1 3 SD
29 38 F N 5 3 10 0 0 E

How do I do a binomial distribution z statistics with continuity
correction? basically normal approximation.
Could anyone give me some suggestions what I (or R) can do with these data?
I have tried tried histogram, maybe t-test? or even lattice?  what else can
I(or can R) do?
help please, thanks so much.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Data analysis: normal approximation for binomial

Joshua Wiley-2
Hi,

I am not clear what your goal is.  There is a variety of data there.
You could look at t-test differences in preIntensity broken down by
sex, you could use regression looking at postIntensity controlling for
preIntensity and explained by age, you could....

Why are you analyzing data from an article?  What did the article do?
What you mention---some sort of z statistic (what exactly this was of
and how it should be calculated did not seem like was clear even to
you), histogram, t-test, lattice, are all very different things that
help answer different questions, show different things, and in one is
a piece of software.

Without a clearer question and goal, my best advice is here are a
number of different functions some of which may be useful to you:

ls(pos = "package:stats")

Cheers,

Josh

On Sat, Nov 19, 2011 at 3:01 PM, Colstat <[hidden email]> wrote:

> Dear R experts,
>
> I am trying to analyze data from an article, the data looks like this
>
> Patient Age Sex Aura preCSM preFreq preIntensity postFreq postIntensity
> postOutcome
> 1 47 F A 4 6 9 2 8 SD
> 2 40 F A/N 5 8 9 0 0 E
> 3 49 M N 5 8 9 2 6 SD
> 4 40 F A 5 3 10 0 0 E
> 5 42 F N 5 4 9 0 0 E
> 6 35 F N 5 8 9 12 7 NR
> 7 38 F A 5 NA 10 2 9 SD
> 8 44 M A 4 4 10 0 0 E
> 9 47 M A 4 5 8 2 7 SD
> 10 53 F A 5 3 10 0 0 E
> 11 41 F N 5 6 7 0 0 E
> 12 49 F A 4 6 8 0 0 E
> 13 48 F A 5 4 8 0 0 E
> 14 63 M N 4 6 9 15 9 NR
> 15 58 M N 5 9 7 2 8 SD
> 16 53 F A 4 3 9 0 0 E
> 17 47 F N 5 4 8 1 4 SD
> 18 34 F A NA  5 9 0 0 E
> 19 53 F N 5 4 9 5 7 NR
> 20 45 F N 5 5 8 5 4 SD
> 21 30 F A 5 3 8 0 0 E
> 22 29 F A 4 5 9 0 0 E
> 23 49 F N 5 9 10 0 0 E
> 24 24 F A 5 5 9 0 0 E
> 25 63 F N 4 19 7 10 7 NR
> 26 62 F A 5 8 9 11 9 NR
> 27 44 F A 5 3 10 0 0 E
> 28 38 F N 4 8 10 1 3 SD
> 29 38 F N 5 3 10 0 0 E
>
> How do I do a binomial distribution z statistics with continuity
> correction? basically normal approximation.
> Could anyone give me some suggestions what I (or R) can do with these data?
> I have tried tried histogram, maybe t-test? or even lattice?  what else can
> I(or can R) do?
> help please, thanks so much.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



--
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, ATS Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Data analysis: normal approximation for binomial

Joshua Wiley-2
Hi Colin,

I have never heard of a binomial distribution z statistic with (or
without for that matter) a continuity correction, but I am not a
statistician.  Other's may have some ideas there.  As for other ways
to analyze the data, I skimmed through the article and brought the
data and played around with some different analyses and graphs.  I
attached a file headache.txt with all the R script (including the data
in an Rish format).  It is really a script file (i.e., .R) but for the
listservs sake I saved it as a txt.  There are quite a few different
things I tried in there so hopefully it gives you some ideas.
Regardless of the analysis type used and whether one considers
proportion that "significantly improved" or the raw frequency or
intensity scores, I would say that concluding the treatment was
effective is a good conclusion.  The only real concern could be that
people would naturally get better on their own (a control group would
be needed to bolster the causal inference drawn from a pre/post
measurement).  However, given at least what I know about migraines, it
is often a fairly chronic condition so over a relatively short time
period, it seems implausible to conclude that as many people would be
improving as this study reported.

Cheers,

Josh

On Sat, Nov 19, 2011 at 7:43 PM, Colstat <[hidden email]> wrote:

> hey, Joshua
> I was reading this paper, in attachment, and reproducing the results.
>
> I was really confused when he said in the paper "The results were then
> statistically analyzed using binomial distribution z statistics with
> continuity correction."  The data is binomial?  To me, this is a paired
> t-test.
>
> What command should I use to get those results (the first paragraph in
> Results section)?  Basically, it's a pre and post treatment problem.
>
> What other graphical analysis do you think is appropriate? reshape package?
> lattice package, namely conditional graph?
>
> I know this might be too much, but I do really appreciate it if you do take
> a look at it.
>
> Thanks,
> Colin
>
>
> On Sat, Nov 19, 2011 at 10:15 PM, Joshua Wiley <[hidden email]>
> wrote:
>>
>> Hi,
>>
>> I am not clear what your goal is.  There is a variety of data there.
>> You could look at t-test differences in preIntensity broken down by
>> sex, you could use regression looking at postIntensity controlling for
>> preIntensity and explained by age, you could....
>>
>> Why are you analyzing data from an article?  What did the article do?
>> What you mention---some sort of z statistic (what exactly this was of
>> and how it should be calculated did not seem like was clear even to
>> you), histogram, t-test, lattice, are all very different things that
>> help answer different questions, show different things, and in one is
>> a piece of software.
>>
>> Without a clearer question and goal, my best advice is here are a
>> number of different functions some of which may be useful to you:
>>
>> ls(pos = "package:stats")
>>
>> Cheers,
>>
>> Josh
>>
>> On Sat, Nov 19, 2011 at 3:01 PM, Colstat <[hidden email]> wrote:
>> > Dear R experts,
>> >
>> > I am trying to analyze data from an article, the data looks like this
>> >
>> > Patient Age Sex Aura preCSM preFreq preIntensity postFreq postIntensity
>> > postOutcome
>> > 1 47 F A 4 6 9 2 8 SD
>> > 2 40 F A/N 5 8 9 0 0 E
>> > 3 49 M N 5 8 9 2 6 SD
>> > 4 40 F A 5 3 10 0 0 E
>> > 5 42 F N 5 4 9 0 0 E
>> > 6 35 F N 5 8 9 12 7 NR
>> > 7 38 F A 5 NA 10 2 9 SD
>> > 8 44 M A 4 4 10 0 0 E
>> > 9 47 M A 4 5 8 2 7 SD
>> > 10 53 F A 5 3 10 0 0 E
>> > 11 41 F N 5 6 7 0 0 E
>> > 12 49 F A 4 6 8 0 0 E
>> > 13 48 F A 5 4 8 0 0 E
>> > 14 63 M N 4 6 9 15 9 NR
>> > 15 58 M N 5 9 7 2 8 SD
>> > 16 53 F A 4 3 9 0 0 E
>> > 17 47 F N 5 4 8 1 4 SD
>> > 18 34 F A NA  5 9 0 0 E
>> > 19 53 F N 5 4 9 5 7 NR
>> > 20 45 F N 5 5 8 5 4 SD
>> > 21 30 F A 5 3 8 0 0 E
>> > 22 29 F A 4 5 9 0 0 E
>> > 23 49 F N 5 9 10 0 0 E
>> > 24 24 F A 5 5 9 0 0 E
>> > 25 63 F N 4 19 7 10 7 NR
>> > 26 62 F A 5 8 9 11 9 NR
>> > 27 44 F A 5 3 10 0 0 E
>> > 28 38 F N 4 8 10 1 3 SD
>> > 29 38 F N 5 3 10 0 0 E
>> >
>> > How do I do a binomial distribution z statistics with continuity
>> > correction? basically normal approximation.
>> > Could anyone give me some suggestions what I (or R) can do with these
>> > data?
>> > I have tried tried histogram, maybe t-test? or even lattice?  what else
>> > can
>> > I(or can R) do?
>> > help please, thanks so much.
>> >
>> >        [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > [hidden email] mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> > http://www.R-project.org/posting-guide.html
>> > and provide commented, minimal, self-contained, reproducible code.
>> >
>>
>>
>>
>> --
>> Joshua Wiley
>> Ph.D. Student, Health Psychology
>> Programmer Analyst II, ATS Statistical Consulting Group
>> University of California, Los Angeles
>> https://joshuawiley.com/
>
>


--
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, ATS Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

headache.txt (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Data analysis: normal approximation for binomial

John Kane-2
In reply to this post by colstat
Hi Colin,

I'm no statistician and it's been a very long time but IIRC a t-test is a 'modified version of a x-test that is used on small sample sizes.  (I can hear some of our statistians screaming in the background as I type.)

In any case I thing a Z distribution is descrete and a standard normal is not so a user can use Yates continuity correction to interpolate values for the normal between the discrete z-values.  Or something like this.  

I have only encountered it once in a Psych stats course taught by an animal geneticist who seemed to think it was important. To be honest, it looked pretty trivial for the type of data I'd be likely to see.

I cannot remember ever seeing a continuity correction used in a published paper--for that matter I have trouble remembering a z-test.  

If you want more information on the subject I found a very tiny bit of info at http://books.google.ca/books?id=SiJ2UB3dv9UC&pg=PA139&lpg=PA139&dq=z-test+with+continuity+correction&source=bl&ots=0vMTCUZWXx&sig=bfCPx0vynGjA0tHLRAf6B42x0mM&hl=en&ei=nQHJTo7LPIrf0gHxs6Aq&sa=X&oi=book_result&ct=result&resnum=2&ved=0CC0Q6AEwAQ#v=onepage&q=z-test%20with%20continuity%20correction&f=false

A print source that, IIRC, has a discussion of this is "Hayes, W. (1981. Statistics. 3rd Ed., Holt Rinehart and Winston

Have fun

--- On Sat, 11/19/11, Colstat <[hidden email]> wrote:

> From: Colstat <[hidden email]>
> Subject: [R] Data analysis: normal approximation for binomial
> To: [hidden email]
> Received: Saturday, November 19, 2011, 6:01 PM
> Dear R experts,
>
> I am trying to analyze data from an article, the data looks
> like this
>
> Patient Age Sex Aura preCSM preFreq preIntensity postFreq
> postIntensity
> postOutcome
> 1 47 F A 4 6 9 2 8 SD
> 2 40 F A/N 5 8 9 0 0 E
> 3 49 M N 5 8 9 2 6 SD
> 4 40 F A 5 3 10 0 0 E
> 5 42 F N 5 4 9 0 0 E
> 6 35 F N 5 8 9 12 7 NR
> 7 38 F A 5 NA 10 2 9 SD
> 8 44 M A 4 4 10 0 0 E
> 9 47 M A 4 5 8 2 7 SD
> 10 53 F A 5 3 10 0 0 E
> 11 41 F N 5 6 7 0 0 E
> 12 49 F A 4 6 8 0 0 E
> 13 48 F A 5 4 8 0 0 E
> 14 63 M N 4 6 9 15 9 NR
> 15 58 M N 5 9 7 2 8 SD
> 16 53 F A 4 3 9 0 0 E
> 17 47 F N 5 4 8 1 4 SD
> 18 34 F A NA  5 9 0 0 E
> 19 53 F N 5 4 9 5 7 NR
> 20 45 F N 5 5 8 5 4 SD
> 21 30 F A 5 3 8 0 0 E
> 22 29 F A 4 5 9 0 0 E
> 23 49 F N 5 9 10 0 0 E
> 24 24 F A 5 5 9 0 0 E
> 25 63 F N 4 19 7 10 7 NR
> 26 62 F A 5 8 9 11 9 NR
> 27 44 F A 5 3 10 0 0 E
> 28 38 F N 4 8 10 1 3 SD
> 29 38 F N 5 3 10 0 0 E
>
> How do I do a binomial distribution z statistics with
> continuity
> correction? basically normal approximation.
> Could anyone give me some suggestions what I (or R) can do
> with these data?
> I have tried tried histogram, maybe t-test? or even
> lattice?  what else can
> I(or can R) do?
> help please, thanks so much.
>
>     [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email]
> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Data analysis: normal approximation for binomial

colstat
In reply to this post by Joshua Wiley-2
Hey, Joshua
Thank so much for your quick response.  Those examples you produced are
very good, I'm pretty impressed by the graphs.  When I ran the last line, I
hit an error, so I ran what's inside summary(), it give me

Error: could not find function "lmer"

Something with the package "lme4"?
Colin


On Sun, Nov 20, 2011 at 1:00 AM, Joshua Wiley <[hidden email]>wrote:

> Hi Colin,
>
> I have never heard of a binomial distribution z statistic with (or
> without for that matter) a continuity correction, but I am not a
> statistician.  Other's may have some ideas there.  As for other ways
> to analyze the data, I skimmed through the article and brought the
> data and played around with some different analyses and graphs.  I
> attached a file headache.txt with all the R script (including the data
> in an Rish format).  It is really a script file (i.e., .R) but for the
> listservs sake I saved it as a txt.  There are quite a few different
> things I tried in there so hopefully it gives you some ideas.
> Regardless of the analysis type used and whether one considers
> proportion that "significantly improved" or the raw frequency or
> intensity scores, I would say that concluding the treatment was
> effective is a good conclusion.  The only real concern could be that
> people would naturally get better on their own (a control group would
> be needed to bolster the causal inference drawn from a pre/post
> measurement).  However, given at least what I know about migraines, it
> is often a fairly chronic condition so over a relatively short time
> period, it seems implausible to conclude that as many people would be
> improving as this study reported.
>
> Cheers,
>
> Josh
>
> On Sat, Nov 19, 2011 at 7:43 PM, Colstat <[hidden email]> wrote:
> > hey, Joshua
> > I was reading this paper, in attachment, and reproducing the results.
> >
> > I was really confused when he said in the paper "The results were then
> > statistically analyzed using binomial distribution z statistics with
> > continuity correction."  The data is binomial?  To me, this is a paired
> > t-test.
> >
> > What command should I use to get those results (the first paragraph in
> > Results section)?  Basically, it's a pre and post treatment problem.
> >
> > What other graphical analysis do you think is appropriate? reshape
> package?
> > lattice package, namely conditional graph?
> >
> > I know this might be too much, but I do really appreciate it if you do
> take
> > a look at it.
> >
> > Thanks,
> > Colin
> >
> >
> > On Sat, Nov 19, 2011 at 10:15 PM, Joshua Wiley <[hidden email]>
> > wrote:
> >>
> >> Hi,
> >>
> >> I am not clear what your goal is.  There is a variety of data there.
> >> You could look at t-test differences in preIntensity broken down by
> >> sex, you could use regression looking at postIntensity controlling for
> >> preIntensity and explained by age, you could....
> >>
> >> Why are you analyzing data from an article?  What did the article do?
> >> What you mention---some sort of z statistic (what exactly this was of
> >> and how it should be calculated did not seem like was clear even to
> >> you), histogram, t-test, lattice, are all very different things that
> >> help answer different questions, show different things, and in one is
> >> a piece of software.
> >>
> >> Without a clearer question and goal, my best advice is here are a
> >> number of different functions some of which may be useful to you:
> >>
> >> ls(pos = "package:stats")
> >>
> >> Cheers,
> >>
> >> Josh
> >>
> >> On Sat, Nov 19, 2011 at 3:01 PM, Colstat <[hidden email]> wrote:
> >> > Dear R experts,
> >> >
> >> > I am trying to analyze data from an article, the data looks like this
> >> >
> >> > Patient Age Sex Aura preCSM preFreq preIntensity postFreq
> postIntensity
> >> > postOutcome
> >> > 1 47 F A 4 6 9 2 8 SD
> >> > 2 40 F A/N 5 8 9 0 0 E
> >> > 3 49 M N 5 8 9 2 6 SD
> >> > 4 40 F A 5 3 10 0 0 E
> >> > 5 42 F N 5 4 9 0 0 E
> >> > 6 35 F N 5 8 9 12 7 NR
> >> > 7 38 F A 5 NA 10 2 9 SD
> >> > 8 44 M A 4 4 10 0 0 E
> >> > 9 47 M A 4 5 8 2 7 SD
> >> > 10 53 F A 5 3 10 0 0 E
> >> > 11 41 F N 5 6 7 0 0 E
> >> > 12 49 F A 4 6 8 0 0 E
> >> > 13 48 F A 5 4 8 0 0 E
> >> > 14 63 M N 4 6 9 15 9 NR
> >> > 15 58 M N 5 9 7 2 8 SD
> >> > 16 53 F A 4 3 9 0 0 E
> >> > 17 47 F N 5 4 8 1 4 SD
> >> > 18 34 F A NA  5 9 0 0 E
> >> > 19 53 F N 5 4 9 5 7 NR
> >> > 20 45 F N 5 5 8 5 4 SD
> >> > 21 30 F A 5 3 8 0 0 E
> >> > 22 29 F A 4 5 9 0 0 E
> >> > 23 49 F N 5 9 10 0 0 E
> >> > 24 24 F A 5 5 9 0 0 E
> >> > 25 63 F N 4 19 7 10 7 NR
> >> > 26 62 F A 5 8 9 11 9 NR
> >> > 27 44 F A 5 3 10 0 0 E
> >> > 28 38 F N 4 8 10 1 3 SD
> >> > 29 38 F N 5 3 10 0 0 E
> >> >
> >> > How do I do a binomial distribution z statistics with continuity
> >> > correction? basically normal approximation.
> >> > Could anyone give me some suggestions what I (or R) can do with these
> >> > data?
> >> > I have tried tried histogram, maybe t-test? or even lattice?  what
> else
> >> > can
> >> > I(or can R) do?
> >> > help please, thanks so much.
> >> >
> >> >        [[alternative HTML version deleted]]
> >> >
> >> > ______________________________________________
> >> > [hidden email] mailing list
> >> > https://stat.ethz.ch/mailman/listinfo/r-help
> >> > PLEASE do read the posting guide
> >> > http://www.R-project.org/posting-guide.html
> >> > and provide commented, minimal, self-contained, reproducible code.
> >> >
> >>
> >>
> >>
> >> --
> >> Joshua Wiley
> >> Ph.D. Student, Health Psychology
> >> Programmer Analyst II, ATS Statistical Consulting Group
> >> University of California, Los Angeles
> >> https://joshuawiley.com/
> >
> >
>
>
>
> --
> Joshua Wiley
> Ph.D. Student, Health Psychology
> Programmer Analyst II, ATS Statistical Consulting Group
> University of California, Los Angeles
> https://joshuawiley.com/
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Data analysis: normal approximation for binomial

colstat
In reply to this post by John Kane-2
Hey, John

I like the explicit formula they put in there.  I looked around last night
and found this
http://www.stat.yale.edu/Courses/1997-98/101/binom.htm

which is basically normal approximation to the binomial, I thought that was
what the author was trying to get at?

Colin

On Sun, Nov 20, 2011 at 8:49 AM, John Kane <[hidden email]> wrote:

> Hi Colin,
>
> I'm no statistician and it's been a very long time but IIRC a t-test is a
> 'modified version of a x-test that is used on small sample sizes.  (I can
> hear some of our statistians screaming in the background as I type.)
>
> In any case I thing a Z distribution is descrete and a standard normal is
> not so a user can use Yates continuity correction to interpolate values for
> the normal between the discrete z-values.  Or something like this.
>
> I have only encountered it once in a Psych stats course taught by an
> animal geneticist who seemed to think it was important. To be honest, it
> looked pretty trivial for the type of data I'd be likely to see.
>
> I cannot remember ever seeing a continuity correction used in a published
> paper--for that matter I have trouble remembering a z-test.
>
> If you want more information on the subject I found a very tiny bit of
> info at
> http://books.google.ca/books?id=SiJ2UB3dv9UC&pg=PA139&lpg=PA139&dq=z-test+with+continuity+correction&source=bl&ots=0vMTCUZWXx&sig=bfCPx0vynGjA0tHLRAf6B42x0mM&hl=en&ei=nQHJTo7LPIrf0gHxs6Aq&sa=X&oi=book_result&ct=result&resnum=2&ved=0CC0Q6AEwAQ#v=onepage&q=z-test%20with%20continuity%20correction&f=false
>
> A print source that, IIRC, has a discussion of this is "Hayes, W. (1981.
> Statistics. 3rd Ed., Holt Rinehart and Winston
>
> Have fun
>
> --- On Sat, 11/19/11, Colstat <[hidden email]> wrote:
>
> > From: Colstat <[hidden email]>
> > Subject: [R] Data analysis: normal approximation for binomial
> > To: [hidden email]
> > Received: Saturday, November 19, 2011, 6:01 PM
> > Dear R experts,
> >
> > I am trying to analyze data from an article, the data looks
> > like this
> >
> > Patient Age Sex Aura preCSM preFreq preIntensity postFreq
> > postIntensity
> > postOutcome
> > 1 47 F A 4 6 9 2 8 SD
> > 2 40 F A/N 5 8 9 0 0 E
> > 3 49 M N 5 8 9 2 6 SD
> > 4 40 F A 5 3 10 0 0 E
> > 5 42 F N 5 4 9 0 0 E
> > 6 35 F N 5 8 9 12 7 NR
> > 7 38 F A 5 NA 10 2 9 SD
> > 8 44 M A 4 4 10 0 0 E
> > 9 47 M A 4 5 8 2 7 SD
> > 10 53 F A 5 3 10 0 0 E
> > 11 41 F N 5 6 7 0 0 E
> > 12 49 F A 4 6 8 0 0 E
> > 13 48 F A 5 4 8 0 0 E
> > 14 63 M N 4 6 9 15 9 NR
> > 15 58 M N 5 9 7 2 8 SD
> > 16 53 F A 4 3 9 0 0 E
> > 17 47 F N 5 4 8 1 4 SD
> > 18 34 F A NA  5 9 0 0 E
> > 19 53 F N 5 4 9 5 7 NR
> > 20 45 F N 5 5 8 5 4 SD
> > 21 30 F A 5 3 8 0 0 E
> > 22 29 F A 4 5 9 0 0 E
> > 23 49 F N 5 9 10 0 0 E
> > 24 24 F A 5 5 9 0 0 E
> > 25 63 F N 4 19 7 10 7 NR
> > 26 62 F A 5 8 9 11 9 NR
> > 27 44 F A 5 3 10 0 0 E
> > 28 38 F N 4 8 10 1 3 SD
> > 29 38 F N 5 3 10 0 0 E
> >
> > How do I do a binomial distribution z statistics with
> > continuity
> > correction? basically normal approximation.
> > Could anyone give me some suggestions what I (or R) can do
> > with these data?
> > I have tried tried histogram, maybe t-test? or even
> > lattice?  what else can
> > I(or can R) do?
> > help please, thanks so much.
> >
> >     [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [hidden email]
> > mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained,
> > reproducible code.
> >
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Data analysis: normal approximation for binomial

John Kane-2
You need a statistician or at least someone who's take a stats course in the last 10 years but it may be what the author was trying to get at. 

At least the binomial is descrete as is
the z so it may be that the z was used as easier to calculate than a binomial?  How old is the paper. Before, let's say the early 1980s a lot of people were still doing stats by hand (IIRC, even calculators were relatively expensive and rare and calculating a binomial of any size was close to impractical.-- I tried it once).  So using a z-distribution with Yates correction made sense.

It's a little like early factor analysis when rotate the factors actually meant rotate the glass plates.


--- On Sun, 11/20/11, Colstat <[hidden email]> wrote:

From: Colstat <[hidden email]>
Subject: Re: [R] Data analysis: normal approximation for binomial
To: "John Kane" <[hidden email]>
Cc: [hidden email]
Received: Sunday, November 20, 2011, 10:10 PM

Hey, John

I like the explicit formula they put in there.  I looked around last night and found this
http://www.stat.yale.edu/Courses/1997-98/101/binom.htm





which is basically normal approximation to the binomial, I thought that was what the author was trying to get at?

Colin

On Sun, Nov 20, 2011 at 8:49 AM, John Kane <[hidden email]> wrote:




Hi Colin,



I'm no statistician and it's been a very long time but IIRC a t-test is a 'modified version of a x-test that is used on small sample sizes.  (I can hear some of our statistians screaming in the background as I type.)







In any case I thing a Z distribution is descrete and a standard normal is not so a user can use Yates continuity correction to interpolate values for the normal between the discrete z-values.  Or something like this.







I have only encountered it once in a Psych stats course taught by an animal geneticist who seemed to think it was important. To be honest, it looked pretty trivial for the type of data I'd be likely to see.



I cannot remember ever seeing a continuity correction used in a published paper--for that matter I have trouble remembering a z-test.



If you want more information on the subject I found a very tiny bit of info at http://books.google.ca/books?id=SiJ2UB3dv9UC&pg=PA139&lpg=PA139&dq=z-test+with+continuity+correction&source=bl&ots=0vMTCUZWXx&sig=bfCPx0vynGjA0tHLRAf6B42x0mM&hl=en&ei=nQHJTo7LPIrf0gHxs6Aq&sa=X&oi=book_result&ct=result&resnum=2&ved=0CC0Q6AEwAQ#v=onepage&q=z-test%20with%20continuity%20correction&f=false







A print source that, IIRC, has a discussion of this is "Hayes, W. (1981. Statistics. 3rd Ed., Holt Rinehart and Winston



Have fun



--- On Sat, 11/19/11, Colstat <[hidden email]> wrote:



> From: Colstat <[hidden email]>

> Subject: [R] Data analysis: normal approximation for binomial

> To: [hidden email]

> Received: Saturday, November 19, 2011, 6:01 PM

> Dear R experts,

>

> I am trying to analyze data from an article, the data looks

> like this

>

> Patient Age Sex Aura preCSM preFreq preIntensity postFreq

> postIntensity

> postOutcome

> 1 47 F A 4 6 9 2 8 SD

> 2 40 F A/N 5 8 9 0 0 E

> 3 49 M N 5 8 9 2 6 SD

> 4 40 F A 5 3 10 0 0 E

> 5 42 F N 5 4 9 0 0 E

> 6 35 F N 5 8 9 12 7 NR

> 7 38 F A 5 NA 10 2 9 SD

> 8 44 M A 4 4 10 0 0 E

> 9 47 M A 4 5 8 2 7 SD

> 10 53 F A 5 3 10 0 0 E

> 11 41 F N 5 6 7 0 0 E

> 12 49 F A 4 6 8 0 0 E

> 13 48 F A 5 4 8 0 0 E

> 14 63 M N 4 6 9 15 9 NR

> 15 58 M N 5 9 7 2 8 SD

> 16 53 F A 4 3 9 0 0 E

> 17 47 F N 5 4 8 1 4 SD

> 18 34 F A NA  5 9 0 0 E

> 19 53 F N 5 4 9 5 7 NR

> 20 45 F N 5 5 8 5 4 SD

> 21 30 F A 5 3 8 0 0 E

> 22 29 F A 4 5 9 0 0 E

> 23 49 F N 5 9 10 0 0 E

> 24 24 F A 5 5 9 0 0 E

> 25 63 F N 4 19 7 10 7 NR

> 26 62 F A 5 8 9 11 9 NR

> 27 44 F A 5 3 10 0 0 E

> 28 38 F N 4 8 10 1 3 SD

> 29 38 F N 5 3 10 0 0 E

>

> How do I do a binomial distribution z statistics with

> continuity

> correction? basically normal approximation.

> Could anyone give me some suggestions what I (or R) can do

> with these data?

> I have tried tried histogram, maybe t-test? or even

> lattice?  what else can

> I(or can R) do?

> help please, thanks so much.

>

>     [[alternative HTML version deleted]]

>

> ______________________________________________

> [hidden email]

> mailing list

> https://stat.ethz.ch/mailman/listinfo/r-help

> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

> and provide commented, minimal, self-contained,

> reproducible code.

>




        [[alternative HTML version deleted]]


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.