[Eventstudies-commits] r329 - pkg/inst/tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed May 14 20:19:31 CEST 2014
Author: chiraganand
Date: 2014-05-14 20:19:31 +0200 (Wed, 14 May 2014)
New Revision: 329
Added:
pkg/inst/tests/test_INR.rda
Modified:
pkg/inst/tests/test_inr_inference.R
pkg/inst/tests/test_marketresiduals.R
Log:
Added old INR data only for testing INR inference, use the local test data for market residual test code.
Added: pkg/inst/tests/test_INR.rda
===================================================================
(Binary files differ)
Property changes on: pkg/inst/tests/test_INR.rda
___________________________________________________________________
Added: svn:mime-type
+ application/x-xz
Modified: pkg/inst/tests/test_inr_inference.R
===================================================================
--- pkg/inst/tests/test_inr_inference.R 2014-05-14 17:12:10 UTC (rev 328)
+++ pkg/inst/tests/test_inr_inference.R 2014-05-14 18:19:31 UTC (rev 329)
@@ -3,7 +3,7 @@
test_that("test.inr.inference", {
library(eventstudies)
-load(system.file("data", "INR.rda",package = "eventstudies"))
+load("test_INR.rda")
inr_returns <- diff(log(INR))[-1]
@@ -16,7 +16,7 @@
)
)
-event_time_data <- phys2eventtime(inr_returns,eventslist,width=10)
+event_time_data <- phys2eventtime(inr_returns[, , drop = FALSE] , eventslist,width=10)
w <- window(event_time_data$z.e,start=-10,end=10)
expect_that(inference.bootstrap(w, to.plot=FALSE)[,2],
Modified: pkg/inst/tests/test_marketresiduals.R
===================================================================
--- pkg/inst/tests/test_marketresiduals.R 2014-05-14 17:12:10 UTC (rev 328)
+++ pkg/inst/tests/test_marketresiduals.R 2014-05-14 18:19:31 UTC (rev 329)
@@ -3,8 +3,8 @@
test_that("test.market.residuals", {
library(eventstudies)
-load(system.file("data", "StockPriceReturns.rda", package = "eventstudies"))
-load(system.file("data", "NiftyIndex.rda", package = "eventstudies"))
+load("test_StockPriceReturns.rda")
+load("test_NiftyIndex.rda")
alldata <- merge(StockPriceReturns, NiftyIndex, all = TRUE)
StockPriceReturns <- alldata[,-which(colnames(alldata) %in% "NiftyIndex")]
More information about the Eventstudies-commits
mailing list