Description Usage Arguments Details Value Author(s) References See Also Examples
The function computes the inclusion probabilities for Sunter sampling.
1 | sunterpi(x, n)
|
x |
the vector of values of the auxiliary variable (measure of size) |
n |
the sample size |
Citing the reference, "For the most part of the population, Sunter's scheme gives the inclusion probability π_k strictly proportional to x_k. For a small portion of the population, corresponding to the elements with the smallest x_k-values, equal, rather than x_k-proportional, inclusion probability is applied to gain simplicity."
a vector that contains the first-order inclusion probabilities for each unit k in the population; N is the population size.
Alessandro Barbiero, Giancarlo Manzi
C-E. Sarndal, B. Swensson, J. Wretman: Model Assisted Survey Sampling, Springer, New York, 1992
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Ex.1 from Sarndal et al. (1992)
x<-c(40,25,20,10,5)
n<-2
sunterpi(x,n)
# note that the inclusion probabilities are not exactly proportional
# to the measures of size
n*x/sum(x)
# Ex.2
# set the population size
N<-100
set.seed(1)
# build a vector of measures of size
x<-rnorm(N,100,25)
sort(x)
# set the sample size
n<-10
# inclusion probabilities for Sunter's sampling
pi<-sunterpi(x,n)
pi
# theoretical inclusion probabilities
pik<-n*x/sum(x)
pik
# note the difference between actual and theoretical inclusion probabilities
sort(pi)
sort(pik)
|
[1] 0.8000000 0.5000000 0.2333333 0.2333333 0.2333333
[1] 0.8 0.5 0.4 0.2 0.1
[1] 44.63250 50.26621 54.87603 61.91083 63.23119 65.57351 68.08519
[8] 68.65916 69.38468 71.76592 73.89663 76.64756 79.10928 79.48829
[15] 81.41817 82.25134 82.31262 82.78111 84.33865 84.46899 84.69934
[22] 85.26198 85.66836 85.78328 86.43700 88.04625 88.16498 88.91770
[29] 89.62514 90.14275 90.81946 92.36529 92.39540 93.66596 95.88691
[36] 96.10511 96.62053 96.62363 97.19134 97.43031 98.51717 98.59678
[43] 98.65487 98.87666 99.01900 99.59524 100.02763 100.70005 101.85853
[50] 101.86412 103.83133 104.59108 104.71981 106.67747 107.28616 108.23769
[57] 108.32376 108.52799 109.11455 109.25047 109.69179 109.74608 109.95265
[64] 110.44854 111.88774 112.18573 113.91658 113.96216 114.24299 114.39453
[71] 114.84753 114.84865 115.26816 115.49564 117.24348 117.42408 117.50534
[78] 118.45812 119.07939 119.21332 119.55341 120.53053 122.02769 122.97443
[85] 123.59591 126.57750 127.50063 128.12327 129.01007 129.45217 130.19670
[92] 133.96699 135.82559 136.63887 137.79453 139.67084 139.88202 149.51000
[99] 154.31529 160.04044
[1] 0.08210364 0.10181937 0.07701285 0.13617508 0.10536935 0.07738181
[7] 0.10921275 0.11531892 0.11136303 0.08991757 0.13414291 0.10683776
[13] 0.08223052 0.06126692 0.12472795 0.09625638 0.09695592 0.12032056
[19] 0.11733642 0.11180402 0.11971556 0.11638519 0.09916468 0.06126692
[25] 0.11243496 0.09598392 0.09355828 0.06126692 0.08571298 0.10752160
[31] 0.13041680 0.09484836 0.10678491 0.09604048 0.06126692 0.08725003
[37] 0.08775393 0.09590642 0.12412181 0.11592374 0.09334586 0.09118377
[43] 0.11431229 0.11089774 0.08058737 0.08013130 0.10622296 0.11605412
[49] 0.09461573 0.11879390 0.10703885 0.08245477 0.10565195 0.06126692
[55] 0.13222615 0.14554792 0.08841271 0.06126692 0.11121550 0.09406307
[61] 0.15579930 0.09639495 0.11413648 0.09803146 0.07926055 0.10194469
[67] 0.06126692 0.13301788 0.10107976 0.15022587 0.10892266 0.08007164
[73] 0.11221350 0.07461636 0.06126692 0.10444302 0.08656134 0.09737686
[79] 0.09915924 0.08300250 0.08350999 0.09406005 0.12602163 0.06126692
[85] 0.11180511 0.10545313 0.12322314 0.08994688 0.10635528 0.10385047
[91] 0.08414638 0.12674642 0.12559124 0.11439140 0.13596950 0.11094211
[97] 0.06126692 0.08339811 0.06126692 0.08582857
[1] 0.08210364 0.10181937 0.07701285 0.13617508 0.10536935 0.07738181
[7] 0.10921275 0.11531892 0.11136303 0.08991757 0.13414291 0.10683776
[13] 0.08223052 0.04344972 0.12472795 0.09625638 0.09695592 0.12032056
[19] 0.11733642 0.11180402 0.11971556 0.11638519 0.09916468 0.04893413
[25] 0.11243496 0.09598392 0.09355828 0.06155554 0.08571298 0.10752160
[31] 0.13041680 0.09484836 0.10678491 0.09604048 0.06383578 0.08725003
[37] 0.08775393 0.09590642 0.12412181 0.11592374 0.09334586 0.09118377
[43] 0.11431229 0.11089774 0.08058737 0.08013130 0.10622296 0.11605412
[49] 0.09461573 0.11879390 0.10703885 0.08245477 0.10565195 0.06986409
[55] 0.13222615 0.14554792 0.08841271 0.07193834 0.11121550 0.09406307
[61] 0.15579930 0.09639495 0.11413648 0.09803146 0.07926055 0.10194469
[67] 0.05342179 0.13301788 0.10107976 0.15022587 0.10892266 0.08007164
[73] 0.11221350 0.07461636 0.06683967 0.10444302 0.08656134 0.09737686
[79] 0.09915924 0.08300250 0.08350999 0.09406005 0.12602163 0.06027017
[85] 0.11180511 0.10545313 0.12322314 0.08994688 0.10635528 0.10385047
[91] 0.08414638 0.12674642 0.12559124 0.11439140 0.13596950 0.11094211
[97] 0.06628091 0.08339811 0.06754596 0.08582857
[1] 0.06126692 0.06126692 0.06126692 0.06126692 0.06126692 0.06126692
[7] 0.06126692 0.06126692 0.06126692 0.06126692 0.06126692 0.07461636
[13] 0.07701285 0.07738181 0.07926055 0.08007164 0.08013130 0.08058737
[19] 0.08210364 0.08223052 0.08245477 0.08300250 0.08339811 0.08350999
[25] 0.08414638 0.08571298 0.08582857 0.08656134 0.08725003 0.08775393
[31] 0.08841271 0.08991757 0.08994688 0.09118377 0.09334586 0.09355828
[37] 0.09406005 0.09406307 0.09461573 0.09484836 0.09590642 0.09598392
[43] 0.09604048 0.09625638 0.09639495 0.09695592 0.09737686 0.09803146
[49] 0.09915924 0.09916468 0.10107976 0.10181937 0.10194469 0.10385047
[55] 0.10444302 0.10536935 0.10545313 0.10565195 0.10622296 0.10635528
[61] 0.10678491 0.10683776 0.10703885 0.10752160 0.10892266 0.10921275
[67] 0.11089774 0.11094211 0.11121550 0.11136303 0.11180402 0.11180511
[73] 0.11221350 0.11243496 0.11413648 0.11431229 0.11439140 0.11531892
[79] 0.11592374 0.11605412 0.11638519 0.11733642 0.11879390 0.11971556
[85] 0.12032056 0.12322314 0.12412181 0.12472795 0.12559124 0.12602163
[91] 0.12674642 0.13041680 0.13222615 0.13301788 0.13414291 0.13596950
[97] 0.13617508 0.14554792 0.15022587 0.15579930
[1] 0.04344972 0.04893413 0.05342179 0.06027017 0.06155554 0.06383578
[7] 0.06628091 0.06683967 0.06754596 0.06986409 0.07193834 0.07461636
[13] 0.07701285 0.07738181 0.07926055 0.08007164 0.08013130 0.08058737
[19] 0.08210364 0.08223052 0.08245477 0.08300250 0.08339811 0.08350999
[25] 0.08414638 0.08571298 0.08582857 0.08656134 0.08725003 0.08775393
[31] 0.08841271 0.08991757 0.08994688 0.09118377 0.09334586 0.09355828
[37] 0.09406005 0.09406307 0.09461573 0.09484836 0.09590642 0.09598392
[43] 0.09604048 0.09625638 0.09639495 0.09695592 0.09737686 0.09803146
[49] 0.09915924 0.09916468 0.10107976 0.10181937 0.10194469 0.10385047
[55] 0.10444302 0.10536935 0.10545313 0.10565195 0.10622296 0.10635528
[61] 0.10678491 0.10683776 0.10703885 0.10752160 0.10892266 0.10921275
[67] 0.11089774 0.11094211 0.11121550 0.11136303 0.11180402 0.11180511
[73] 0.11221350 0.11243496 0.11413648 0.11431229 0.11439140 0.11531892
[79] 0.11592374 0.11605412 0.11638519 0.11733642 0.11879390 0.11971556
[85] 0.12032056 0.12322314 0.12412181 0.12472795 0.12559124 0.12602163
[91] 0.12674642 0.13041680 0.13222615 0.13301788 0.13414291 0.13596950
[97] 0.13617508 0.14554792 0.15022587 0.15579930
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.