From e3db1fea8270aadd9879fe4cf86fa0c9513d41ee Mon Sep 17 00:00:00 2001 From: Suraj Yerramilli Date: Tue, 26 May 2015 08:47:27 +0530 Subject: Added an example for the impulseest function --- R/impulse.R | 10 +++++++++- man/impulseest.Rd | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/R/impulse.R b/R/impulse.R index f2dca17..ca60c04 100644 --- a/R/impulse.R +++ b/R/impulse.R @@ -8,7 +8,15 @@ #' @param K Transport delay in the estimated impulse response #' (Default:\code{0}) #' -#' @seealso \code{\link{plot.impulseest}}, \code{\link{step}} +#' @seealso \code{\link{step}} +#' +#' @examples +#' uk <- rnorm(1000,1) +#' yk <- filter (uk,c(0.9,-0.4),method="recursive") + rnorm(1000,1) +#' data <- idframe(output=data.frame(yk),input=data.frame(uk)) +#' fit <- impulseest(data) +#' plot(fit) +#' #' @export impulseest <- function(data,M=30,K=0){ diff --git a/man/impulseest.Rd b/man/impulseest.Rd index 7d36f99..98e3365 100644 --- a/man/impulseest.Rd +++ b/man/impulseest.Rd @@ -18,7 +18,14 @@ impulseest(data, M = 30, K = 0) \code{impulseest} is used to estimate impulse response models in the given data } +\examples{ +uk <- rnorm(1000,1) +yk <- filter (uk,c(0.9,-0.4),method="recursive") + rnorm(1000,1) +data <- idframe(output=data.frame(yk),input=data.frame(uk)) +fit <- impulseest(data) +plot(fit) +} \seealso{ -\code{\link{plot.impulseest}}, \code{\link{step}} +\code{\link{step}} } -- cgit