3

I am doing my undergraduate project and have tested a drug on cells for a responce. The data I have collected shows that the cells either produced a responce, or they did not. Binomial data?

Control 0ug/mL      22  3053
Control2 (DMSO)     15  2807
5ug/mL rapamycin    12  3070
10ug/mL rapamycin   7   2806

The first number is the number of cells that produced the responce, and the second number is the total number of cells tested.

I'm trying to work out the test I can use to see if the results between the groups are significant. I was think a Fisher's exact test, but I wasn't sure if that was just for 2x2 tables. Would a chi sq test be sufficient?

Gala
  • 8,323
  • 2
  • 28
  • 42
user25203
  • 31
  • 1

3 Answers3

3

You can use a logistic regression.

dat.text <- "Treatment x n
Control1      22  3053
Control2     15  2807
5ug    12  3070
10ug   7   2806"

dat <- read.table(text=dat.text,header=TRUE)

fit <- glm(cbind(x,n-x)~0+Treatment, data=dat, family="binomial")
summary(fit)

Then use the multcomp package to get confidence intervals and multiple comparisons:

library(multcomp)
plot(confint(glht(fit)))  # confidence intervals of logit(p)

The lsmeans package is useful too. It has a convenient syntax for multiple comparisons:

library(lsmeans)
lsmeans(fit, pairwise~Treatment)

Actually it is interesting to jointly use multcompand lsmeans. For instance the following code provides the same results as the previous one:

M <- lsmeans(fit, pairwise~Treatment, lf=TRUE)[[2]] # extract the matrix of pairwise comparisons
summary(glht(fit, linfct=M))
Stéphane Laurent
  • 17,425
  • 5
  • 59
  • 101
  • 1
    I think you want `fit – C8H10N4O2 Oct 02 '15 at 18:03
  • You're welcome. By the way I posted a [question](http://stats.stackexchange.com/questions/175223/approaches-to-compare-differences-in-means-with-differences-in-proportions) today about group differences that has very low views -- I would much appreciate if you could take a look! Cheers – C8H10N4O2 Oct 02 '15 at 19:05
2

In R, you can use

prop.test(x=c(22, 15, 12, 7), n=c(3053, 2807, 3070, 2806))

to compare the four proportions. Or as you noted, a $\chi^2$-Test can also be used:

m <- matrix(c(22, 15, 12, 7, 3053-22, 2807-15, 3070-12, 2806-7), 2, 4, byrow=T)
chisq.test(m)

The results are exactly the same.

COOLSerdash
  • 25,317
  • 8
  • 73
  • 123
0

You just have a binomial experiment, so your confidence interval is given by Binomial proportion confidence interval. After you calculate them you can figure out if the intervals overlap or not.

sashkello
  • 2,198
  • 1
  • 20
  • 26