CorrStructure | R Documentation |
Functions to create autocorrelation matrix (p by p) with parameter rho and block correlation matrix (p by p) using group index (of length p) and (possibly) different parameter rho for each group.
autocor(p, rho) blockcor(blockind, rho)
p |
Specified matrix dimension. |
rho |
Correlation value(s), must be between -0.99 and 0.99. Should be a scalar for |
blockind |
Block index 1,..., K for a positive integer K specifying which variable belongs to which block, the matrix dimension is equal to |
# For p = 8, # auto correlation matrix autocor(8, 0.8) # block correlation matrix: two blocks with the same correlation within each block blockcor(c(rep(1,3), rep(2,5)), 0.8) # block correlation matrix: two blocks with different correlation within each block blockcor(c(rep(1,3), rep(2,5)), c(0.8, 0.3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.