From fc5b9c365a4ac75137327731df09fa866aaa2d54 Mon Sep 17 00:00:00 2001 From: Suraj Yerramilli Date: Sun, 23 Aug 2015 16:28:05 +0530 Subject: Corrected minor errors --- R/nonparam.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'R/nonparam.R') diff --git a/R/nonparam.R b/R/nonparam.R index f3faa26..cebc1ab 100644 --- a/R/nonparam.R +++ b/R/nonparam.R @@ -42,15 +42,15 @@ impulseest <- function(x,M=30,K=NULL,regul=F,lambda=1){ for(j in seq(nInputSeries(x))){ index <- (i-1)*nInputSeries(x)+j out[[index]] <- impulsechannel(outputData(x)[,i,drop=F], - inputData(x)[,j,drop=F],N,K(index), - regul,lambda) + inputData(x)[,j,drop=F],N,M, + K[index],regul,lambda) } } class(out) <- "impulseest" return(out) } -impulsechannel <- function(y,u,N,K=0,regul=F,lambda=1){ +impulsechannel <- function(y,u,N,M,K=0,regul=F,lambda=1){ ind <- (M+K+1):N z_reg <- function(i) u[(i-K):(i-M-K),] Z <- t(sapply(ind,z_reg)) -- cgit