Learn R Programming

bootstrapFP (version 0.4.6)

define_phi: Define the phi vector

Description

Define the phi vector used to select the first sample in Antal & Tillé (2011) bootstrap (algorithm 4, first step). If the sum of the elements of \(\phi\) is not an integer, phi is decomposed in a convex combination of two vectors \(\phi_1\) and \(\phi_2\), such that the sum of \(\phi_1i\) is the integer part of \(\sum phi_i\) and the sum of \(\phi_2i\) is the integer part of \(\sum phi_i\) plus 1 [see Antal and Tille' (2011) bootstrap procedure for unequal probability sampling, p. 539 - Algorithm 4, Case 1] The procedure used to decompose the vector \(\phi\) is described in the answer to this question: https://math.stackexchange.com/questions/2700483/vector-decomposition-into-a-convex-combination-of-two-vectors-with-constraints-o

Usage

define_phi(phi)

Value

a list with the two vectors in which phi is decomposed

Arguments

phi

vector of inclusion probabilities for Antal and Tillé (2011) bootstrap, given by 1 - D_kk