saAlloc: saAlloc Object

Description Author(s) See Also Examples

View source: R/saAlloc.R

Description

The saAlloc object contains a set of results obtained by forming optimal strata and allocations for fixed CV constraints.

Author(s)

Jonathan Lisic

See Also

saMinCV saEqualClus saSampleAlloc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# data set with 100 observations and four 
# characteristics split between two strata
x <- matrix(rnorm( 100*4 ),ncol=4)  

# create an initial set of strata assignments 
label <- c(rep(0,50),rep(1,50)) 

# run minCV for a sample size of 20
b <- saMinCV(
  x,
  label,
  targetCV=c(0.08, 0.10, 0.05, 0.08),
  sampleSize=20
)

# both of these functions return the same 
# plot

# plot through s3 object
plot(b)

# plot explicitly
summary(b)

jlisic/saAlloc documentation built on May 19, 2019, 12:47 p.m.