[Eventstudies-commits] r296 - pkg/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Apr 30 06:29:44 CEST 2014
Author: chiraganand
Date: 2014-04-30 06:29:44 +0200 (Wed, 30 Apr 2014)
New Revision: 296
Modified:
pkg/man/eventstudy.Rd
pkg/man/lmAMM.Rd
Log:
Added plotting to examples, added eventstudy example using lmAMM.
Modified: pkg/man/eventstudy.Rd
===================================================================
--- pkg/man/eventstudy.Rd 2014-04-30 04:27:07 UTC (rev 295)
+++ pkg/man/eventstudy.Rd 2014-04-30 04:29:44 UTC (rev 296)
@@ -4,7 +4,7 @@
\title{Event study analysis}
\description{
- \sQuote{eventstudy} provides a easy interface that integrates all
+ \sQuote{eventstudy} provides an easy interface that integrates all
functionalities of package \pkg{eventstudies} to undertake event study
analysis. It allows the user to specify the type of data adjustment
to be done (using the augmented market model functionalities of the
@@ -30,10 +30,9 @@
}
\item{eventList}{
- a \code{data.frame} of two columns with event dates (with the column
- name \dQuote{event.when}) and column names
- of the \sQuote{response} series from \sQuote{firm.returns} (with the
- column name \dQuote{outcome.unit}.
+ a \code{data.frame} of two columns with event dates (colname:
+ \dQuote{event.when}) and column names of the \sQuote{response}
+ series from \sQuote{firm.returns} (colname \dQuote{outcome.unit}).
}
\item{width}{an \sQuote{integer} of length 1 that specifies a
@@ -218,6 +217,30 @@
inference = TRUE,
inference.strategy = "bootstrap")
str(es)
+plot(es)
+
+## Event study using Augment Market Model
+data("AMMData")
+events <- data.frame(outcome.unit = "Infosys",
+ event.when = c("2012-03-01", "2012-04-01"),
+ stringsAsFactors = FALSE)
+
+es <- eventstudy(firm.returns = AMMData[, "Infosys", drop = FALSE],
+ eventList = events,
+ width = 10,
+ type = "lmAMM",
+ to.remap = TRUE,
+ remap = "cumsum",
+ inference = TRUE,
+ inference.strategy = "bootstrap",
+ ## model args
+ market.returns = AMMData[, "index.nifty"],
+ others = AMMData[, "currency.inrusd"],
+ switch.to.innov = FALSE,
+ market.returns.purge = FALSE
+ )
+str(es)
+plot(es)
}
\keyword{eventstudy}
Modified: pkg/man/lmAMM.Rd
===================================================================
--- pkg/man/lmAMM.Rd 2014-04-30 04:27:07 UTC (rev 295)
+++ pkg/man/lmAMM.Rd 2014-04-30 04:29:44 UTC (rev 296)
@@ -94,15 +94,17 @@
## Augmented market model residual
amm.result <- lmAMM(firm.returns, X, nlags = 0, verbose = FALSE)
-names(amm.result)
+plot(amm.result)
+
amm.residual <- residuals(amm.result)
amm.residual <- zoo(amm.residual,as.Date(names(amm.residual)))
## Checking output: Comparing augmented market model residual, raw returns, nifty returns
output <- merge(amm.residual, StockPriceReturns$Infosys, NiftyIndex,
- all=FALSE)
-colnames(output) <- c("amm.residual", "raw.returns", "nifty.returns")
-tail(output)
+ all = FALSE)
+colnames(output) <- c("AMM Residual", "Raw Returns", "Nifty Returns")
+tail(output)
+plot(output)
}
\keyword{lmAMM}
More information about the Eventstudies-commits
mailing list