View source: R/weight_design.R
weight_design | R Documentation |
Creates all the possible matrices given a number of blocks and a number of weights. Optionally it can create just a subset of those based on a numeric vector.
weight_design(weights = 4, size, diff0 = NULL)
weights |
A numeric value with the number of weights to be used |
size |
A numeric value with the number of datasets on the design. |
diff0 |
A Numeric vector of position which should be different from 0
from the |
A list of matrices with the designs with different weights.
Flodel: https://codereview.stackexchange.com/a/203517/36067
subSymm()
out <- weight_design(4, 4) head(out) # Using previously defined matrix C <- diag(4) diag(C) <- 0 C <- subSymm(C, 1, 2, 0.456) C <- subSymm(C, 2, 3, runif(1)) C <- subSymm(C, 1, 3, runif(1)) C <- subSymm(C, 3, 4, runif(1)) # Explore matrices which are similar to C d <- weight_design(weights = 11, size = 4, which(lower.tri(C) & C != 0)) head(d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.