Dear R-users,

I have a data set where each observation consists of a number of trials
(n.trials) that varies between 5 and 7, 6 being most common. Each trial
can take either of two outcomes, success or failure.

A dummy data set:
n.trials <- sample(5:7, 50, replace=T, prob=c(0.2, 0.6, 0.2))
success <- rbinom(50, n.trials, p=0.5)
failure <- n.trials - success

I know I could test for a deviation from 50:50 success:failure in one or
the other direction using a glm with binomial errors. However, I
suspect that in my 'real' data set the outcome 50:50 is
underrepresented, not due to a skew in one particular direction, but
rather that within each observation there are either many successes or
many failures. Although I did not manage to create a dummy data set
with these properties, which would be the proper way in R to test for a
'lack of 50:50 outcome' using the simple dummy data above as a starting
point?

Thanks in advance!

Henrik

--

______________________________________________
R-help@stat.math.ethz.ch 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