diff options
Diffstat (limited to 'R/nonparam.R')
-rw-r--r-- | R/nonparam.R | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/R/nonparam.R b/R/nonparam.R index ad8254d..3096f3e 100644 --- a/R/nonparam.R +++ b/R/nonparam.R @@ -193,7 +193,7 @@ spa <- function(x,winsize=NULL,freq=NULL){ } G <- array(0,c(nout,nin,length(freq))) - spec <- array(0,c(nout,nout,length(freq))) + spec <- array(0,c(nout,1,length(freq))) for(i in 1:nout){ phi_y <- sapply(freq,cov2spec,Ryy[i,i,],M) temp <- phi_y @@ -203,7 +203,7 @@ spa <- function(x,winsize=NULL,freq=NULL){ G[i,j,] <- phi_yu/phi_u temp <- temp - phi_yu*Conj(phi_yu)/phi_u } - spec[i,i,] <- temp + spec[i,1,] <- temp } out <- idfrd(G,matrix(freq),deltat(x),spec) return(out) |