View source: R/gen_blocked_data.R
form_blocks_from_continuous | R Documentation |
Make blocks out of a continuous covariate by cutting it into pieces that are ideally relatively homogenous. This will create a bunch of blocks based on passed covariate and return a factor vector of those blocks.
form_blocks_from_continuous(
X,
method = c("small", "pair", "big", "none"),
num.blocks
)
X |
covariate vector to block on |
method |
How to block. "small" "pair" makes matched pairs. "big" makes as many blocks of at least 4 as possible, trying to keep blocks small. "none" makes a single block. |
num.blocks |
If method is small, how many blocks to attempt to make |
Vector with one element per element of 'X'
table( form_blocks_from_continuous( 1:22, method="small" ) )
table( form_blocks_from_continuous( 1:22, method="big", num.blocks=3 ) )
table( form_blocks_from_continuous( 1:22, method="pair" ) )
table( form_blocks_from_continuous( 1:22, method="none" ) )
table( form_blocks_from_continuous( 1:22, method="big" ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.