Learn R Programming

pinbasic (version 1.2.2)

ggplot.qpin: PIN Visualization

Description

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

Usage

# S3 method for qpin
ggplot(x)

Arguments

x

List returned by qpin

Value

An object of class ggplot.

Details

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

References

Wickham, Hadley (2009) ggplot2: Elegant Graphics for Data Analysis Springer-Verlag New York 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 10.18637/jss.v021.i12

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

See Also

qpin

Examples

Run this code
# NOT RUN {
# 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"]])

# }

Run the code above in your browser using DataLab