Learn R Programming

svytest (version 1.1.0)

lr_test: Likelihood-Ratio Test for Informative Survey Weights (In production)

Description

Implements the Breidt-Herndon likelihood-ratio test for assessing whether survey weights are informative in linear regression models. The test compares maximized log-likelihoods under equal weights (null) and survey weights (alternative), with an asymptotic distribution given by a weighted chi-squared mixture.

Usage

lr_test(
  model,
  coef_subset = NULL,
  na.action = stats::na.omit,
  likelihood = c("pseudo", "scaled")
)

# S3 method for lr_test print(x, ...)

# S3 method for lr_test summary(object, ...)

# S3 method for lr_test tidy(x, ...)

# S3 method for lr_test glance(x, ...)

Value

An object of class "lr_test" containing:

statistic

Likelihood-ratio test statistic (non-negative)

p.value

P-value for the test (Satterthwaite approximation)

df

Approximate degrees of freedom

eigvals

Eigenvalues of the Gamma matrix

logLik_null

Maximized log-likelihood under equal weights

logLik_alt

Maximized log-likelihood under survey weights

method

Name of the test performed

call

Function call

Arguments

model

An object of class svyglm.

coef_subset

Optional character vector of coefficient names to include in the test. Defaults to all coefficients.

na.action

Function to handle missing data before testing.

likelihood

Character string specifying the likelihood form: "pseudo" (default) for raw weighted likelihood, or "scaled" to normalize weights by their mean.

x

An object of class lr_test

...

Additional arguments passed to methods

object

An object of class lr_test

Details

The null hypothesis is that survey weights are not informative (equal weights suffice). The alternative allows weights to affect the likelihood. The asymptotic null distribution is a weighted chi-squared mixture; here we approximate the p-value using a Satterthwaite moment-matching approach.

References

Breidt, F. J., & Opsomer, J. D. (1997). Testing for informativeness in analytic inference from complex surveys. *Survey Methodology*, 23(1), 1-11.

Herndon, J. (2022). Testing and adjusting for informative sampling in survey data. *Journal of Survey Statistics and Methodology*, 10(3), 455-480.

See Also

diff_in_coef_test, wa_test, svytestCE