Learn R Programming

pedometrics (version 0.6-3)

cdfPlot: Plot estimated cumulative distribution function with confidence limits

Description

This function is a modified version of cdf.plot() of spsurvey-package including new argument options.

Usage

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", ...)

Arguments

obj
Object with the estimated CDF. The resulting object of cont.analysis() of spsurvey-package.
ind
Indicator variable. The name of the variable as displayed in the resulting object of cont.analysis().
units.cdf
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
type.plot
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".
type.cdf
Character string consisting of the value continuous or ordinal that controls the type of CDF plot for each indicator. Defaults to type.cdf = "continuous".
logx
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 = "".
xlbl
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.
ylbl
Character string providing the the y-axis label. Defaults to ylbl = "Percent".
ylbl.r
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
figlab
Character string providing the plot title. Defaults to figlab = NULL.
legloc
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 legl
confcut
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 l
show.conflev
Logical for showing the confidence limits of the CDF. Defaults to show.conflev = TRUE.
conflev
Numeric value of the confidence level used for confidence limits. Defaults to conflev = 95.
show.param
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
round
Numeric to set the rounding level of the parameters of the CDF.
col.param
Color of the lines showing the parameters of the CDF. Defaults to col.param = "black".
...
Additional arguments passed to plot(). See Details.

Value

  • A plot of the estimated cumulative distribution function with confidence limits.

Details

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.

References

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/.

See Also

cdf.plot.

Examples

Run this code
## Estimate the CDF
my.cdf <- 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")

Run the code above in your browser using DataLab