Description Usage Arguments Details Value References
View source: R/regression_functions.R
An alternative version of ri::genperms. Given user-input vectors of
clusters or blocks, generate an exact permutation matrix, or a randomly
sampled permutation matrix if the number of actual permutations is too high.
Improves upon ri::genperms by allowing permutation of non-binary
vectors.
1 |
x |
a vector to be permuted. Can be continuous |
block |
a vector of equal length as |
clus |
a vector of equal length as |
maxiter |
maximum number of permutations to be included in the permutation matrix. If it is possible to perform exact permutation with fewer permutations, then the exact permutation matrix is produced. |
Unlike its counterpart in the ri package, this function can perform
permutation of input vectors that are not binary. It also accepts as
arguments for blockvar and clustvar other data types than
integer. genperms is primarily based on the permute
package.
A permutation matrix where each row is a permutation of the input
vector x
Gerber, Alan S. and Donald P. Green. 2012. Field Experiments: Design, Analysis, and Interpretation. New York: W.W. Norton.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.