[Eventstudies-commits] r92 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 16 13:18:47 CEST 2013


Author: chiraganand
Date: 2013-07-16 13:18:47 +0200 (Tue, 16 Jul 2013)
New Revision: 92

Modified:
   pkg/R/eventstudy.R
Log:
Added code to handle levels in the main wrapper.


Modified: pkg/R/eventstudy.R
===================================================================
--- pkg/R/eventstudy.R	2013-07-16 10:59:44 UTC (rev 91)
+++ pkg/R/eventstudy.R	2013-07-16 11:18:47 UTC (rev 92)
@@ -5,6 +5,7 @@
                        to.remap = TRUE,
                        remap = "cumsum",
                        to.plot = TRUE,
+                       levels =  FALSE,
                        ...) {
                                         # type = "marketResiduals", "excessReturn", "AMM", "None"
   if (type == "None" && !is.null(inputData)) {
@@ -13,6 +14,10 @@
     stop("inputData or \"None\" type missing")
   }
 
+  if (levels == TRUE) {
+    inputData <- diff(log(inputData)) * 100
+  }
+
 ### Run models
   ## AMM
   if (type == "AMM") {



More information about the Eventstudies-commits mailing list