[Eventstudies-commits] r45 - in pkg: . R inst vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 14 18:52:15 CET 2013


Author: vikram
Date: 2013-02-14 18:52:15 +0100 (Thu, 14 Feb 2013)
New Revision: 45

Modified:
   pkg/DESCRIPTION
   pkg/R/identifyextremeevents.R
   pkg/inst/CITATION
   pkg/vignettes/eventstudies.Rnw
Log:
Minor modification in citation, DESCRIPTION

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2013-02-13 11:14:59 UTC (rev 44)
+++ pkg/DESCRIPTION	2013-02-14 17:52:15 UTC (rev 45)
@@ -4,7 +4,7 @@
 Version: 0.04
 Date: 2011-06-20
 Author: Ajay Shah, Vimal Balasubramaniam, Vikram Bahure
-Maintainer: Vimal Balasubramaniam <vimsaa at gmail.com>
+Maintainer: Vimal Balasubramaniam <vimsaa at gmail.com>, Vikram Bahure <economics.vikram at gmail.com>
 Depends: R (>= 2.12.0), zoo, xts, boot 
 Description: Implementation of short and long term event study methodology
 License: GPL-2

Modified: pkg/R/identifyextremeevents.R
===================================================================
--- pkg/R/identifyextremeevents.R	2013-02-13 11:14:59 UTC (rev 44)
+++ pkg/R/identifyextremeevents.R	2013-02-14 17:52:15 UTC (rev 45)
@@ -100,7 +100,7 @@
   # Lower tail
   lower.tail$data <- list(left.all,left.tail.clustered,
                           left.tail.unclustered)
-  names(lower.tail$data) <- c("All","Clustered","Un-clustered")
+  names(lower.tail$data) <- c("All","Clustered","Unclustered")
   lower.tail$extreme.event.distribution <- event.dist$lower.tail
   lower.tail$runlength <- runlength$lower.tail
   lower.tail$quantile.values <- qnt.values$lower.tail
@@ -108,7 +108,7 @@
   # Upper tail
   upper.tail$data <- list(right.all,right.tail.clustered,
                           right.tail.unclustered)
-  names(upper.tail$data) <- c("All","Clustered","Un-clustered")
+  names(upper.tail$data) <- c("All","Clustered","Unclustered")
   upper.tail$extreme.event.distribution <- event.dist$upper.tail
   upper.tail$runlength <- runlength$upper.tail
   upper.tail$quantile.values <- qnt.values$upper.tail
@@ -349,7 +349,7 @@
   if(no.var==1){input <- xts(input)}
   # Creating empty frame: chassis
   tmp <- data.frame(matrix(NA,nrow=11,ncol=NCOL(input)))
-  colnames(tmp) <-  colnames(input) 
+  colnames(tmp) <-  "summary" 
   rownames(tmp) <- c("Min","5%","25%","Median","Mean","75%","95%",
                          "Max","sd","IQR","Obs.")
   # Estimating summary statistics
@@ -424,8 +424,8 @@
   tmp.good.y <- merge(tmp.good.y,apply.yearly(xts(tmp.good[,1]),function(x)median(x,na.rm=T)))
     index(tmp.good.y) <- as.yearmon(as.Date(substr(index(tmp.good.y),1,4),"%Y"))
   tmp.res <- merge(tmp.bad.y,tmp.good.y)
-  colnames(tmp.res) <- c("number.baddays","median.baddays",
-                         "number.gooddays","median.goodays")
+  colnames(tmp.res) <- c("number.lowertail","median.lowertail",
+                         "number.uppertail","median.uppertail")
   output <- as.data.frame(tmp.res)
   cn <- rownames(output)
   rownames(output) <- sapply(rownames(output),
@@ -521,13 +521,13 @@
 
   # Making a table
   tb <- data.frame(matrix(NA,2,6))
-  colnames(tb) <- c("unclstr","used.clstr","removed.clstr","tot.clstr","Tot","Tot.used")
+  colnames(tb) <- c("unclstr","used.clstr","removed.clstr","tot.clstr","tot","tot.used")
   rownames(tb) <- c("lower","upper")
-  tb[,"Tot"] <- c(tot.ev.l,tot.ev.r)
+  tb[,"tot"] <- c(tot.ev.l,tot.ev.r)
   tb[,"unclstr"] <- c(un.clstr.l,un.clstr.r)
   tb[,"used.clstr"] <- c(us.cl.l,us.cl.r)
-  tb[,"Tot.used"] <- tb$unclstr+tb$used.clstr
-  tb[,"tot.clstr"] <- tb$Tot-tb$unclstr
+  tb[,"tot.used"] <- tb$unclstr+tb$used.clstr
+  tb[,"tot.clstr"] <- tb$tot-tb$unclstr
   tb[,"removed.clstr"] <- tb$tot.clstr-tb$used.clstr
 
   return(tb)
@@ -555,10 +555,10 @@
   upper.tail.qnt.value <- data.frame(matrix(NA,nrow=no.var,ncol=6))
   colnames(lower.tail.qnt.value) <- c("Min","25%","Median","75%","Max",
                                       "Mean")
-  rownames(lower.tail.qnt.value) <- colnames(input)
+  rownames(lower.tail.qnt.value) <- "extreme.events"
   colnames(upper.tail.qnt.value) <- c("Min","25%","Median","75%","Max",
                                       "Mean")
-  rownames(upper.tail.qnt.value) <- colnames(input)
+  rownames(upper.tail.qnt.value) <- "extreme.events"
   # Estimating cluster count
   #--------------------
   # Formatting clusters
@@ -574,7 +574,7 @@
                        "event.series"]
   df.left <- t(data.frame(quantile(tmp.left.tail,c(0,0.25,0.5,0.75,1))))
   tmp.left <- round(cbind(df.left,mean(tmp.left.tail)),2)
-  rownames(tmp.left) <- NULL
+  rownames(tmp.left) <- "extreme.events"
   colnames(tmp.left) <- c("0%","25%","Median","75%","100%","Mean")
   # Right tail
   tmp.right.tail <- tmp[which(tmp$right.tail==1),
@@ -582,7 +582,7 @@
   df.right <- t(data.frame(quantile(tmp.right.tail,c(0,0.25,0.5,0.75,1))))
   tmp.right <- round(cbind(df.right,
                            mean(tmp.right.tail)),2)
-  rownames(tmp.right) <- NULL
+  rownames(tmp.right) <- "extreme.events"
   colnames(tmp.right) <- c("0%","25%","Median","75%","100%","Mean")
   
   lower.tail.qnt.value  <- tmp.left 
@@ -637,9 +637,9 @@
   upper.tail.runlength <- data.frame(matrix(NA,nrow=no.var,
                                             ncol=length(col.names)))
   colnames(lower.tail.runlength) <- col.names
-  rownames(lower.tail.runlength) <- colnames(input)
+  rownames(lower.tail.runlength) <- "clustered.events"
   colnames(upper.tail.runlength) <- col.names
-  rownames(upper.tail.runlength) <- colnames(input)
+  rownames(upper.tail.runlength) <- "clustered.events"
 
   #----------------------
   # Run length estimation

Modified: pkg/inst/CITATION
===================================================================
--- pkg/inst/CITATION	2013-02-13 11:14:59 UTC (rev 44)
+++ pkg/inst/CITATION	2013-02-14 17:52:15 UTC (rev 45)
@@ -3,16 +3,16 @@
 citEntry(entry="Article",
          title = "eventstudies: Infrastructure for performing Event Studies with R",
          author = personList(as.person("Ajay Shah"),
-	                     as.person("Ashim Kapoor"),
+	                     as.person("Vikram Bahure"),
 			     as.person("Vimal Balasubramaniam")),
          journal      = "Journal of Statistical Software",
-         year         = "2011",
+         year         = "2013",
 	 volume       = "",
 	 number       = "",
 	 pages        = "",
          url          = "",
          
          textVersion = 
-         paste("Ajay Shah,Ashim Kapoor,Vimal Balasubramaniam", 
+         paste("Ajay Shah,Vikram Bahure,Vimal Balasubramaniam", 
                "eventstudies: Infrastructure for performing Event Studies with R")
 )

Modified: pkg/vignettes/eventstudies.Rnw
===================================================================
--- pkg/vignettes/eventstudies.Rnw	2013-02-13 11:14:59 UTC (rev 44)
+++ pkg/vignettes/eventstudies.Rnw	2013-02-14 17:52:15 UTC (rev 45)
@@ -138,9 +138,9 @@
 \section{identifyextremeevents}
 % Conceptual framework
 \subsection{Conceptual framework}
-This package identifies and interprets extreme events along with
-eventstudy analysis. The upper tail and lower tail values are defined
-as extreme events at certain probability. 
+This function of the package identifies extreme event and does data
+analysis. The upper tail and lower tail values are defined as extreme
+events at certain probability. 
 
 There are two further issues to consider. First, matters are
 complicated by the fact that extreme (tail) values may cluster: for
@@ -151,8 +151,8 @@
 values as a single event. 
 
 We approach this problem through two paths. The data has following
-events: clustered, un-clustered and mixed clusters. For simplicity, we
-remove all the mixed clusters and deal with the rest. Un-clustered or
+events: clustered, unclustered and mixed clusters. For simplicity, we
+remove all the mixed clusters and deal with the rest. Unclustered or
 uncontaminated events are those where there is no other event within
 the event window. Clustered events are defined by fusing all
 consecutive extreme events, of the same direction, into a single
@@ -165,12 +165,12 @@
 % Example for understanding
 \subsection{Usage}
 This function does extreme event analysis on the returns of the
-data. There are only two arguments the function has:
+data. Function has following two arguments:
 \begin{enumerate}
 \item \textit{input}: Data on which extreme event analysis is done. Note:
   \textit{input} should be in returns format.  
 \item \textit{prob.value}: It is the tail value on basis of which the
-  extreme event is are defined. For eg: prob.value of 5 will consider
+  extreme events are defined. For eg: \textit{prob.value} of 5 will consider
   5\% tail on both sides.
 \end{enumerate}
 <<>>==



More information about the Eventstudies-commits mailing list