[Eventstudies-commits] r286 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Apr 4 05:14:38 CEST 2014


Author: vikram
Date: 2014-04-04 05:14:03 +0200 (Fri, 04 Apr 2014)
New Revision: 286

Modified:
   pkg/R/inference.bootstrap.R
Log:
Minor correction in plot.inference

Modified: pkg/R/inference.bootstrap.R
===================================================================
--- pkg/R/inference.bootstrap.R	2014-04-03 17:06:22 UTC (rev 285)
+++ pkg/R/inference.bootstrap.R	2014-04-04 03:14:03 UTC (rev 286)
@@ -29,16 +29,16 @@
 # Plotting inference
 plot.inference <- function(inference, xlab="Event time",
                     ylab="", main="", col.es="dark slate blue"){
-  big <- max(abs(inference$eventstudy.output))
+  big <- max(abs(inference))
   hilo <- c(-big,big)
-  width <- (nrow(inference$eventstudy.output)-1)/2
-  plot(-width:width, inference$eventstudy.output[,2], type="l", lwd=2, ylim=hilo,
+  width <- (nrow(inference)-1)/2
+  plot(-width:width, inference[,2], type="l", lwd=2, ylim=hilo,
        col=col.es,xlab= xlab, ylab = ylab,
        main=paste(main))
-  points(-width:width, inference$eventstudy.output[,2])
-  lines(-width:width, inference$eventstudy.output[,"2.5%"],
+  points(-width:width, inference[,2])
+  lines(-width:width, inference[,"2.5%"],
         lwd=1, lty=2, col=col.es)
-  lines(-width:width, inference$eventstudy.output[,"97.5%"],
+  lines(-width:width, inference[,"97.5%"],
         lwd=1, lty=2, col=col.es)
   abline(h=0,v=0)
 }



More information about the Eventstudies-commits mailing list