John Sorkin
2006-Nov-13 22:00 UTC
[R] Creating data for logistic regression and Cox proportional hazards regression
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
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC,
University of Maryland School of Medicine Claude D. Pepper OAIC,
University of Maryland Clinical Nutrition Research Unit, and
Baltimore VA Center Stroke of Excellence
University of Maryland School of Medicine
Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)
jsorkin@grecc.umaryland.edu
Confidentiality Statement:
This email message, including any attachments, is for the so...{{dropped}}
Frank E Harrell Jr
2006-Nov-13 22:16 UTC
[R] Creating data for logistic regression and Cox proportional hazards regression
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, > JohnSee 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. Frank> > > John Sorkin M.D., Ph.D.
Reasonably Related Threads
- Coxph: solution for violation of proportional hazards assumption.
- Multivariable correlation
- Two ways to deal with age in Cox model
- regression analyses using a vector of means and a variance-covariance matrix
- Rcmdr installalation under Viata gives a warning. Do I need to do anything?