Description Usage Arguments Details Value Author(s) References See Also Examples

Draws a Bernoulli sample without replacement of expected size $n$ from a population of size $N$

1 | ```
S.BE(N, prob)
``` |

`N` |
Population size |

`prob` |
Inclusion probability for each unit in the population |

The selected sample is drawn according to a sequential procedure algorithm based on an uniform distribution. The Bernoulli sampling design is not a fixed sample size one.

The function returns a vector of size *N*. Each element of this vector indicates if the unit was selected. Then,
if the value of this vector for unit *k* is zero, the unit *k* was not selected in the sample; otherwise, the unit was
selected in the sample.

Hugo Andres Gutierrez Rojas hugogutierrez@usantotomas.edu.co

Sarndal, C-E. and Swensson, B. and Wretman, J. (1992), *Model Assisted Survey Sampling*. Springer.

Gutierrez, H. A. (2009), *Estrategias de muestreo: Diseno de encuestas y estimacion de parametros*.
Editorial Universidad Santo Tomas.

Tille, Y. (2006), *Sampling Algorithms*. Springer.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ```
############
## Example 1
############
# Vector U contains the label of a population of size N=5
U <- c("Yves", "Ken", "Erik", "Sharon", "Leslie")
# Draws a Bernoulli sample without replacement of expected size n=3
# The inlusion probability is 0.6 for each unit in the population
sam <- S.BE(5,0.6)
sam
# The selected sample is
U[sam]
############
## Example 2
############
# Uses the Lucy data to draw a Bernoulli sample
data(Lucy)
attach(Lucy)
N <- dim(Lucy)[1]
# The population size is 2396. If the expected sample size is 400
# then, the inclusion probability must be 400/2396=0.1669
sam <- S.BE(N,0.01669)
# The information about the units in the sample is stored in an object called data
data <- Lucy[sam,]
data
dim(data)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.