stratify_data: stratify_by

View source: R/stratify_data.R

stratify_dataR Documentation

stratify_by

Description

this function provides a stratified dataset to be used by the split_data function.

Usage

stratify_data(randomized_data, groups)

Arguments

randomized_data

dataframe of the randomized data returned by the randomize function

groups

information on how the stratified data will be grouped (name of column, index of column, vector)

Examples

simulate_data(number_of_participants=10, covariance_matrix=diag(2), outcome_column=1, means=c(0,0))
randomized_data <- randomize(data=data, seed = 7)
stratified_data <- stratify_data(randomized_data=randomized_data,groups=groups)

DCAN-Labs/RFRF documentation built on March 15, 2024, 2:33 p.m.