Learn R Programming

StratifiedSampling (version 0.4.1)

vEst: Variance Estimation for balanced sample

Description

Estimated variance approximation calculated as the conditional variance with respect to the balancing equations of a particular Poisson design. See Tillé (2020)

Usage

vEst(Xauxs, piks, ys)

Value

Estimated variance of the horvitz-thompson estimator.

Arguments

Xauxs

A matrix of size (\(n\) x \(p\)) of auxiliary variables on which the sample must be balanced.

piks

A vector of inclusion probabilities. The vector has the size of the sample \(s\).

ys

A variable of interest.The vector has the size \(n\) of the sample \(s\).

Author

Raphaël Jauslin raphael.jauslin@unine.ch

References

Tillé, Y. (2020), Sampling and Estimation from finite populations, Wiley,

See Also

vDBS vApp

Examples

Run this code

N <- 100 
n <- 40
x1 <- rgamma(N,4,25)
x2 <- rgamma(N,4,25)

pik <- rep(n/N,N)
Xaux <- cbind(pik,as.matrix(matrix(c(x1,x2),ncol = 2)))
Xspread <- cbind(runif(N),runif(N))
  

s <- balseq(pik,Xaux,Xspread)
  
y <- Xaux%*%c(1,1,3) + rnorm(N,120) # variable of interest
  
vEst(Xaux[s,],pik[s],y[s])
vDBS(Xaux[s,],Xspread[s,],pik[s],y[s])
vApp(Xaux,pik,y)

Run the code above in your browser using DataLab