data(oaxaca) #Loads the Oaxaca municipalities dataset
s <- oaxaca$sSW_10_3 #Defines the sample to be used
SampData <- oaxaca[s==1, ] #Defines the sample dataset
nII <- 3 #Defines the 2nd stage fixed sample size
CluLab.s <- SampData$IDDISTRI #Defines the clusters' labels
CluSize.s <- SampData$SIZEDIST #Defines the clusters' sizes
piIi.s <- (10 * CluSize.s / 570) #Reconstructs clusters' 1st order incl. probs.
pik.s <- piIi.s * (nII/CluSize.s) #Reconstructs elements' 1st order incl. probs.
y1.s <- SampData$POP10 #Defines the variable y1
y2.s <- SampData$POPMAL10 #Defines the variable y2
x.s <- SampData$HOMES10 #Defines the variable x
#Computes the var. est. of the corr. coeff. point estimator using y1
VE.Jk.EB.SW2.Corr.Hajek(y1.s, x.s, pik.s, nII, piIi.s, CluLab.s, CluSize.s)
#Computes the var. est. of the corr. coeff. point estimator using y2
VE.Jk.EB.SW2.Corr.Hajek(y2.s, x.s, pik.s, nII, piIi.s, CluLab.s, CluSize.s)
Run the code above in your browser using DataLab