PartitionSample: Partition Sample

Description Usage Arguments

View source: R/PartitionSample.R

Description

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.

Usage

1
2
PartitionSample(study.sample, outcome.variable.name = "composite",
  n.partitions = 2, train.size = 0.6)

Arguments

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


citronmeliss/predictionpackr documentation built on Feb. 10, 2020, 12:19 a.m.