Description Usage Arguments Examples

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.

1 2 3 |

`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 |

1 2 3 4 5 6 7 | ```
# 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))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.