Learn R Programming

BalancedSampling (version 1.6.3)

probabilities: Inclusion probabilities

Description

Computes the first-order inclusion probabilities from a vector of positive numbers (for a probability proportional-to-size sampling design). This function is borrowed from the package "sampling" by Alina Matei and Yves Tillé. Licence (GPL >=2).

Usage

probabilities(a,n)

Arguments

a

vector of positive numbers

n

sample size

Examples

Run this code
if (FALSE) {
############
## Example 
############
# a vector of positive numbers
a=1:20
# computation of the inclusion probabilities for a sample size n=12
pik=probabilities(a,12)
pik
}

Run the code above in your browser using DataLab