Title: | Optimal Stratification in Stratified Sampling |
---|---|
Description: | An Optimization Algorithm Applied to Stratification Problem.This function aims at constructing optimal strata with an optimization algorithm based on a global optimisation technique called vns. |
Authors: | Leonardo de Lima, Jose Brito, Pedro Gonzalez and Breno Oliveira |
Maintainer: | Jose Brito <[email protected]> |
License: | GPL-2 |
Version: | 1.1 |
Built: | 2024-11-24 05:24:56 UTC |
Source: | https://github.com/cran/stratvns |
This function enumerates all feasible solutions to the stratification problem and produces the global optimum, applying an integer formulation proposed by Brito et al (2015).
STRATENUM(X, L, cvt = 0.1, nhmin = 2)
STRATENUM(X, L, cvt = 0.1, nhmin = 2)
X |
Stratification Variable |
L |
Number of strata |
cvt |
Target cv |
nhmin |
Mininum sample size by stratum |
STRATENUM
n |
Sample size |
nh |
Sample size by strata |
cv |
coefficient of variation |
Nh |
Strata sizes |
Vh |
Strata variances |
totoptg |
Total global optimal solutions |
tfeasible |
Total feasible solutions |
cputime |
Runtime in seconds |
Leonardo de Lima, Jose Brito, Pedro Gonzalez and Breno Oliveira
1. Brito, J.A.M., Silva, P.L.N., Semaan, G.S., Maculan, N., 2015. Integer programming formulations applied to optimal allocation in stratified sampling. Survey Methodology 41, 2, 427–442.
## Not run: Example1: s<-STRATENUM(U21,L=3,cvt=0.05) Example2: s<-STRATENUM(U15,L=4) Example3: s<-STRATENUM(U1,L=3,nhmin=4) ## End(Not run)
## Not run: Example1: s<-STRATENUM(U21,L=3,cvt=0.05) Example2: s<-STRATENUM(U15,L=4) Example3: s<-STRATENUM(U1,L=3,nhmin=4) ## End(Not run)
This function aims at constructing optimal strata with an optimization algorithm based on a global optimisation technique called Variable neighborhood search (VNS). The optimization algorithm is applied to solve the one dimensional case, which reduces the stratification problem to just determining strata boundaries. Assuming that the number L of strata and the coefficient of variation are fixed, it is possible to produce the strata boundaries by taking into consideration an objective function associated with the sample size. This function determines strata boundaries so that the elements in each stratum are more homogeneous among themselves and produce minimum sample size applying an integer formulation proposed by Brito et al (2015).
STRATVNS( X, L = 3, cvt = 0.1, nhmin = 2, maxstart = 3, imax = 3, kmax = 3, s = 30, sl = 50, tmax = 15, nsols = 20, cputime = 3600, nIterWithNoImpMax = 5, parallelize = TRUE )
STRATVNS( X, L = 3, cvt = 0.1, nhmin = 2, maxstart = 3, imax = 3, kmax = 3, s = 30, sl = 50, tmax = 15, nsols = 20, cputime = 3600, nIterWithNoImpMax = 5, parallelize = TRUE )
X |
Stratification Variable |
L |
Number of strata |
cvt |
Target cv |
nhmin |
Mininum sample size by stratum |
maxstart |
Number of iterations in multstart |
imax |
Maximum Number Iterations - VNS |
kmax |
Maximum Neighborhoods = number of cut points selected to apply shaking and local search |
s |
Range of shaking procedure |
sl |
Range of RVNS procedure |
tmax |
Maximum number cut points in neighborhoods |
nsols |
Number of initial solutions generated |
cputime |
Maximum cpu time in seconds |
nIterWithNoImpMax |
Maximum number of iterations without improvement in VNS |
parallelize |
TRUE = Performs multiple vns calls in parallel |
STRATVNS
bk |
Cut points |
n |
Minimum sample size |
nh |
Sample size by strata |
cv |
coefficient of variation |
Nh |
Strata sizes |
Vh |
Strata variances |
cputime |
Runtime in seconds |
Leonardo de Lima, Jose Brito, Pedro Gonzalez and Breno Oliveira
1. Hansen, P., Mladenovi´c, N., 2001. Variable neighborhood search: Principles and applications. European Journal of Operational Research 130, 3, 449 – 467.
2. Brito, J.A.M., Silva, P.L.N., Semaan, G.S., Maculan, N., 2015. Integer programming formulations applied to optimal allocation in stratified sampling. Survey Methodology 41, 2, 427–442.
## Not run: Example1: s<-STRATVNS(U1,L=4,cvt=0.05,nhmin=3) Example2: s<-STRATVNS(U15,L=3) #'Example3: s<-STRATVNS(U21,L=5) Example4: s<-STRATVNS(U1,L=3,nhmin=4) ## End(Not run)
## Not run: Example1: s<-STRATVNS(U1,L=4,cvt=0.05,nhmin=3) Example2: s<-STRATVNS(U15,L=3) #'Example3: s<-STRATVNS(U21,L=5) Example4: s<-STRATVNS(U1,L=3,nhmin=4) ## End(Not run)
Australian cattle farms stratified by industrial regions
U1
U1
A vector 430x1:
U1
1. Chambers, R., Dunstan, R., 1986. Estimating distribution functions from survey data. Biometrika 73, 3, 597–604.
Population in thousands of 284 municipalities in Sweden in 1975
U15
U15
A vector 284x1:
U15
Särndal, C.E., Swensson,B., Wretman, J. (2003). Model Assisted Survey Sampling, 1st edition, Springer.
Million dollar funds from major US commercial banks
U21
U21
A vector 357x1:
U21
Särndal, C.E., Swensson,B., Wretman, J. (2003). Model Assisted Survey Sampling, 1st edition, Springer.