survey_correlation
Compute correlations for complex survey data, using replicate weights and plausible-value pooling for accurate standard errors.
Instructions
Correlations for complex survey data, with replicate-weight standard errors and plausible-value pooling. Correlates each column in x against either variables or a plausible-value set.
Give the design one of two ways: replicate_weights (existing columns — either a list of names or a prefix such as 'W_FSTURWT' that matches W_FSTURWT1..80), or jkzone + jkrep so JK2 replicates are built for you (TIMSS/PIRLS ship JKZONE and JKREP). method defaults to JK2 for constructed replicates and Fay for 60+ supplied columns, which is what PISA needs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Columns to correlate from. | |
| fay | No | Fay factor when method='fay'. | |
| data | Yes | Dataset name in the session. | |
| jkrep | No | Jackknife replicate indicator column. | |
| digits | No | Decimal places. | |
| jkzone | No | Jackknife zone column. | |
| method | No | Replication method: auto, jk2, jk1, brr or fay. | auto |
| weight | Yes | Final sampling weight column. | |
| pv_count | No | How many plausible values. | |
| pv_prefix | No | Plausible-value prefix, e.g. 'BSMMAT'. | |
| variables | No | Columns to correlate against. Omit when using plausible values. | |
| pv_pattern | No | Plausible-value pattern with {i}. | |
| replicate_weights | No | Replicate weight columns, or a prefix matching them. |