plot.PPSfit {ParetoPosStable} | R Documentation |
Plots to validate a Pareto Positive Stable (PPS) fit
Description
Plots to validate a PPS fit (typically from PPS.fit()
) with different comparisons between empirical and theoretical functions.
Usage
## S3 method for class 'PPSfit'
plot(x, which = 1:4, ask = prod(par("mfcol")) <
length(which) && dev.interactive(), ylim, breaks, ...)
Arguments
x |
a |
which |
values from 1 to 4 indicating the type of plot. |
ask |
an argument to control the plot window. |
ylim |
optional argument to control the y limits of the histogram. It is included to prevent non-desired scales on the y-axis. |
breaks |
optional argument to control the breakpoints of the histogram. See |
... |
other arguments. |
Details
The plots return:
1. The histogram of the observations and the fitted PPS density (which = 1
). Optional ylim
and breaks
arguments are provided to prevent frequent imbalances between density and histogram scales in real data: they work as the analogue arguments of the default hist
function.
2. The empirical distribution function of data and the cumulative distribution function of the fitted model (which = 2
).
3. A rank-size plot in log-log scale to check the Pareto or power-law behaviour of data (which = 3
). In the X-axis the log of the observations appears; in the Y-axis, the log of the empirical survival function. If the scatter-plot is around a straight line, then the observations exhibit a power law behaviour. The plot also includes the curve with the theoretical survival function of the model specified in the first argument class PPSfit
: only when nu
is 1, that curve is going to be a straight line.
4. A plot in a double log-log scale to check the adequacy of data to the PPS model (which = 4
). On one hand, the X-axis shows the double log of the observations divided by the scale parameter, while the Y-axis shows the log of minus the log of the empirical survival function. On the other hand, the straight line determined by the linear relation between the survival function and the scaled data in a double log-log scale, in relation to the argument class PPSfit
is added. The proximity of the points in the scatter-plot to that straight line is an evidence in favour of a PPS behaviour of data.
References
Sarabia, J.M and Prieto, F. (2009). The Pareto-positive stable distribution: A new descriptive model for city size data, Physica A: Statistical Mechanics and its Applications, 388(19), 4179-4191.
See Also
Examples
data(forbes400)
fit <- PPS.fit(forbes400$NetWorth)
par(mfrow=c(2,2))
plot(fit)
dev.off()
plot(fit, which = 1, breaks = seq(0, 60, length.out = 60))