This function is a modified version of cdf.plot() of
spsurvey-package including new argument options.
cdfPlot(
obj,
ind,
units.cdf = "percent",
type.plot = "s",
type.cdf = "continuous",
logx = "",
xlbl = NULL,
ylbl = "Percent",
ylbl.r = NULL,
figlab = NULL,
legloc = "BR",
confcut = 5,
show.conflev = TRUE,
conflev = 95,
show.param = TRUE,
round = 0,
col.param = "black",
...
)Object with the estimated CDF. The resulting object of
cont.analysis() of spsurvey-package.
Indicator variable. The name of the variable as displayed in the
resulting object of cont.analysis().
Indicator for the type of units in which the CDF is
plotted, where “percent” means the plot is in terms of percent of the
population, and “units” means the plot is in terms of units of the
population. Defaults to units.cdf = "percent".
Type of plot. Desired type of plot to be produced, with
options type.plot = "l", for ‘line’, and type.plot =
"s" for ‘stair’. See ‘Details’. Defaults to type.plot =
"s".
Character string consisting of the value “continuous”
or “ordinal” that controls the type of CDF plot for each indicator.
Defaults to type.cdf = "continuous".
Character string consisting of the value "" or "x"
that controls whether the x axis uses the original scale ("") or the
base 10 logarithmic scale ("x"). Defaults to logx = "".
Character string providing the x-axis label. If this argument
equals NULL, then the indicator name is used as the label. Defaults
to xlbl = NULL.
Character string providing the the y-axis label. Defaults to
ylbl = "Percent".
Character string providing the label for the right side
y-axis, where ylbl.r = NULL means a label is not created, and
ylbl.r = "Same" means the label is the same as the left side label
(i.e., argument ylbl). Defaults to ylbl.r = NULL.
Character string providing the plot title. Defaults to
figlab = NULL.
Indicator for location of the plot legend, where legloc
= "BR" means bottom right, legloc = "BL" means bottom left,
legloc = "TR" means top right, and legloc = "TL" means top
left. Defaults to legloc = "BR".
Numeric value that controls plotting confidence limits at the
CDF extremes. Confidence limits for CDF values (percent scale) less than
confcut or greater than 100 minus confcut are not plotted. A
value of zero means confidence limits are plotted for the complete range of
the CDF. Defaults to confcut = 5.
Logical for showing the confidence limits of the CDF.
Defaults to show.conflev = TRUE.
Numeric value of the confidence level used for confidence
limits. Defaults to conflev = 95.
Logical for showing the parameters of the CDF. Available
parameters are the mean, the median, and a percentile defined by the
argument conflev. The legend displays de actual values of all three
parameters, including the standard deviation of the mean. The percentile
value is calculated using spsurvey::interp.cdf().
Numeric to set the rounding level of the parameters of the CDF.
Color of the lines showing the parameters of the CDF.
Defaults to col.param = "black".
Additional arguments passed to plot(). See
‘Details’.
A plot of the estimated cumulative distribution function with confidence limits.
Parameter type.plot is used only when type.cdf = "Continuous".
Care should be taken with possible conflicts between the arguments of the
original function cdf.plot and those passed to
plot() using .... The existence of conflicts between these two
functions was one of the reasons for creating this new implementation.
Brus, D. J., Kempen, B. and Heuvelink, G. B. M. (2011). Sampling for validation of digital soil maps. European Journal of Soil Science, v. 62, p. 394-407.
Diaz-Ramos, S., D.L. Stevens, Jr., and A.R. Olsen. (1996). EMAP Statistical Methods Manual. EPA/620/R-96/XXX. Corvallis, OR: U.S. Environmental Protection Agency, Office of Research and Development, National Health Effects and Environmental Research Laboratory, Western Ecology Division.
Kincaid, T. M. and Olsen, A. R. (2013) spsurvey: Spatial Survey Design and Analysis. R package version 2.6. URL: http://www.epa.gov/nheerl/arm/.
# NOT RUN {
# }
# NOT RUN {
if (require(spsurvey)) {
## Estimate the CDF
my.cdf <- spsurvey::cont.analysis(spsurvey.obj = my.spsurvey)
## See indicator levels in the resulting object
levels(my.cdf$Pct$Indicator)
## Plot CDF
cdfPlot(obj = my.cdf, ind = "dz", figlab = "",
xlbl = "Difference (m)", xlim = c(-30, 10), type.plot = "s")
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab