R/A.R

Defines functions A

Documented in A

"Acoef" <-
function (x) 
{
    if (!(class(x) == "varest")) {
        stop("\nPlease provide an object of class 'varest', generated by 'var()'.\n")
    }
    K <- x$K
    p <- x$p
    A <- Bcoef(x)[, 1:(K*p)]
    As <- list()
    start <- seq(1, p * K, K)
    end <- seq(K, p * K, K)
    for (i in 1:p) {
        As[[i]] <- matrix(A[, start[i]:end[i]], nrow = K, ncol = K)
        rownames(As[[i]]) <- rownames(A)
        colnames(As[[i]]) <- colnames(A[, start[i]:end[i]])
    }
    return(As)
}
A <- function(x){
  .Deprecated("Acoef", package = "vars", msg = "Function 'A' is deprecated; use 'Acoef' instead.\nSee help(\"vars-deprecated\") and help(\"A-deprecated\") for more information.")
  Acoef(x = x)
}
cheaton/vars2 documentation built on Oct. 1, 2018, 12:22 a.m.