Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare other methods for obtaining approximate p-values #7

Open
haziqj opened this issue Apr 16, 2023 · 1 comment
Open

Compare other methods for obtaining approximate p-values #7

haziqj opened this issue Apr 16, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@haziqj
Copy link
Owner

haziqj commented Apr 16, 2023

The Rao-Scott adjustment seems natural to use in the context of complex sampling. The problem is it requires a Choleski decomposition of $\boldsymbol\Omega_2$, whose estimate can be not full rank. Could we explore stable/modified Choleski decompositions and see how it affects the $p$-value calculations?

install.packages("Matrix")
library(Matrix)

# Create a non-positive definite matrix
A <- matrix(c(4, 2, 2, 2, 4, 2, 2, 2, 4), nrow = 3, ncol = 3)

# Find the nearest positive definite matrix
nearest_pd <- nearPD(A, corr = FALSE, do2eigen = TRUE, ensureSymmetry = TRUE)

# Perform Cholesky decomposition on the nearest positive definite matrix
L <- chol(nearest_pd$mat)

print(L)
@haziqj
Copy link
Owner Author

haziqj commented Apr 16, 2023

Alternative approximate chi-square distributions can be explored as well. Here's a good starting point:

Bodenham, D. A., & Adams, N. M. (2016). A comparison of efficient approximations for a weighted sum of chi-squared random variables. Statistics and Computing, 26(4), 917-928. https://link.springer.com/article/10.1007/s11222-015-9583-4

@haziqj haziqj added the enhancement New feature or request label Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant