[Eventstudies-commits] r403 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Dec 6 21:23:19 CET 2014
Author: chiraganand
Date: 2014-12-06 21:23:19 +0100 (Sat, 06 Dec 2014)
New Revision: 403
Modified:
pkg/R/eventstudy.R
Log:
Fixed residuals class.
Modified: pkg/R/eventstudy.R
===================================================================
--- pkg/R/eventstudy.R 2014-12-06 08:01:28 UTC (rev 402)
+++ pkg/R/eventstudy.R 2014-12-06 20:23:19 UTC (rev 403)
@@ -172,6 +172,8 @@
outputModel <- NULL
} else {
outputResiduals <- lapply(outputModel, function(x) attributes(x)[["residuals"]])
+ outputResiduals <- lapply(outputResiduals, function(x)
+ zoo(as.numeric(x), order.by = as.integer(names(x))))
outputModel <- do.call(merge.zoo, outputModel)
}
}
@@ -244,7 +246,7 @@
outputModel <- NULL
} else {
returns.zoo <- returns.zoo[which(outcomes == "success")]
- outputModel <- returns.zoo$z.e[event.period]
+ outputModel <- returns.zoo$z.e[event.period, ]
estimation.period <- as.character(index(returns.zoo$z.e)[1]:(-event.window))
outputResiduals <- lapply(returns.zoo$z.e, '[', estimation.period)
}
More information about the Eventstudies-commits
mailing list