[R] Creating data for logistic regression and Cox proportional hazards regression

Frank E Harrell Jr f.harrell at vanderbilt.edu
Mon Nov 13 23:16:44 CET 2006

John Sorkin wrote:
> I know that mvrnorm from MASS (generously provided by Profs. Venables
> and Ripley) can be used to generate multivariable normal data that can
> be used in a linear regression with certain desired characteristics
> (e.g. a given mean for each variable as well as a given
> variance-covariance pattern). Is there any similar facility that can be
> used to generate data for (1) a logistic regression and (2) a Cox
> proportional hazards regression?  
> Thanks,
> John

See the examples in the help file for the lrm and cph functions in the 
Design package as well as in the spower function in the Hmisc package.


> John Sorkin M.D., Ph.D.

More information about the R-help mailing list