Displaying 2 results from an estimated 2 matches for "stratasize".
Did you mean:
strata_size
2008 Dec 03
1
help on tapply using sample with differing sample-sizes
...ot <- function (datavar, statavar, weight, nboot, ciqntl, ciqntu)
{
i <- 1
sdatavar <- sort(datavar)
sstratavar <- sort(statavar)
sweight <- sort(weight)
sdatavarwght <- sdatavar*sweight
# stramn <- tapply(sdatavar, sstratavar, mean)
meanvect <- rep(0, times = nboot)
stratasize <- tapply(sdatavarwght, sstratavar, length)
stratasizemone <- stratasize -1
while (i < nboot)
{ #vector of resampled observations
vectobsrestemp <- tapply(sdatavarwght, sstratavar, sample, replace = T, size = stratasizemone)
vectobsres <- unlist(vectobsrestemp)
meanvect[i]...
2010 Apr 07
1
Struggeling with svydesign()
...hical region. Type is a two level
factor. Not every level is present in each block. Each block has a
Status attribute with two levels: medium (9 blocks) or good (5 blocks).
Besides the overall ratio, we would like the estimate the ratio per
Status.
The samplesize per stratum was calculated with epi.stratasize() from the
epiR package. The population size in the 21 strata ranges from 1 to
1158. The sample size ranges from 0 in the blocks with very few polygons
(<20), 1 in blocks with a low number of polygon (20 - 50) and up to 25
polygons in the largest strata.
Does the syntax below represents the dat...