plotErrorSample: Error-Sample Size graph

Description Usage Arguments Value Author(s) Examples

View source: R/plotErrorSample.R

Description

Plots a Error-Sample Size graph from another object (a list) containing a vector of measurement error and its related vector of estimated sample sizes

Usage

1
plotErrorSample(x, point = TRUE, ...)

Arguments

x

a list, usually produced with other sample size estimation formulas as CochranCont(), which contains at least:

x$Evect, a vector of possible measurement error values

x$nvect, a vector of estimated sample sizes for each value of x$Evect

point

logical, if set to TRUE a point will be marked at x$Error, x$n, which is the sample size estimated for this Error value

printlegend

logical, if set to TRUE a legend will be print with values used to compute sample size: alfa, and sigma (if a continuous variable) or p/q (if a discrete one). If no sigma nor p/q could be found, a warning will be shown

...

other arguments passed from plot(), like xlim(), ylim(), etc.

Value

An Error-Sample Size plot

Author(s)

Miguel Menéndez

Examples

1
2
3
4
5
6
7
size1 <- CochranCont(alfa = 0.05, sigma = 15, E = 2, N = 2000, correct = TRUE)
plotErrorSample(size1, xlim = c(0,6), ylim = c(0,200),
                xlab = "Error", ylab = "Sample Size")

size2 <- CochranDis(alfa = 0.05, p = 0.20, E = 0.05)
plotErrorSample(size2, point = TRUE,
                xlab = "Error (en tanto por uno)", ylab = "Tamaño muestral")

MiguelMenendezOrenga/usualsupport documentation built on April 11, 2020, 11:43 a.m.