Inclusion Probabilities: Simple Random Sampling

simple_rs_probabilities(N, prob = NULL, prob_unit = NULL,
check_inputs = TRUE, simple = TRUE)

## Arguments

N The number of units. N must be a positive integer. (required) prob is the probability of being sampled must be a real number between 0 and 1 inclusive, and must be of length 1. (optional) prob is the probability of being sampled must be a real number between 0 and 1 inclusive, and must be of length N. (optional) logical. Defaults to TRUE. logical. internal use only.

## Value

A vector length N indicating the probability of being sampled.

## Examples

probs <- simple_ra_probabilities(N = 100)
table(probs)
#> probs
#> 0.5
#> 200
probs <- simple_ra_probabilities(N = 100, prob = 0.3)
table(probs)
#> probs
#> 0.3 0.7
#> 100 100