diff options
author | Suraj Yerramilli | 2015-03-22 23:55:38 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-03-22 23:55:38 +0530 |
commit | f995715a8525d9e01528a60ed1a718b3aeff3111 (patch) | |
tree | 1229b99968bc6455abdd3716b28775e90b0a3b4e /R | |
parent | a74ce396b0dac33aee99737428f4efb041217ee0 (diff) | |
download | SysID-R-code-f995715a8525d9e01528a60ed1a718b3aeff3111.tar.gz SysID-R-code-f995715a8525d9e01528a60ed1a718b3aeff3111.tar.bz2 SysID-R-code-f995715a8525d9e01528a60ed1a718b3aeff3111.zip |
Added skeleton for impulse response models
Diffstat (limited to 'R')
-rw-r--r-- | R/impulse.R | 24 | ||||
-rw-r--r-- | R/tf.R | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/R/impulse.R b/R/impulse.R new file mode 100644 index 0000000..834a42d --- /dev/null +++ b/R/impulse.R @@ -0,0 +1,24 @@ +# Estimate Impulse Response Models +impulseest <- function(data,lags=30,conf=0.95){ + require(vars) + Z <- cbind(data$output,data$input) + + fit.var <- VAR(Z,p=10) + ir <- irf(fit.var,impulse=colnames(data$input),response=colnames(data$output), + n.ahead = lags,ci=conf) + + out <- list() + class(out) <- "impulseest" + return(out) +} + +# Impulse Response Plots +impulse <- function(model){ + +} + + +# Step Response Plots +step <- function(model){ + +} @@ -19,6 +19,7 @@ tf <- function(num=c(1),den=c(1),Ts=1){ #' Printing method for objects inheriting from class \code{tf} #' #' @param G an object of class \code{tf} +#' @export print.tf <- function(G){ cat("Transfer Function \nG(q^{-1}) = B(q^{-1})/A(q^{-1}) \n\n") cat("A(q^{-1}) = ") |