Learn R Programming

survey (version 0.9-1)

svyCprod: Computations for survey variances

Description

Computes the sum of products needed for the variance of survey sample estimators.

Usage

svyCprod(x, strata, psu)

Arguments

x
A vector or matrix
strata
A vector of stratum indicators, or NULL
psu
A vector of cluster indicators or NULL

Value

  • A matrix

Details

The data are centered within each stratum. The observations for each cluster are added, and the outer product is taken of the row vector resulting for each cluster. This is added within strata, multiplied by a degrees-of-freedom correction, and added across strata.

See Also

svydesign, svy.varcoef