Dear All,

Can anyone provide me with reference notes(or steps) towards analysis of  
(un)balanced panel data in R.


Thank you!







Kind regards,
  Tabitha Mundia ,      Project Management  Office,       Equity Bank 
Limited,P.O. Box 75104-00200
       Head Office, Upper  hill,       NHIF BLDG, 14th  Floor,   Nairobi, Kenya 
             Direct Extension : +254732112721          Mobile: +254722309538  
     Email: tabitha.mun...@equitybank.co.keskype ID: twamaeYahoo ID: 
tabygath...@yahoo.com


An idea not coupled with action will never get any bigger than the brain cell 
it occupied.
Arnold Glasgow
......
"Attempt something large enough that failure is guaranteed…unless God steps 
in!"


--- On Wed, 12/29/10, Manoj Aravind <aravin...@gmail.com> wrote:

From: Manoj Aravind <aravin...@gmail.com>
Subject: Re: [R] Problem applying McNemar's - Different values in SPSS and R
To: "Marc Schwartz" <marc_schwa...@me.com>
Cc: r-help@r-project.org
Date: Wednesday, December 29, 2010, 2:48 PM

Thank you Marc :)
It Certainly helped me to get the exact value of P.
How to understand when to apply mcnemar.exact or just mcnemar.test?
I'm a beginner to biostatistics.

Manoj Aravind

On Tue, Dec 28, 2010 at 11:00 PM, Marc Schwartz <marc_schwa...@me.com>wrote:

>
> On Dec 28, 2010, at 11:05 AM, Manoj Aravind wrote:
>
> > Hi friends,
> > I get different values for McNemar's test in R and SPSS. Which one should
> i
> > rely on when the p values differ.
> > I came across this problem when i started learning R and seriously give
> up
> > on SPSS or any other proprietary software.
> > Thank u in advance
> >
> > Output in SPSS follows
> >
> > *Crosstab*
> >
> >
> >               hsc
> >
> > Total
> >
> >     ABN
> >
> > NE
> >
> > ABN
> >
> > tvs
> >
> > ABN
> >
> > Count
> >
> > 40
> >
> > 3
> >
> > 43
> >
> >     Row %
> >
> > 93.0%
> >
> > 7.0%
> >
> > 100.0%
> >
> >     COL%
> >
> > 78.4%
> >
> > 30.0%
> >
> > 70.5%
> >
> >  NE
> >
> > Count
> >
> > 11
> >
> > 7
> >
> > 18
> >
> >     Row %
> >
> > 61.1%
> >
> > 38.9%
> >
> > 100.0%
> >
> >     COL%
> >
> > 21.6%
> >
> > 70.0%
> >
> > 29.5%
> >
> > Total
> >
> > Count
> >
> > 51
> >
> > 10
> >
> > 61
> >
> >  Row %
> >
> > 83.6%
> >
> > 16.4%
> >
> > 100.0%
> >
> >  COL%
> >
> > 100.0%
> >
> > 100.0%
> >
> > 100.0%
> >
> >
> >
> > * Chi-Square Tests*
> >
> >
> >      Value
> >
> > Exact Sig. (2-sided)
> >
> > McNemar Test
> >
> >  .057(a)
> >
> > N of Valid Cases
> >
> > 61
> >
> >   a Binomial distribution used.
> >
> > Output from R is as follows....
> >
> >> tvshsc<-
> >
> > + matrix(c(40,11,3,7),
> >
> > + nrow=2,
> >
> > + dimnames=list("TVS"=c("ABN","NE"),
> >
> > + "HSC"=c("ABN","NE")))
> >
> >> tvshsc
> >
> >     HSC
> >
> > TVS   ABN NE
> >
> >  ABN  40  3
> >
> >  NE   11  7
> >
> >> mcnemar.test(tvshsc)
> >
> >
> > McNemar's Chi-squared test with continuity correction
> >
> >
> > data:  tvshsc
> >
> > McNemar's chi-squared = 3.5, df = 1, p-value = 0.06137
> >
> > Regards
> >
> > Dr. B Manoj Aravind
>
>
> The SPSS test appears to be an exact test, whereas the default R function
> does not perform an exact test, so you are not comparing Apples to Apples...
>
> Try this using the 'exact2x2' CRAN package:
>
> > require(exact2x2)
> Loading required package: exact2x2
> Loading required package: exactci
>
> > mcnemar.exact(matrix(c(40, 11, 3, 7), 2, 2))
>
>        Exact McNemar test (with central confidence intervals)
>
> data:  matrix(c(40, 11, 3, 7), 2, 2)
> b = 3, c = 11, p-value = 0.05737
> alternative hypothesis: true odds ratio is not equal to 1
> 95 percent confidence interval:
>  0.04885492 1.03241985
> sample estimates:
> odds ratio
>  0.2727273
>
>
> HTH,
>
> Marc Schwartz
>
>

    [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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]]

______________________________________________
R-help@r-project.org 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 via email to