survey (version 4.1-1)

compressWeights: Compress replicate weight matrix

Description

Many replicate weight matrices have redundant rows, such as when weights are the same for all observations in a PSU. This function produces a compressed form. Methods for as.matrix and as.vector extract and expand the weights.

Usage

compressWeights(rw, ...)
# S3 method for svyrep.design
compressWeights(rw,...)
# S3 method for repweights_compressed
as.matrix(x,...)
# S3 method for repweights_compressed
as.vector(x,...)

Value

An object of class repweights_compressed or a

svyrep.design object with repweights element of class repweights_compressed

Arguments

rw

A set of replicate weights or a svyrep.design object

x

A compressed set of replicate weights

...

For future expansion

See Also

jknweights,as.svrepdesign

Examples

Run this code
data(api)
dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
rclus1c<-as.svrepdesign(dclus1,compress=TRUE)
rclus1<-as.svrepdesign(dclus1,compress=FALSE)

Run the code above in your browser using DataCamp Workspace