strata.tool | R Documentation |
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.
## 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, ...)
x |
An object of class "strata" to print or to plot. |
logscale |
A logical indicating whether the X axis should be represented on the log scale or not. The default is FALSE. |
drop |
A integer indicating how many of the largest values of X should be omitted in the plot. This argument is useful when some large values of X stretch the X range too much. |
main |
A character string giving the title of the plot. |
xlab |
A character string naming the X axis. |
... |
Additional arguments affecting the print or the plot produced. |
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.
Sophie Baillargeon Sophie.Baillargeon@mat.ulaval.ca and
Louis-Paul Rivest Louis-Paul.Rivest@mat.ulaval.ca
Baillargeon, S. and Rivest L.-P. (2011). The construction of stratified designs in R with the package stratification. Survey Methodology, 37(1), 53-65.
strata.bh
, strata.cumrootf
, strata.geo
, strata.LH
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.