strata.tool {stratification} | R Documentation |
Functions to Visualize Stratified Designs
Description
print.strata
prints a "strata" object, presenting the stratification information into a table.
plot.strata
produces a histogram of the stratification variable X
, in which the stratification boundaries are drawn. A table with the Nh
and nh
values is also added at the top of the plot.
Usage
## S3 method for class 'strata'
print(x, ...)
## S3 method for class 'strata'
plot(x, logscale = FALSE, drop = 0, main =
paste("Graphical Representation of the Stratified Design", xname),
xlab, ...)
Arguments
x |
An object of class "strata" to print or to plot. |
logscale |
A logical indicating whether the |
drop |
A integer indicating how many of the largest values of |
main |
A character string giving the title of the plot. |
xlab |
A character string naming the |
... |
Additional arguments affecting the print or the plot produced. |
Note
When the object of class "strata" contains a certainty stratum, plot.strata
removes from the data the units in this stratum before generating the histogram.
Author(s)
Sophie Baillargeon Sophie.Baillargeon@mat.ulaval.ca and
Louis-Paul Rivest Louis-Paul.Rivest@mat.ulaval.ca
References
Baillargeon, S. and Rivest L.-P. (2011). The construction of stratified designs in R with the package stratification. Survey Methodology, 37(1), 53-65.
See Also
strata.bh
, strata.cumrootf
, strata.geo
, strata.LH
Examples
cumrootf <- strata.cumrootf(x=MRTS, CV=0.01, Ls=4, alloc=c(0.5,0,0.5), nclass=500)
print(cumrootf)
plot(cumrootf)
plot(cumrootf, drop=5)
plot(cumrootf, logscale=TRUE)
geo <- strata.geo(x=MRTS, CV=0.01, Ls=4, alloc=c(0.5,0,0.5))
print(geo)
plot(geo, logscale=TRUE)
# The geometric method does not perform well because of some small units
LH <- strata.LH(x=MRTS, CV=0.01, Ls=4, alloc=c(0.5,0,0.5), takeall=1)
print(LH)
plot(LH, logscale=TRUE)