View source: R/PartitionSample.R
Partitions the sample using stratified random sampling of the outcome of interest. Attempts to maintain class distribution as observed in the study sample. Accepted number of partitions are 2 or 3. If n.partitions is 3, 1 - train.size) / 2 is partitioned into both the validation and test sets.
1 2 | PartitionSample(study.sample, outcome.variable.name = "composite",
n.partitions = 2, train.size = 0.6)
|
study.sample |
Data frame. The study sample. No default |
outcome.variable.name |
Character vector of length 1. The name of the outcome variable of interest. Defaults to "s30d" |
n.partitions |
Numeric vector of length 1. The number of partitions to create. Either 2 of 3. If Defaults to 2. |
train.size |
Numeric vector of length 1. The proportion of the sample that goes into training set. Defaults to 0.6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.