permute: Permute randomized treatment assignments

View source: R/utils.R

permuteR Documentation

Permute randomized treatment assignments

Description

permute returns data with treatment assigments permuted

Usage

permute(data, trtname, runit, strat = NULL)

Arguments

data

a data frame

trtname

character string specifying the name of randomized treatment variable in data (variable to permute)

runit

character string specifying the name of unit of randomization in data

strat

an optional character string specifying the name of the variable in data upon which randomization was stratified

Details

This function inputs a data frame and outputs the same data frame with the trtname column permuted according to the randomization scheme provided. This is a general utility function used within test and confidence interval functions.


djrabideau/permuter documentation built on Jan. 9, 2025, 11:45 p.m.