svyPVcor: Survey-weighted Correlation Estimation with uasge of...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

svyPVcor estimates the Pearson product-moment correlation coefficient and its standard error for data from a complex survey design with plausible values.

Usage

1
svyPVcor(formula, design, placeholder = 1:10)

Arguments

formula

Formula, x~y for the correlation between x and y (both variables have to be part of a survey design objecct created by the survey package). For a notation description for the plausible values see in 'details'.

design

A survey design which was generated by the survey package .

placeholder

A vector of symbols, which were used for numbering of the plausible values. For a detailed description see in 'details'.

Details

All variables mentioned in the formula object must be part of the survey design object. Instead of the symbols, which were used for numbering the plausible values use '..' as notation (e.g. placeholder = 1:5 and PVLIT.. stands for PVLIT1, PVLIT2, PVLIT3, PVLIT4, PVLIT5).Missing values are deleted listwise.

Value

The function returns a data.frame with the following columns

COR

Shows the Pearson product-moment correlation coefficient between x and y.

SE

Shows the SE for the Pearson product-moment correlation between x and y.

Number.of.cases

Shows the unweighted number of cases (NA's excluded) within each group.

Sum.of.weights

Shows the sum of weights (NA's excluded) within each group.

Author(s)

Jakob Peterbauer

References

Lumley, T. (2010). Complex Surveys. Hoboken, NJ: Wiley.

Saerndal, C.-E. & Swensson, B. & Wretman, J. (1992). Model Assisted Survey Sampling. New York: Springer.

Chaudhuri, A. & Stenger, H. (2005). Survey Sampling. Theory and Methods. Boka Raton, FL: Chapman & Hall/CRC.

See Also

cov.wt, svyPVeta

Examples

1
# data(svy_example1)

Example output

Loading required package: survey
Loading required package: grid
Loading required package: Matrix
Loading required package: survival

Attaching package: 'survey'

The following object is masked from 'package:graphics':

    dotchart

svyPVpack documentation built on May 1, 2019, 8:45 p.m.