[R] correlated binary data and overall probability
t.c.l at gmx.net
Thu Oct 29 10:55:24 CET 2009
I try to simulate correlated binary data for a clinical research project.
Unfortunately, I do not come to grips with bindata().
[this format might be more appropriate:]
Now, I want to add one column 'outcome' for the binary response:
* within each 'task', the probabilty of success (1) is fixed, (say rbinom(x,1,0.7))
* within each 'ID', the outcomes are correlated (say 0.8)
How can I generate this column 'outcome' with the given proporties?
Many thanks for hints or even code!
More information about the R-help