plot.tsfmUpDn {facmodTS}R Documentation

Plot actual against fitted values of up and down market time series factor model

Description

Generic plot method for object of class tsfmUpDn.

Usage

## S3 method for class 'tsfmUpDn'
plot(
  x,
  asset.name = NULL,
  SFM.line = FALSE,
  LSandRob = FALSE,
  line.color = c("blue", "purple"),
  line.type = c("dashed", "solid"),
  line.width = c(1, 2),
  sfm.line.type = "dashed",
  add.legend = TRUE,
  legend.loc = "topleft",
  legend.cex = 0.9,
  ...
)

Arguments

x

an object of class tsfmUpDn produced by fitTsfmUpDn.

asset.name

A vector of character to show single or multiple assets names. The defualt if NULL.

SFM.line

A logic flag to add a fitted single factor model. The default is FALSE.

LSandRob

A logic flag to add a comparison Up/Down factor model. If the original model is "LS", the comparison model is "Robust" and vice versa. The default is FALSE. The default is FALSE.

line.color

A vector of color codes of up/dn fitted line. The first element is for the object fitted line and the second for the comparison fitted line. The default is c("blue","purple").

line.type

A vector of line types of up/dn fitted line. The first is for the object fitted line and the second for the comparison fitted line. The default is c("dashed","solid".

line.width

A vector of line width of up/dn fitted line. The first element is for the object fitted line and the second element for the comparison fitted line. The default is c(1,2.

sfm.line.type

SFM line type. The default is "dashed"

add.legend

A logic flag to add a legend. The default is TRUE.

legend.loc

The default is "topleft".

legend.cex

cex of legend.

...

Other arguments can be used in plot. Please refer to plot.

Details

This method plots actual values against fitted value of up and down market time series factor model. The dots are actual values and the dashed lines are fitted values. Users can choose to add a single market factor model and a robust up and down model for comaprsion.

For other types of plots, use the list objects Up and Dn of class tsfmUpDn. The plot.tsfm can be applied.

Value

plot.tsfmUpDn returns a plot for an object of class tsfmUpDn.

Author(s)

Yi-An Chen

See Also

fitTsfmUpDn


[Package facmodTS version 1.0 Index]