[Eventstudies-commits] r49 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 4 08:49:50 CEST 2013


Author: vikram
Date: 2013-04-04 08:49:50 +0200 (Thu, 04 Apr 2013)
New Revision: 49

Added:
   pkg/man/eventDays.Rd
   pkg/man/eventstudyData.Rd
Modified:
   pkg/man/eventstudy-package.Rd
   pkg/man/inference.change.boot.Rd
   pkg/man/phys2eventtime.Rd
   pkg/man/remap.cumprod.Rd
   pkg/man/remap.cumsum.Rd
   pkg/man/remap.event.reindex.Rd
Log:
Added examples in documentation to remap; Added eventDays and eventstudyData documentation; some minor modifications

Added: pkg/man/eventDays.Rd
===================================================================
--- pkg/man/eventDays.Rd	                        (rev 0)
+++ pkg/man/eventDays.Rd	2013-04-04 06:49:50 UTC (rev 49)
@@ -0,0 +1,20 @@
+\name{eventDays}
+
+\docType{data}
+
+\alias{eventDays}
+
+\title{List of event dates for S&P 500}
+
+\description{
+  This series is an input for the examples in the eventstudy framework. It is a data frame with two columns 'unit' and 'when'. The column 'when' has event dates for S&P 500 while column 'unit' has list of response series' column names. In this data frame, 'unit' is 'nifty' which corresponds with column name of the 'eventstudyData'. Here, 1% tail values are termed as extreme events days, in this example we take upper tail events.
+}
+
+\usage{data(eventDays)}
+
+\format{An object with class attributes \code{data.frame} containing event dates for eventstudy.}
+
+\examples{
+    data(eventDays)
+}
+\keyword{datasets}

Modified: pkg/man/eventstudy-package.Rd
===================================================================
--- pkg/man/eventstudy-package.Rd	2013-04-03 18:59:19 UTC (rev 48)
+++ pkg/man/eventstudy-package.Rd	2013-04-04 06:49:50 UTC (rev 49)
@@ -15,7 +15,7 @@
 Package: \tab eventstudy\cr
 Type: \tab Package\cr
 Version: \tab 1.0\cr
-Date: \tab 2011-01-04\cr
+Date: \tab 2013-04-04\cr
 License: \tab GPL 2\cr
 LazyLoad: \tab yes\cr
 }
@@ -26,9 +26,9 @@
 }
 
 \author{
-Ajay Shah,Vimal Balasubramniam, Vikram Bahure
+Ajay Shah, Vimal Balasubramniam, Vikram Bahure
 
-Maintainer: vimsaa at gmail.com
+Maintainer: economics.vikram at gmail.com
 }
 
 \keyword{ eventstudies }

Added: pkg/man/eventstudyData.Rd
===================================================================
--- pkg/man/eventstudyData.Rd	                        (rev 0)
+++ pkg/man/eventstudyData.Rd	2013-04-04 06:49:50 UTC (rev 49)
@@ -0,0 +1,24 @@
+\name{eventstudyData}
+
+\docType{data}
+
+\alias{eventstudyData}
+
+\title{It is the data-set used for event-study analysis.}
+
+\description{
+It is a time series object with daily series for S&P 500, Nifty and Net FII flows in India.	
+}
+
+\usage{data(eventstudyData)}
+
+\format{An object with class attributes \code{zoo} containing resposne series for eventstudy.}
+
+\seealso{
+eventDays
+}
+
+\examples{
+    data(eventstudyData)
+}
+\keyword{datasets}

Modified: pkg/man/inference.change.boot.Rd
===================================================================
--- pkg/man/inference.change.boot.Rd	2013-04-03 18:59:19 UTC (rev 48)
+++ pkg/man/inference.change.boot.Rd	2013-04-04 06:49:50 UTC (rev 49)
@@ -31,22 +31,9 @@
 \value{It returns a list containing the mean,and the confidence intervals for the change in Ecar.}
 
 \examples{
-## The function is currently defined as
-function (z.e, t1, t2, operator = "ratio", conf = 0.95) 
-{
-    stopifnot(operator \%in\% c("ratio", "difference"))
-    tmp <- t(as.matrix(z.e[, c(t1, t2)]))
-    if (operator == "ratio") {
-        change <- tmp[, 2]/tmp[, 1]
-    }
-    if (operator == "difference") {
-        change <- tmp[, 2] - tmp[, 1]
-    }
-    mymean <- function(x, d) {
-        mean(x[d], na.rm = TRUE)
-    }
-    b <- boot(change, mymean, R = 1000)
-    ci <- boot.ci(b, type = "bca", conf = conf)
-    list(est = b$t0, lo = ci$bca[1, 4], hi = ci$bca[1, 5])
-  }
+data(eventDays)
+data(eventstudyData)
+es.results <- phys2eventtime(z=eventstudyData, events=eventDays,width=5)
+es.w <- window(es.results$z.e, start=-5, end=+5)
+eventtime <- remap.cumsum(es.w, is.pc=FALSE, base=0)
 }

Modified: pkg/man/phys2eventtime.Rd
===================================================================
--- pkg/man/phys2eventtime.Rd	2013-04-03 18:59:19 UTC (rev 48)
+++ pkg/man/phys2eventtime.Rd	2013-04-04 06:49:50 UTC (rev 49)
@@ -25,7 +25,6 @@
 
 \value{Returns a list containing 1. A zoo object indexed with event time, and having "enough data points" and 2. a vector which describes the status of each unit in the original data ( this maybe more than the no of units in 1 ).}
 
-\author{Ajay Shah, Vimal Balasubramaniam}
 
 \examples{
 data(eventDays)

Modified: pkg/man/remap.cumprod.Rd
===================================================================
--- pkg/man/remap.cumprod.Rd	2013-04-03 18:59:19 UTC (rev 48)
+++ pkg/man/remap.cumprod.Rd	2013-04-04 06:49:50 UTC (rev 49)
@@ -19,22 +19,16 @@
 
 \value{The frame returned has each column replaced by base * the cumulative product of the column.}
 
+\seealso{
+eventDays, eventstudyData, phys2eventtime
+}
 
 \examples{
-## The function is currently defined as
-function (z, is.pc = TRUE, is.returns = TRUE, base = 100) 
-{
-    for (i in 1:ncol(z)) {
-        tmp <- z[, i]
-        if (is.returns) {
-            if (is.pc) {
-                tmp <- tmp/100
-            }
-            tmp <- 1 + tmp
-        }
-        tmp[1] <- base
-        z[, i] <- cumprod(tmp)
-    }
-  }
+data(eventDays)
+data(eventstudyData)
+es.results <- phys2eventtime(z=eventstudyData, events=eventDays,width=5)
+es.w <- window(es.results$z.e, start=-5, end=+5)
+eventtime <- remap.cumprod(es.w, is.pc=FALSE, is.returns=TRUE, base=0)
+eventtime
 }
 

Modified: pkg/man/remap.cumsum.Rd
===================================================================
--- pkg/man/remap.cumsum.Rd	2013-04-03 18:59:19 UTC (rev 48)
+++ pkg/man/remap.cumsum.Rd	2013-04-04 06:49:50 UTC (rev 49)
@@ -24,24 +24,13 @@
 The frame returned has each column replaced by the cumulative sum of the column.
 }
 \seealso{
-phys2eventtime
+eventDays, eventstudyData, phys2eventtime
 }
 \examples{
-##---- Should be DIRECTLY executable !! ----
-##-- ==>  Define data, use random,
-##--	or do  help(data=index) for the standard data sets.
-
-## The function is currently defined as
-function (z, is.pc = TRUE, base = 0) 
-{
-    for (i in 1:ncol(z)) {
-        tmp <- z[, i]
-        if (is.pc) {
-            tmp <- tmp/100
-        }
-        z[, i] <- base + cumsum(tmp)
-    }
-    z
-  }
+data(eventDays)
+data(eventstudyData)
+es.results <- phys2eventtime(z=eventstudyData, events=eventDays,width=5)
+es.w <- window(es.results$z.e, start=-5, end=+5)
+eventtime <- remap.cumsum(es.w, is.pc=FALSE, base=0)
 }
 

Modified: pkg/man/remap.event.reindex.Rd
===================================================================
--- pkg/man/remap.event.reindex.Rd	2013-04-03 18:59:19 UTC (rev 48)
+++ pkg/man/remap.event.reindex.Rd	2013-04-04 06:49:50 UTC (rev 49)
@@ -16,18 +16,13 @@
 
 \value{The function returns a zoo object which has been rescaled.}
 
-\seealso{phys2eventtime}
-
-
+\seealso{
+eventDays, eventstudyData, phys2eventtime
+}
 \examples{
-## The function is currently defined as
-function (z) 
-{
-    eventvals <- as.numeric(window(z, start = 0, end = 0))
-    for (i in 1:ncol(z)) {
-        z[, i] <- 100 * z[, i]/eventvals[i]
-    }
-    z
-  }
+data(eventDays)
+data(eventstudyData)
+es.results <- phys2eventtime(z=eventstudyData, events=eventDays,width=5)
+es.w <- window(es.results$z.e, start=-5, end=+5)
+eventtime <- remap.event.reindex(es.w)
 }
-



More information about the Eventstudies-commits mailing list