permute_study: Create a data frame with group_name assignments permuted...

Description Usage Arguments Value Author(s) References Examples

View source: R/permute_study.R

Description

Create a data frame with group_name assignments permuted randomly with respect to the subject_ID values.

Usage

1
2
3
4
5
6
7
permute_study(
  data_frame,
  random_seed = NULL,
  group_name = maeve_options("group_name"),
  subject_ID = maeve_options("subject_ID"),
  x_name = maeve_options("x_name")
)

Arguments

data_frame

data frame with factors for group and ID, numerics for time on study and response.

random_seed

numeric passed to base::set.seed()

group_name

character. See ?maeve_options().

subject_ID

character. See ?maeve_options().

x_name

character. See ?maeve_options().

Value

A data.frame

Author(s)

Bill Forrest <forrest@gene.com>

Bill Forrest forrest@gene.com

References

www.r-project.org

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 cat('Example for permute_study() in dontrun{} code block.')
 ## Not run: 
 data( vismodegib )
 vismo30 <- dplyr::filter( vismodegib, DAY_OF_STUDY <= 30 )
 vismo30 <- dplyr::mutate( vismo30, y = log( 1 + TUMOR_VOLUME ) )
 vismo30_permuted <- permute_study( vismo30, random_seed = 12345 )
 ## see outcome of permutation:
 fig_vismo_orig <- draw_study( vismo30,          ncol_value = 5, endpoint_name = 'y' )
 fig_vismo_perm <- draw_study( vismo30_permuted, ncol_value = 5, endpoint_name = 'y' )

## End(Not run)

wfforrest/maeve documentation built on Jan. 1, 2021, 12:47 p.m.