File: plot-qqPlot.Rd

package info (click to toggle)
fbasics 4052.98-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,020 kB
  • sloc: ansic: 738; makefile: 14
file content (165 lines) | stat: -rw-r--r-- 4,001 bytes parent folder | download
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
164
165
\name{QuantileQuantilePlots}

\alias{qqnormPlot}
\alias{qqnigPlot}
\alias{qqghtPlot}
\alias{qqgldPlot}

\concept{quantile-quantile plot}
\concept{qq-plot}
\concept{qqplot}

\concept{normal distribution}
\concept{inverse Gaussian distribution}
\concept{generalized hyperbolic Student-t distribution}
\concept{generalized lambda distribution}

\title{Quantile-quantile plots}

\description{
    
    Produce quantile-quantile plots for the normal, inverse Gaussian,
    generalized hyperbolic Student-t and the generalized lambda
    distributions.
    
}

\usage{     
qqnormPlot(x, labels = TRUE, col = "steelblue", pch = 19,
    title = TRUE, mtext = TRUE, grid = FALSE, rug = TRUE, 
    scale = TRUE, \dots) 
qqnigPlot(x, labels = TRUE, col = "steelblue", pch = 19,
    title = TRUE, mtext = TRUE, grid = FALSE, rug = TRUE, 
    scale = TRUE, \dots) 
qqghtPlot(x, labels = TRUE, col = "steelblue", pch = 19,
    title = TRUE, mtext = TRUE, grid = FALSE, rug = TRUE, 
    scale = TRUE, \dots) 
qqgldPlot(x, labels = TRUE, col = "steelblue", pch = 19,
    title = TRUE, mtext = TRUE, grid = FALSE, rug = TRUE, 
    scale = TRUE, \dots)
}

\arguments{
  \item{x}{

    an object of class \code{"timeSeries"} or any other object which can
    be transformed by \code{as.timeSeries}.

  }  
  \item{labels}{

    a logical flag, should the plot be returned with default labels and
    decorated in an automated way? By default \code{TRUE}.

  }  
  \item{col}{

    the color for the series. In the univariate case use just a color
    name like the default, \code{col = "steelblue"}, in the multivariate
    case we recommend to select the colors from a color palette,
    e.g. \code{col = heat.colors(ncol(x))}.

  }
  \item{pch}{

    an integer value, by default 19. Which plot character should be used
    in the plot?

  }
  \item{title}{

    a logical flag, by default \code{TRUE}. Should a default title be
    added to the plot?

  }
  \item{mtext}{

    a logical flag, by default \code{TRUE}. Should a marginal text be
    printed on the third site of the graph?

  }
  \item{grid}{

    a logical flag, should a grid be added to the plot?  By default
    \code{TRUE}.

  } 
  \item{rug}{

    a logical flag, by default \code{TRUE}. Should a rug representation
    of the data be added to the plot?

  }
  \item{scale}{

    a logical flag, by default \code{TRUE}. Should the plot be for the
    scaled time series? Used by \code{qqnormPlot} only, ignored silently
    by the others.

  }
  \item{\dots}{
    optional arguments passed to \code{plot()}.
  }
    
}

\details{
    
  \code{qqnormPlot} produces a tailored Normal quantile-quantile plot.
  
  \code{qqnigPlot}  produces a tailored NIG quantile-quantile plot.
  
  \code{qqghtPlot}  produces a tailored GHT quantile-quantile plot.
  
  \code{qqgldPlot}  produces a tailored GLD quantile-quantile plot.
}

\value{
  a list containing some of the quantities computed for the plot,
  invisibly. Currently contains the following components:
  \item{x}{the quantiles of the reference distribution, used for the
    x-axis,}
  \item{y}{the (possibly scaled) ordered values of the time series, used
    for the y-axis.}

  The list has attribute \code{"control"} containing the parameters of
  the fitted distribution.
}

\author{
  Diethelm Wuertz for the Rmetrics \R-port.
}

\seealso{
  \code{\link{seriesPlot}},
  \code{\link{returnPlot}},
  \code{\link{cumulatedPlot}},
  \code{\link{drawdownPlot}}

  \code{\link{histPlot}},
  \code{\link{densityPlot}},
  \code{\link{logDensityPlot}}

  \code{\link{boxPlot}},
  \code{\link{boxPercentilePlot}}

  \code{\link{acfPlot}},
  \code{\link{pacfPlot}},
  \code{\link{teffectPlot}},
  \code{\link{lacfPlot}}

  \code{\link{scalinglawPlot}}

  \code{\link{returnSeriesGUI}}
}
\examples{
## data
data(LPP2005REC, package = "timeSeries")
SPI <- LPP2005REC[, "SPI"]
plot(SPI, type = "l", col = "steelblue", main = "SP500")
abline(h = 0, col = "grey")
   
qqnormPlot(SPI) 
}

\keyword{hplot}