summaryrefslogtreecommitdiff
path: root/R/impulse.R
diff options
context:
space:
mode:
authorSuraj Yerramilli2015-05-26 08:43:09 +0530
committerSuraj Yerramilli2015-05-26 08:43:09 +0530
commit2ea66ed61bab3f4e0097fde1240fa92fd84c2e86 (patch)
treeac488a8560e1d874c03421a90008982304326d9f /R/impulse.R
parent695e9bd5adbb83e6b8a2330d0a5c7c8a0c6ddc75 (diff)
downloadSysID-R-code-2ea66ed61bab3f4e0097fde1240fa92fd84c2e86.tar.gz
SysID-R-code-2ea66ed61bab3f4e0097fde1240fa92fd84c2e86.tar.bz2
SysID-R-code-2ea66ed61bab3f4e0097fde1240fa92fd84c2e86.zip
Commented buggy code
Diffstat (limited to 'R/impulse.R')
-rw-r--r--R/impulse.R10
1 files changed, 5 insertions, 5 deletions
diff --git a/R/impulse.R b/R/impulse.R
index 3dcbaae..f2dca17 100644
--- a/R/impulse.R
+++ b/R/impulse.R
@@ -21,13 +21,13 @@ impulseest <- function(data,M=30,K=0){
# Fit Linear Model and find standard errors
fit <- lm(Y~Z-1)
- df <- nrow(Z)-ncol(Z);sigma2 <- resid(fit)^2/df
- vcov <- sigma2 * inv(t(Z)*Z)
- se <- sqrt(diag(vcov))
+ #df <- nrow(Z)-ncol(Z);sigma2 <- resid(fit)^2/df
+ #vcov <- sigma2 * inv(t(Z)*Z)
+ #se <- sqrt(diag(vcov))
- out <- list(coefficients=coef(fit),residuals=resid(fit),lags=K:M+K,
- x=colnames(data$input),y=colnames(data$output),se=)
+ out <- list(coefficients=coef(fit),residuals=resid(fit),lags=K:(M+K),
+ x=colnames(data$input),y=colnames(data$output))
class(out) <- "impulseest"
return(out)
}