Learn R Programming

EventStudy (version 0.37)

arPlot: Abnormal Return Plot

Description

Plot abnormal returns in the event window of single or multiple firms.

Usage

arPlot(
  ResultParserObj,
  firm = NULL,
  window = NULL,
  xlab = "",
  ylab = "Abnormal Returns",
  alpha = 0.5,
  facetVar = NULL,
  ncol = 4,
  addAAR = F,
  xVar = "eventTime",
  yVar = "ar"
)

Value

a ggplot2 object

Arguments

ResultParserObj

An object of class ResultParser

firm

set this parameter if just a subset of firms should be plotted

window

filter event time window

xlab

x-axis label of the plot

ylab

y-axis label

alpha

alpha value

facetVar

should each firm get its own plot. You may plot each firm in an own plot or by each group. (Default: NULL, available: Group and Firm)

ncol

number of facet columns

addAAR

add aar line

xVar

x variable name

yVar

y variable name

Examples

Run this code
if (FALSE) {
# plot abnormal returns in one plot
arPlot(resultParser)

# plot abnormal returns by group
arPlot(resultParser, facetVar = "Group")
}

Run the code above in your browser using DataLab