[Eventstudies-commits] r386 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Nov 15 15:22:10 CET 2014


Author: chiraganand
Date: 2014-11-15 15:22:09 +0100 (Sat, 15 Nov 2014)
New Revision: 386

Modified:
   pkg/R/eventstudy.R
Log:
Fixed handling of univariate series.

Modified: pkg/R/eventstudy.R
===================================================================
--- pkg/R/eventstudy.R	2014-11-15 14:15:31 UTC (rev 385)
+++ pkg/R/eventstudy.R	2014-11-15 14:22:09 UTC (rev 386)
@@ -212,11 +212,11 @@
 
   if (is.null(outputModel)) {
     return(NULL)
-  } else if(NCOL(outputModel) == 1) {   # XXX: needs checking and fixing
+  } else if (NCOL(outputModel) == 1) {
     name <- event.list[outcomes == "success", "name"]
     event.number <- rownames(event.list[outcomes == "success", ])
     cat("Event date exists only for", name,"\n")
-    attr(outputModel, which = "dim") <- c(1 , 1)
+    attr(outputModel, which = "dim") <- c(length(outputModel) , 1)
     attr(outputModel, which = "dimnames") <- list(NULL, event.number)
     if (inference == TRUE) {
       warning("No inference strategy for single successful event.","\n")



More information about the Eventstudies-commits mailing list