1 | bdiag(nb, np, rho = 0)
|
nb |
|
np |
|
rho |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (nb, np, rho = 0)
{
p <- nb * np
m <- matrix(0, p, p)
mat <- matrix(rho, np, np)
diag(mat) <- 1
ilow <- 1 - np
iup <- 0
for (i in 1:nb) {
ilow <- ilow + np
iup <- iup + np
m[ilow:iup, ilow:iup] <- mat
}
m
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.