sampleData | R Documentation |
Simulate data with binary outcome and 10 covariates.
sampleData(n,outcome="competing.risks",
formula= ~ f(X1,2)+f(X2,-0.033)+f(X3,0.4)+f(X6,.1)+f(X7,-.1)+f(X8,.5)+f(X9,-1),
intercept=0)
sampleDataTD(n,n.intervals=5,outcome="competing.risks",
formula= ~ f(X1,2)+f(X2,-0.033)+f(X3,0.4)+f(X6,.1)+f(X7,-.1)+f(X8,.5)+f(X9,-1))
n |
Sample size |
outcome |
Character vector. Response variables are generated
according to keywords: |
formula |
Specify regression coefficients |
intercept |
For binary outcome the intercept of the logistic regression. |
n.intervals |
|
For the actual lava::regression parameters see the function definition.
Simulated data as data.table with n rows and the following columns: Y (binary outcome), time (non-binary outcome), event (non-binary outcome), X1-X5 (binary predictors), X6-X10 (continous predictors)
Thomas A. Gerds <tag@biostat.ku.dk>
lvm
set.seed(10)
sampleData(10,outcome="binary")
sampleData(10,outcome="survival")
sampleData(10,outcome="competing.risks")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.