Learn R Programming

eventstudies (version 1.2.2)

inference.wilcox: Wilcox inference for event study estimator

Description

This function does wilcox inference to generate distribution of average of all the cumulative returns time-series.

Usage

inference.wilcox(es.w,
                to.plot = TRUE,
                xlab = "Event time", 
                ylab = "Cumulative returns of response series", 
	        main = "Event study plot")

Arguments

es.w

a zoo object indexed by event time: the “z.e” component of the list returned by the phys2eventtime function. The object should consist of more than one series.

to.plot

a ‘logical’ indicating whether to generate an event study plot of the inference estimated. Defaults to ‘TRUE’.

xlab

the x-axis label of the generated plot. Used if “to.plot” is ‘TRUE’.

ylab

the y-axis label of the generated plot. Used if “to.plot” is ‘TRUE’.

main

main title of the plot. Used if “to.plot” is ‘TRUE’.

Value

A ‘matrix’ with 3 columns: the lower confidence interval (CI), the mean, and the upper CI which are the result of wilcox inference.

See Also

phys2eventtime inference.bootstrap inference.classic

Examples

Run this code
# NOT RUN {
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.cumsum(es.w, is.pc = FALSE, base = 0)

inference.wilcox(es.w = eventtime, to.plot = FALSE)
# }

Run the code above in your browser using DataLab