Re: [R] How to test a difference in ratios of count data in R

2016-09-30 Thread David Winsemius
ged in more recent versions of package lme4 that I find it very error prone to use. I wish the effort to write a replacement had continued but my searches have suggested to me that it has not happened. I'd be happy to be corrected. Best; David. > Joshua > > > From: David

Re: [R] How to test a difference in ratios of count data in R

2016-09-30 Thread Shuhua Zhan
tember 28, 2016 4:54:46 PM To: Shuhua Zhan Cc: r-help@R-project.org; Greg Snow Subject: Re: [R] How to test a difference in ratios of count data in R > On Sep 28, 2016, at 9:49 AM, Greg Snow <538...@gmail.com> wrote: > > There are multiple ways of doing this, but here are a couple. &g

Re: [R] How to test a difference in ratios of count data in R

2016-09-29 Thread Greg Snow
if. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > Correlation of Fixed Effects: >(Intr) > treatmentB -0.568 > > Thanks again, > Joshua > > ________________ > From: Greg Snow <538...@gmail.com> > Sent: Wednesday, September 28, 2

Re: [R] How to test a difference in ratios of count data in R

2016-09-28 Thread David Winsemius
> On Sep 28, 2016, at 9:49 AM, Greg Snow <538...@gmail.com> wrote: > > There are multiple ways of doing this, but here are a couple. > > To just test the fixed effect of treatment you can use the glm function: > > test <- read.table(text=" > replicate treatment n X > 1 A 32 4 > 1 B 33 18 > 2 A

Re: [R] How to test a difference in ratios of count data in R

2016-09-28 Thread Greg Snow
There are multiple ways of doing this, but here are a couple. To just test the fixed effect of treatment you can use the glm function: test <- read.table(text=" replicate treatment n X 1 A 32 4 1 B 33 18 2 A 20 6 2 B 21 18 3 A 7 0 3 B 8 4 ", header=TRUE) fit1 <- glm( cbind(X,n-X) ~ treatment, da

[R] How to test a difference in ratios of count data in R

2016-09-27 Thread Shuhua Zhan
Hello R-experts, I am interested to determine if the ratio of counts from two groups differ across two distinct treatments. For example, we have three replicates of treatment A, and three replicates of treatment B. For each treatment, we have counts X from one group and counts Y from another gro