diff options
author | Suraj Yerramilli | 2015-02-12 11:19:21 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-02-12 11:19:21 +0530 |
commit | 0ad1c26f00ea7063cdf63eb7c03a412c3cf1eb14 (patch) | |
tree | b219cb0b2252222bb7c52ff0e9d032805262f308 | |
parent | 00834a8564bb4d12ae1dba51d56812083ca3d630 (diff) | |
download | SysID-R-code-0ad1c26f00ea7063cdf63eb7c03a412c3cf1eb14.tar.gz SysID-R-code-0ad1c26f00ea7063cdf63eb7c03a412c3cf1eb14.tar.bz2 SysID-R-code-0ad1c26f00ea7063cdf63eb7c03a412c3cf1eb14.zip |
corrected predicted values of the detrend function
-rw-r--r-- | R/detrend.R | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/R/detrend.R b/R/detrend.R index 700b8ff..7f03753 100644 --- a/R/detrend.R +++ b/R/detrend.R @@ -38,7 +38,7 @@ detrend.idframe <- function(data){ input[,i] <- fitted(input_trend[[i]]) } - data_detrend$output <- out;data_detrend$input <- input + data_detrend$output <- data$output - out;data_detrend$input <- data$input - input est <- list(fitted.values=data_detrend,output.trend = output_trend, input.trend = input_trend) @@ -75,7 +75,8 @@ predict.detrend.idframe <- function(object,newdata=NULL,...){ data <- newdata out <- detrend.predict(object$output.trend,data$output) input <- detrend.predict(object$input.trend,data$input) - data$output <- out;data$input <- input + data$output <- data$output - out + data$input <- data$input - input } return(data) } |