> To: r-help@r-project.org
> Subject: [R] simulate data with binary outcome and correlated
> predictors
>
> Hi,
>
> I would like to simulate data with a binary outcome and a set of
> predictors that are correlated. I want to be able to fix the number of
> event (Y=1) vs
Hi,
I would like to simulate data with a binary outcome and a set of predictors
that are correlated. I want to be able to fix the number of event (Y=1) vs.
non-event (Y=0). Thus, I fix this and then simulate the predictors. I have 2
questions:
1. When the predictors are continuous, I can use m
Dear R-Users,
I wish to simulate a binary outcome data set with
predictors (in the example below, age, sex and systolic BP). Is there a
way I can set the frequency of the outcome (y) to be say 5% (versus the
0.1% when using the seed below)?
# Example R-code based on Frank Harrell's De
3 matches
Mail list logo