Learn R Programming

eventstudies (version 1.0)

remap.event.reindex: This function sets the value at event date to be 100 and the other values relative to this value.

Description

A function which consumes a zoo object where there are lots of events (as columns). The contents are all levels. For each column, the event date value is set to 100 and all other values are scaled accordingly. It's input is a zoo object which is the first component of the list returned by phys2eventtime.

Usage

remap.event.reindex(z)

Arguments

Value

The function returns a zoo object which has been rescaled.

See Also

phys2eventtime

Examples

Run this code
data(StockPriceReturns)
data(SplitDates)
es.results <- phys2eventtime(z=StockPriceReturns, events=SplitDates,width=5)
es.w <- window(es.results$z.e, start=-5, end=+5)
eventtime <- remap.event.reindex(es.w)

Run the code above in your browser using DataLab