allStrata: Find all strata that cover in any way the re unit

Description Usage Arguments Examples

View source: R/allStrata.R

Description

Find all strata that cover in any way the re unit

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
allStrata(
  X,
  pik,
  ref,
  tb,
  pikInit,
  bound = 1,
  multi = TRUE,
  tore = FALSE,
  toreBound = -1,
  comment = FALSE
)

Arguments

X

sptaial coordinates

pik

inclusion probabilies

ref

the referenced unit

tb

a shift

bound

the bound for the sum of inclusion probabilites

tore

a logcial that see the spatial coordinates on tore

toreBound

the bound of the tore

comment

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
rm(list = ls())
#set.seed(6)
eps <- 1e-13
N <- 36
n <-  6
pik <- rep(n/N,N)
pik <- inclusionprobabilities(runif(N),n)
pikInit <- pik

tb <- runif(2,min = -0.001,max = 0.001)
tb
X <- as.matrix(expand.grid(seq(1,sqrt(N),1),seq(1,sqrt(N),1)))
tore = TRUE
toreBound = sqrt(N)
comment = TRUE
bound = 1
l_Strata <- allStrata(X,pik,ref = 7,tb,pikInit,tore = TRUE,toreBound = 6)
plot(l_Strata,X)
u_Strata <- unionStrata(l_Strata,ref)
plot(u_Strata,X)

RJauslin/SystematicSampling documentation built on Feb. 10, 2021, 9:37 a.m.