Learn R Programming

eventstudies (version 1.0)

phys2eventtime: Converts physical dates to event dates.

Description

Given a zoo time-series vector and an event date, it converts the physical date to the event date. The event date becomes zero and all other dates shift accordingly.

Usage

phys2eventtime(z, events, width = 10)

Arguments

Value

Output is in a list format. A zoo object indexed with event time and a vector which describes the status of each unit in the original data.

Examples

Run this code
data(StockPriceReturns)
data(SplitDates)
phys2eventtime(z=StockPriceReturns, events=SplitDates,width=5)

Run the code above in your browser using DataLab