Agriculture Reference
In-Depth Information
than 1, there is loss of efficiency; if it is less than 1, the estimates are more accurate.
Note that the first and the second-order inclusion probabilities are considered in
both designs; it is their distributions that may differ from one strategy to another
(S
¨
rndal et al.
1992
, p. 54).
A very simple scheme for SRS consists of randomly sorting the population frame
(Till
´
2006
, algorithm 4.5, p. 50) as follows:
1. An independent uniform variable
R
k
~
U
[0,1] is generated for each unit
k
of the
population.
2. The population is sorted in ascending (or descending) order according to
R
k
.
3. The first (or last)
n
units of the sorted population are selected for the sample.
Sunter (
1977
) proved that this random sorting results in SRS.
To demonstrate the performance of each sampling strategy, we generated
framepop
as an artificial spatial population to be used as a sampling frame of
size
N
1,000. It contains the geographical coordinates (
xc,yc
)ofeachunit
generated according to a uniform distribution
U
[0,1], a survey variable
yobs
that
follows a spatial trend on the coordinates and has some added Gaussian white noise,
and two qualitative variables: the first random with three possible codes (
q1obs)
and the second with five possible codes (
q2obs)
, which are based on the quantiles
of the variable
yobs
. Note that this artificial population can be treated as a realization
of a spatial point process. In addition to the
sampling
library that was already
canbedownloadedatfrom
http://cran.r-project.org/web/packages/survey/survey.pdf
.
¼
>
library(sampling)
>
library(survey)
>
n
<
- 100
>
N
<
- 1000
>
set.seed(160964)
>
framepop
<
- data.frame(id
¼
1:N, xc
¼
runif(N), yc
¼
runif(N))
>
yobs
<
- (exp((framepop$xc-0.5)^2)+exp((framepop$yc-0.5)^2))
>
yobs
<
- 100-((yobs-min(yobs))/(max(yobs-min(yobs))))*100+
+ (rnorm(N)+5)*5
>
q1obs
<
- sample(1:3,N,replace
¼
T)
>
q2obs
<
- as.numeric(cut(yobs,quantile(yobs,probs
¼
+
seq(0, 1, 0.2))))
>
q2obs[is.na(q2obs)]
<
-1
>
sum(yobs)
[1] 92044.83
>
table(q1obs)
123
304 354 342
Search WWH ::
Custom Search