plot.event2car_range: Plots cumulative abnormal returns over time

Description Usage Arguments Examples

View source: R/plot.R

Description

plot method for the class "event2car_range".

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## S3 method for class 'event2car_range'
plot(
  x,
  ...,
  event_color = "red",
  event_linetype = "twodash",
  event_size = 1,
  event_label_size = 3,
  line_color = "black",
  background_color = "gray",
  background_alpha = 0.5,
  point_size = 0.2,
  point_alpha = 0.1,
  axis_text_size = 8,
  axis_title_size = 10,
  show_method = TRUE
)

Arguments

x

an object of class event2car_range.

...

other arguments ignored (for compatibility with generic)

event_color

a character object indicating the color of the vertical lines at the event_date. Default is "red".

event_linetype

a character object indicating the linetype of the veritical line at the event_date. Default is "twodash".

event_size

a numeric value indicating the size of the vertical line at the event_date. Default is 1.

event_label_size

a numeric value indicating the size of the event label(s). Default is 3.

line_color

a character object indicating the color of the loess curve (see stats::loess) of all cumulative abnormal returns. Default is "black".

background_color

a character value indicating the color of the area above zero. Default is "gray".

background_alpha

a numeric value indicating the transparency of the area above zero. Default is 0.5.

point_size

a numeric value specifying the size of the points representing cumulative abnormal returns. Default is 0.2.

point_alpha

a numeric value specifying the transparency of the points representing cumulative abnormal returns. Default is 0.1.

axis_text_size

a numeric value indicating the size of the axis text. Default is 8.

axis_title_size

a numeric value indicating the size of the axis titles. Default is 10.

show_method

a logical value indicating whether the information on the applied method (mean_adj, mrkt_adj_out, or mrkt_adj_within) should be included in the plot.

Examples

1
2
3
4
5
6
7
trumpelection <- as.Date("2016-11-08")
returns_firms <- tech_returns[,2:19]
return_indx <- tech_returns[,1]
effect_trump <- event2car_range(returns=returns_firms,regressor=return_indx,
                                imputation_returns="mean",
                                event_date=trumpelection,method="mean_adj")
plot(effect_trump)

LisaLechner/event2car documentation built on Jan. 6, 2020, 12:27 p.m.