Skip to content
Prev 353473 / 398502 Next

compare grupos dichotomus dependent variable

Hi Aurora,
Perhaps what you are seeking is a test of proportions.

prop.test(c(sum(men),sum(women)),c(length(men),length(women)))

        2-sample test for equality of proportions with continuity correction

data:  c(sum(men), sum(women)) out of c(length(men), length(women))
X-squared = 1.0378e-30, df = 1, p-value = 1
alternative hypothesis: two.sided
95 percent confidence interval:
 -0.02903701  0.01046116
sample estimates:
     prop 1      prop 2
0.000000000 0.009287926

Warning message:
In prop.test(c(sum(men), sum(women)), c(length(men), length(women))) :
  Chi-squared approximation may be incorrect

If the question was "Have you had a baby in the past year?" the answer
is not too far off, but your sample is a bit small.

Jim


On Sat, Aug 8, 2015 at 3:09 AM, AURORA GONZALEZ VIDAL
<aurora.gonzalez2 at um.es> wrote: