R/support.R

Defines functions autocorr.mat

autocorr.mat <- function(p = 1000, rho = 0.3) {
    mat <- diag(p)
    res = rho^abs(row(mat)-col(mat))
    res[abs(row(mat)-col(mat)) >=3] = 0
    return(res)
    
}
ChongWu-Biostat/aispu documentation built on Jan. 4, 2020, 1:23 a.m.