Displaying 1 result from an estimated 1 matches for "lagn".
Did you mean:
lag
2013 Oct 17
0
Singular Matrix 'a' in solve
...y, cf, lpop, linv, lgov, d1, llife each is in “375x1 double matrix”
yt and ct each is “300x1 double matrix”
(I use R Studio so these characteristics are stated).
*The lag_v() and tr() process is as below:*
max_lag <- 1
tt <- t-max_lag
ty <- n*(t-max_lag-1)
lag_v <- function(x,lagn){
yl <- matrix(c(0),nrow=n,ncol=t)
for (i in 1:n) {
yl[i,]<-x[(1+(i-1)*t):(t*i)]
}
yl <- yl[,(1+max_lag-lagn):(t-lagn)]
out <- matrix(t(yl),nrow=nrow(yl)*ncol(yl),ncol=1)
out
}
tr <- function(y){
yf <- matrix(c(0),nrow=n...