Description Usage Arguments Examples
Creates information of a covariate that represents a random sample (with replacement) of the provided values.
This function call must be added to the md.simparams
object.
1 |
name |
name of the covariate |
array |
vector of elements from which to choose from |
weights |
vector of probability weights for obtaining the elements of the vector being sampled or NULL if all values have equal probabilities |
1 2 3 4 5 6 7 | ## Not run:
library(missDeaths)
sim = md.simparams() +
md.sample("X", c(0, 1, 2), c(0.2, 0.3, 0.5))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.