[Eventstudies-commits] r364 - in pkg: R inst/tests man vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri May 23 19:26:01 CEST 2014
Author: chiraganand
Date: 2014-05-23 19:26:00 +0200 (Fri, 23 May 2014)
New Revision: 364
Modified:
pkg/R/eesInference.R
pkg/R/eventstudy.R
pkg/inst/tests/test_interfaces.R
pkg/man/eventstudy.Rd
pkg/vignettes/eventstudies.Rnw
Log:
Changed eventList argument to event.list, made it consistent with other args.
Modified: pkg/R/eesInference.R
===================================================================
--- pkg/R/eesInference.R 2014-05-23 17:19:46 UTC (rev 363)
+++ pkg/R/eesInference.R 2014-05-23 17:26:00 UTC (rev 364)
@@ -727,23 +727,23 @@
## Computing inference
## Normal
# Good days
- inf$good.normal <- eventstudy(input, eventList=eventLists$events.good.normal,
+ inf$good.normal <- eventstudy(input, event.list=eventLists$events.good.normal,
type="None", to.remap=to.remap,
remap=remap, event.window=width, inference=inference,
inference.strategy=inference.strategy)
# Bad days
- inf$bad.normal <- eventstudy(input, eventList=eventLists$events.bad.normal,
+ inf$bad.normal <- eventstudy(input, event.list=eventLists$events.bad.normal,
type="None", to.remap=to.remap,
remap=remap, event.window=width, inference=inference,
inference.strategy=inference.strategy)
## Purged
# Good days
- inf$good.purged <- eventstudy(input, eventList=eventLists$events.good.purged,
+ inf$good.purged <- eventstudy(input, event.list=eventLists$events.good.purged,
type="None", to.remap=to.remap,
remap=remap, event.window=width, inference=inference,
inference.strategy=inference.strategy)
# Bad days
- inf$bad.purged <- eventstudy(input, eventList=eventLists$events.bad.purged,
+ inf$bad.purged <- eventstudy(input, event.list=eventLists$events.bad.purged,
type="None", to.remap=to.remap,
remap=remap, event.window=width, inference=inference,
inference.strategy=inference.strategy)
Modified: pkg/R/eventstudy.R
===================================================================
--- pkg/R/eventstudy.R 2014-05-23 17:19:46 UTC (rev 363)
+++ pkg/R/eventstudy.R 2014-05-23 17:26:00 UTC (rev 364)
@@ -1,5 +1,5 @@
eventstudy <- function(firm.returns,
- eventList,
+ event.list,
event.window = 10,
is.levels = FALSE,
type = "marketResidual",
@@ -98,7 +98,7 @@
colnames(outputModel) <- firmNames
}
- es <- phys2eventtime(z = outputModel, events=eventList, width=0)
+ es <- phys2eventtime(z = outputModel, events=event.list, width=0)
if (is.null(es$z.e) || length(es$z.e) == 0) {
es.w <- NULL
@@ -106,7 +106,7 @@
} else {
es.w <- window(es$z.e, start = -event.window, end = event.window)
# Adding column names to event output
- cn.names <- eventList[which(es$outcomes=="success"),1]
+ cn.names <- event.list[which(es$outcomes=="success"),1]
}
## replace NAs with 0 as it's returns now
Modified: pkg/inst/tests/test_interfaces.R
===================================================================
--- pkg/inst/tests/test_interfaces.R 2014-05-23 17:19:46 UTC (rev 363)
+++ pkg/inst/tests/test_interfaces.R 2014-05-23 17:26:00 UTC (rev 364)
@@ -19,7 +19,7 @@
test_returns<- StockPriceReturns[complete.cases(StockPriceReturns$ONGC), "ONGC",
drop = FALSE]
test_es <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
model.args = list(market.returns = NiftyIndex))
@@ -40,7 +40,7 @@
test_returns<- StockPriceReturns[complete.cases(StockPriceReturns$ONGC), "ONGC",
drop = FALSE]
test_es <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "None")
@@ -62,7 +62,7 @@
drop = FALSE]
test_others <- USDINR
test_es <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "lmAMM",
model.args = list(market.returns = NiftyIndex[index(USDINR)],
@@ -85,7 +85,7 @@
drop = FALSE]
test_es <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "excessReturn",
model.args = list(market.returns = NiftyIndex))
@@ -104,14 +104,14 @@
## cumsum
test_es <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "None",
to.remap = FALSE,
remap = "cumsum")
test_es_remap <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "None",
to.remap = TRUE,
@@ -121,14 +121,14 @@
## cumprod
test_es <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "None",
to.remap = FALSE,
remap = "cumprod")
test_es_remap <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "None",
to.remap = TRUE,
@@ -140,14 +140,14 @@
cat("\nChecking inference interface: ")
## bootstrap
test_es_inference <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "None",
inference = TRUE,
inference.strategy = "bootstrap")
test_es <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "None",
inference = FALSE,
@@ -157,14 +157,14 @@
## wilcoxon
test_es_inference <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "None",
inference = TRUE,
inference.strategy = "wilcoxon")
test_es <- eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "None",
inference = FALSE,
@@ -183,7 +183,7 @@
stringsAsFactors = FALSE)
test_returns<- StockPriceReturns$ONGC
expect_error(eventstudy(firm.returns = test_returns,
- eventList = test_events,
+ event.list = test_events,
event.window = 3,
type = "None"))
})
Modified: pkg/man/eventstudy.Rd
===================================================================
--- pkg/man/eventstudy.Rd 2014-05-23 17:19:46 UTC (rev 363)
+++ pkg/man/eventstudy.Rd 2014-05-23 17:26:00 UTC (rev 364)
@@ -13,7 +13,7 @@
\usage{
eventstudy(firm.returns,
- eventList,
+ event.list,
event.window = 10,
is.levels = FALSE,
type = "marketResidual",
@@ -29,7 +29,7 @@
a \pkg{zoo} matrix of \sQuote{outcome} or \sQuote{response} series.
}
- \item{eventList}{
+ \item{event.list}{
a \code{data.frame} of two columns with event dates (colname:
\dQuote{when}) and column names of the \sQuote{response}
series from \sQuote{firm.returns} (colname \dQuote{name}).
@@ -225,7 +225,7 @@
# Event study without adjustment
es <- eventstudy(firm.returns = StockPriceReturns,
- eventList = SplitDates,
+ event.list = SplitDates,
event.window = 10,
type = "None",
to.remap = TRUE,
@@ -237,7 +237,7 @@
# Event study using Market Model
es <- eventstudy(firm.returns = StockPriceReturns,
- eventList = SplitDates,
+ event.list = SplitDates,
event.window = 10,
type = "marketResidual",
to.remap = TRUE,
@@ -257,7 +257,7 @@
stringsAsFactors = FALSE)
es <- eventstudy(firm.returns = StockPriceReturns,
- eventList = events,
+ event.list = events,
event.window = 10,
type = "lmAMM",
to.remap = TRUE,
Modified: pkg/vignettes/eventstudies.Rnw
===================================================================
--- pkg/vignettes/eventstudies.Rnw 2014-05-23 17:19:46 UTC (rev 363)
+++ pkg/vignettes/eventstudies.Rnw 2014-05-23 17:26:00 UTC (rev 364)
@@ -80,7 +80,7 @@
<<no-adjustment>>=
es <- eventstudy(firm.returns = StockPriceReturns,
- eventList = SplitDates,
+ event.list = SplitDates,
event.window = 10,
type = "None",
to.remap = TRUE,
@@ -171,7 +171,7 @@
<<mm-adjustment>>=
data(OtherReturns)
es.mm <- eventstudy(firm.returns = StockPriceReturns,
- eventList = SplitDates,
+ event.list = SplitDates,
event.window = 10,
type = "marketResidual",
to.remap = TRUE,
@@ -229,7 +229,7 @@
<<amm-adjustment>>=
es.amm <- eventstudy(firm.returns = StockPriceReturns,
- eventList = SplitDates,
+ event.list = SplitDates,
event.window = 10,
type = "lmAMM",
to.remap = TRUE,
More information about the Eventstudies-commits
mailing list