1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
|
\name{plot-stars}
\alias{starsPlot}
\alias{assetsStarsPlot}
\alias{assetsBasicStatsPlot}
\alias{assetsMomentsPlot}
\alias{assetsBoxStatsPlot}
\alias{assetsNIGFitPlot}
\title{Stars Plots of Assets.}
\description{
Displays star plots to compare assets sets.
}
\usage{
assetsStarsPlot(x, method = c("segments", "stars"), locOffset = c(0, 0),
keyOffset = c(0, 0), \dots)
assetsBoxStatsPlot(x, par = TRUE, oma = c(0,0,0,0), mar = c(4, 4, 4, 4),
keyOffset = c(-0.65, -0.50), main = "Assets Statistics",
title = "Assets", titlePosition = c(3, 3.65),
description = "Box Plot Statistics", descriptionPosition = c(3, 3.50), \dots)
assetsBasicStatsPlot(x, par = TRUE, oma = c(0,0,0,0), mar = c(4, 4, 4, 4),
keyOffset = c(-0.65, -0.50), main = "Assets Statistics",
title = "Assets", titlePosition = c(3, 3.65),
description = "Basic Returns Statistics", descriptionPosition = c(3, 3.50), \dots)
assetsMomentsPlot(x, par = TRUE, oma = c(0,0,0,0), mar = c(4, 4, 4, 4),
keyOffset = c(-0.65, -0.50), main = "Assets Statistics",
title = "Assets", titlePosition = c(3, 3.65),
description = "Moments Statistics", descriptionPosition = c(3, 3.50), \dots)
assetsNIGFitPlot(x, par = TRUE, oma = c(0,0,0,0), mar = c(4, 4, 4, 4),
keyOffset = c(-0.65, -0.50), main = "Assets Statistics",
title = "Assets", titlePosition = c(3, 3.65),
description = "NIG Parameters", descriptionPosition = c(3, 3.50), \dots)
}
\arguments{
\item{description}{
a destription string.
}
\item{descriptionPosition}{
the position of the description string.
}
\item{method}{
a character string from to select the plot method. Eiter a
\code{"star"} or a \code{"segment"} plot.
}
\item{keyOffset}{
a numeric vector of lenght two, specifying an offset in the
legend with respect to \code{x} and
\code{y} direction.
}
\item{locOffset}{
a numeric vector of lenght two, specifying an offset in the
location of the stars/circles with respect to \code{x} and
\code{y} direction.
}
\item{main}{
to set the main title.
}
\item{mar}{
to set the number of lines of margin to be specified on the four
sides of the plot. The default is \code{c(5,4,4,2)+0.1}.
}
\item{oma}{
to set the size of the outer margins in lines of text.
}
\item{par}{
a logical flag. Should be internal \code{par()} setting be used?
}
\item{title}{
a character string, the plot title.
}
\item{titlePosition}{
the position of the title string.
}
\item{x}{
any rectangular time series object which can be converted by the
function \code{as.matrix()} into a matrix object, e.g. like an
object of class \code{timeSeries}, \code{data.frame}, or \code{mts}.
}
\item{\dots}{
optional arguments to be passed.
}
}
\details{
\code{assetsStarsPlot}\cr
draws segment or star diagrams of data sets,
\code{assetsBasicStatsPlot}\cr
displays a segment plot of box plot statistics,
\code{assetsMomentsPlot}\cr
displays a segment plot of distribution moments,
\code{assetsBoxStatsPlot}\cr
displays a segment plot of box plot statistics,
\code{assetsNIGFitPlot}\cr
displays a segment plot NIG parameter estimates.
}
\author{
Diethelm Wuertz for the Rmetrics port.
}
\references{
Wuertz, D., Chalabi, Y., Chen W., Ellis A. (2009);
\emph{Portfolio Optimization with R/Rmetrics},
Rmetrics eBook, Rmetrics Association and Finance Online, Zurich.
}
\examples{
## LPP2005REC -
# Load Swiss Pension Fund Data:
LPP <- LPP2005REC
head(LPP)
## assetsBasicStatsPlot -
# Create a basic Stats Plot: assetsBasicStatsPlot -
# par(mfrow = c(1, 1))
assetsBasicStatsPlot(LPP, title = "", description = "")
## assetsMomentsPlot -
# Create a Moments Plot: assetsMomentsPlot -
assetsMomentsPlot(LPP, title = "", description = "")
## assetsBoxStatsPlot -
# Create a Box Stats Plot: assetsBoxStatsPlot -
assetsBoxStatsPlot(LPP, title = "", description = "")
## assetsNIGFitPlot -
# Create a NIG Fit Plot: assetsNIGFitPlot -
assetsNIGFitPlot(LPP[, 7:9], title = "", description = "")
}
\keyword{models}
|