Description Usage Arguments Value Examples
This object is can be used to create a SingleSim
object with
subject specific rates
1 | MakeDejaData(data, arm, Id, rate = NULL)
|
data |
A data frame containing the subject |
arm, |
character the column name of the treatment arm for each subject |
Id, |
character the column name of subject Id |
rate, |
character the column name of the rate to be used when simulating (or NULL,
if using DejaData to import a data set, see |
A DejaData
object
1 2 3 4 5 6 7 8 9 | set.seed(232)
my.df <- data.frame(Id=1:100,
arm=c(rep(0,50),rep(1,50)),
covar=rbinom(n=100,size=1,prob=0.5))
my.df$rate <- 0.0025 + my.df$covar*0.002 + (1-my.df$arm)*0.002
my.dejaData <- MakeDejaData(my.df,arm="arm",rate="rate",Id="Id")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.