plotlmrdia46 | R Documentation |
Plot the Tau4-Tau6 L-moment ratio diagram showing trajectories of \tau_4
and \tau_6
for strictly symmetrical distributions from a Tau4-Tau6 L-moment ratio diagram object returned by lmrdia46
. This diagram is useful for selecting among symmetrical distributions to model the data. This function is intended to function as a demonstration of Tau4-Tau6 L-moment ratio diagram plotting with enough user settings for many practical applications.
plotlmrdia46(lmr=NULL, nopoints=FALSE, nolines=FALSE,
noaep4=FALSE, nogld_byt5opt=TRUE,
nopdq4=FALSE, nost3=FALSE, nosymstable=FALSE, notukey=FALSE,
nocau=TRUE, nonor=FALSE, nosla=TRUE, trucate.tau4.to.gtzero=TRUE,
xlab="L-kurtosis (Tau4), dimensionless",
ylab="Sixth L-moment ratio (Tau6), dimensionless",
add=FALSE, empty=FALSE,
autolegend=FALSE, xleg=NULL, yleg=NULL, legendcex=0.9,
ncol=1, text.width=NULL, lwd.cex=1, expand.names=FALSE, ...)
lmr |
L-moment diagram object from |
nopoints |
If |
nolines |
If |
noaep4 |
If |
nogld_byt5opt |
If |
nopdq4 |
If |
nost3 |
If |
nosymstable |
If |
notukey |
If |
nocau |
If |
nonor |
If |
nosla |
If |
trucate.tau4.to.gtzero |
Truncate the distributions that can extend to negative |
xlab |
Horizonal axis label passed to |
ylab |
Vertical axis label passed to |
add |
A logical to toggle a call to |
empty |
A logical to return before any trajectories are plotted but after the condition of the |
autolegend |
Generate the legend by built-in algorithm. |
xleg |
X-coordinate of the legend. This argument is checked for being a character versus a numeric. If it is a character, then |
yleg |
Y-coordinate of the legend. |
legendcex |
The |
ncol |
The number of columns in which to set the legend items (default is 1, which differs from |
text.width |
Argument of the same name for |
lwd.cex |
Expansion factor on the line widths. |
expand.names |
Expand the distribution names in the legend. |
... |
Additional arguments passed into the |
This function provides hardwired calls to lines
and points
to produce the diagram. The plot symbology for the shown distributions is summarized here.
GRAPHIC TYPE | GRAPHIC NATURE |
Symmetric Exponential Power | line width 1, line type 4 (dot), and color red |
Generalized Lambda | line width 1, line type 1 (solid), and color purple |
Polynomial Density-Quantile4 | line width 1, line type 1 (solid), and color darkgreen |
Student t | line width 1, line type 1 (solid), and color blue |
Symmetric Stable | line width 2, line type 1 (solid), and color a medium-dark grey |
Tukey Lambda (1-p) | line width 1, line type 2 (dash), and color purple |
Normal | symbol 15 (filled square) and color red |
Cauchy | symbol 13 (circle with over lapping \times ) and color turquoise4 |
Slash | symbol 10 (cicle containing + ) and color turquoise4 |
W.H. Asquith
Asquith, W.H., 2014, Parameter estimation for the 4-parameter asymmetric exponential power distribution by the method of L-moments using R: Computational Statistics and Data Analysis, v. 71, pp. 955–970.
lmrdia46
, plotlmrdia
plotlmrdia46(lmrdia46(), nogld_byt5opt=FALSE, autolegend=TRUE,
xleg="topleft")
## Not run:
# A more complex example follows: for a given mean, L-scale, L-skew = 0 (symmetry), and
# L-kurtosis, use sample size of 30, use 500 simulations, set L-moments,
# fit the Asymmetric Exponential Power4 distribution, which is symmetrical when the
# L-skew is zero and thus the distribution is the Exponential Power.
T3 <- 0; T4 <- 0.21; n <- 30; nsim <- 500
lmr <- vec2lmom(c(10000, 7500, T3, T4, 0)); aep4 <- paraep4(lmr)
T6 <- theoLmoms(aep4, nmom=6)$ratios[6]
# create vectors for storing simulated L-kurtosis (t4) and Tau6 (t6)
t4 <- t6 <- vector(mode="numeric")
# perform nsim simulations by randomly drawing from the AEP4 distribution
# and compute the L-moments in sim.lmr and store the t4 and t6 of each sample
for(i in 1:nsim) {
sim.lmr <- lmoms(rlmomco(n, aep4), nmom=6)
t4[i] <- sim.lmr$ratios[4]; t6[i] <- sim.lmr$ratios[6]
}
# plot the diagram and "zoom" by manually setting the axis limits
plotlmrdia46(xlim=c(-0.05, 0.5), ylim=c(-0.1, 0.35), las=1, empty=TRUE)
# follow up by plotting the {t3, t4} values and the mean of the values
points(t4, t6, cex=0.8, pch=21, bg="white", lwd=0.8) # plot each simulation
# plot crossing dashed lines at true values of L-skew and L-kurtosis
abline(v=T4, col="salmon4", lty=2, lwd=3) # Theoretical values for the
abline(h=T6, col="salmon4", lty=2, lwd=3) # distribution as fit
points(mean(t4), mean(t6), pch=16, cex=3) # mean of simulations and
# should plot reasonably close to the salmon4-colored crossing lines
# plot the trajectories of the distributions
plotlmrdia46(lmrdia46(), add=TRUE, nopoints=TRUE, inset=0.01,
autolegend=TRUE, xleg="topleft", lwd.cex=1.5) #
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.