Re: [R] simulate data with binary outcome and correlated predictors

2008-11-11 Thread Greg Snow
> 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

[R] simulate data with binary outcome and correlated predictors

2008-11-11 Thread Delphine COURVOISIER
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

[R] Simulate data with binary outcome

2008-07-15 Thread Steve Frost
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