svrepdesign(variables , repweights , weights, data,...)
## S3 method for class 'default':
svrepdesign(variables = NULL, repweights = NULL, weights = NULL, data =
NULL, type = c("BRR", "Fay", "JK1","JKn","bootstrap","other"),
combined.weights=FALSE, rho = NULL, bootstrap.average=NULL,
scale=NULL, rscales=NULL,fpc=NULL, fpctype=c("fraction","correction"),...)
## S3 method for class 'imputationList':
svrepdesign(variables=NULL, repweights,weights,data,...)
## S3 method for class 'svyrep.design':
image(x, ..., col=grey(seq(.5,1,length=30)), type.=c("rep","total"))
TRUE
if the repweights
already
include the sampling weightstype="bootstrap"
, if the bootstrap
weights have been averaged, gives the number of iterations averaged overimage
"rep"
for only the replicate weights, "total"
for the replicate and sampling weights combined.svyrep.design
, with methods for print
,
summary
, weights
, image
.rho
in one half-sample and 2-rho
in the
other. The ideal BRR analysis is restricted to a design where each
stratum has two PSUs, however, it has been used in a much wider class
of surveys.
The JK1 and JKn types are both jackknife estimators deleting one
cluster at a time. JKn is designed for stratified and JK1 for
unstratified designs. Averaged bootstrap weights ("mean bootstrap") are used for some
surveys from Statistics Canada. Yee et al (1999) describe their
construction and use for one such survey.
The variance is computed as the sum of squared deviations of the
replicates from their mean. This may be rescaled: scale
is an
overall multiplier and rscale
is a vector of
replicate-specific multipliers for the squared deviations. If the
replication weights incorporate the sampling weights
(combined.weights=TRUE
) or for type="other"
these must
be specified, otherwise they can be guessed from the weights.
A finite population correction may be specified for type="other"
,
type="JK1"
and type="JKn"
. fpc
must be a vector
with one entry for each replicate. To specify sampling fractions use
fpctype="fraction"
and to specify the correction directly use
fpctype="correction"
To generate your own replicate weights either use
as.svrepdesign
on a survey.design
object, or see
brrweights
, bootweights
,
jk1weights
and jknweights
The model.frame
method extracts the observed data.
Shao and Tu. "The Jackknife and Bootstrap." Springer.
Yee et al (1999). Bootstrat Variance Estimation for the National
Population Health Survey. Proceedings of the ASA Survey Research
Methodology Section.
as.svrepdesign
, svydesign
,
brrweights
, bootweights
data(scd)
# use BRR replicate weights from Levy and Lemeshow
repweights<-2*cbind(c(1,0,1,0,1,0), c(1,0,0,1,0,1), c(0,1,1,0,0,1),
c(0,1,0,1,1,0))
scdrep<-svrepdesign(data=scd, type="BRR", repweights=repweights)
svyratio(~alive, ~arrests, scdrep)
Run the code above in your browser using DataLab