ggplot.qpin: PIN Visualization

Description Usage Arguments Details Value References See Also Examples

View source: R/qpin_plot.R

Description

Visualization of quarterly estimates and probability of informed trading with ggplot2.

Usage

1
2
## S3 method for class 'qpin'
ggplot(x)

Arguments

x

List returned by qpin

Details

Facets are grouped by probability parameters, intensity parameters and the probability of informed trading.

Value

An object of class ggplot.

References

Wickham, Hadley (2009)
ggplot2: Elegant Graphics for Data Analysis
Springer-Verlag New York
doi: 10.1007/978-0-387-98141-3

Wickham, Hadley (2007)
Reshaping Data with the reshape Package
Journal of Statistical Software, Volume 21, Issue 12, pp. 1 - 20
doi: 10.18637/jss.v021.i12

Wickham, Hadley (2016)
scales: Scale Functions for Visualization
R package version 0.4.0

See Also

qpin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Loading one year of simulated daily buys and sells

data('BSfrequent2015')

# Quarterly estimates for model parameters and the probability of informed trading
# Rownames of 'BSfrequent2015' equal the business days in 2015.

qpin_list <- qpin(numbuys = BSfrequent2015[,"Buys"], numsells = BSfrequent2015[,"Sells"],
                  dates = as.Date(rownames(BSfrequent2015), format = "%Y-%m-%d"))

# Visualization of quarterly estimates
library(ggplot2)
ggplot(qpin_list[["res"]])

pinbasic documentation built on May 2, 2019, 2:07 a.m.