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

add p-values for Chisq and Gsq #7

Open
mikebarkmin opened this issue Feb 25, 2018 · 5 comments
Open

add p-values for Chisq and Gsq #7

mikebarkmin opened this issue Feb 25, 2018 · 5 comments

Comments

@mikebarkmin
Copy link

Calculate the p-values for Chisq and Gsq like:

C <- max(K.j) # number of categories
I <- J # number of items
df <- C^I - ret$npar - 1 # Degrees of freedom
Chisq.pvalue <- 1-pchisq(ret$Chisq,df)
Gsq.pvalue <- 1-pchisq(ret$Gsq,df)
@anamgreco
Copy link

Hello! Sorry but I am not able to compute my p-values from a poLCA object with this script... Is this an answer to a previous one? How can I adapt this to mine, please? Thanks!!

@mikebarkmin
Copy link
Author

You can not use the lines after running poLCA. They are intended to run along. I have already modified poLCA to calculate the p-values (#14), but the maintainers of this library seem to have abandoned it. So you probably must modify poLCA yourself.

@anamgreco
Copy link

Hello, again! Sorry for my delay, and thanks for your response and all your help. I managed to re-write the package by adding the three lines (183-185) showed here

However, now all p-values returned are the same for very different models (from 1 to 10 classes). Is that correct? I am sorry is the very first time I am using this indicator...

@anamgreco
Copy link

anamgreco commented Jun 13, 2022 via email

@tbmpereira
Copy link

@mikebarkmin

I wanted to thank you for your contribution to the poLCA package through the pull request you made to calculate Chisq and Gsq p-values. Your insights were very helpful!

I also wanted to mention that it would be great if the package maintainer could include p-values in the returned output. However, I wanted to point out that the most common method for estimating p-values in the case of LCA is through the parametric bootstrap method. While your suggested method is also valid, it may not be the most appropriate in this particular case.

Thank you again for your contribution to the package, and I look forward to seeing how it continues to evolve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants