Learn R Programming

SpotSampling (version 0.1.0)

TemporalPivot: Adaptation of the local pivotal method on temporal samples

Description

This function considers longitudinal systematic sampling designs of two different units that result from function SystematicDesign. It allows to decide if one of these 2 units is selected at a specific time by putting at least one of the samples selection probabilities to 0. It is based on the local pivotal method.

Usage

TemporalPivot(design1, design2, d, EPS = 1e-06)

Arguments

design1

a longitudinal systematic sampling design of a first unit. The length of the longitudinal samples is \(T\). It results from function SystematicDesign.

design2

a longitudinal systematic sampling design of a second unit. The length of the longitudinal samples is \(T\). It results from function SystematicDesign.

d

a vector of size T that specify for which time \(t\) a decision must be taken, with \(1 \le t \le T\). d is such that the \(t\)-th element is equal to 1, and the others to 0.

EPS

a tolerance parameter. Default value is 1e-6.

Value

Returns a list including:

p1_new the updated probabilities of the longitudinal systematic sampling design of the first unit.

p2_new the updated probabilities of the longitudinal systematic sampling design of the second unit.

References

Quenouille, M. H. (1949). Approximate Tests of Correlation in time-Series. Royal Statistical Society, Series B Vol. 11, No. 1 (1949), pp. 68-84.

Tille, Y. (2020). Sampling and Estimation from Finite Populations. John Wiley & Sons, 91(4), page 89.

Grafstrom, A., Lundstrom, N. L. P., and Schelin, L. (2012). Spatially balanced sampling through the pivotal method. Biometrics, 68(2):514-520.

See Also

SystematicDesign

Examples

Run this code
# NOT RUN {
## Vectors of temporal inclusion probabilities with 3 waves ##
pik1   <- c(0.2,0.3,0.5) # of a first unit
pik2   <- c(0.1,0.4,0.5) # of a second unit
## Find the systematic sampling designs of pik1 and pik2 ##
design1 <- SystematicDesign(pik1, EPS = 1e-6)
design2 <- SystematicDesign(pik2, EPS = 1e-6)
## The time we want to take a decision ##
t    <- 2
d    <- rep(0,3)
d[t] <- 1
## Update probabilities to take a decision at wave t=2 ##
TemporalPivot(design1, design2, d)

# }

Run the code above in your browser using DataLab