-
Notifications
You must be signed in to change notification settings - Fork 130
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() t.test method change rendering issue #1209
Comments
Thank you for your post. Please update your post with a reproducible example, aka a reprex. A reprex includes both data and code I can run on my machine that replicates the issue you're reporting. Take just a few minutes to review reprex.tidyverse.org for detailed instructions on how to create a reprex. I am going to go ahead and close this issue for now. But please do re-open the issue after you've added your reproducible example. |
Here's some reproducible code: library(gtsummary); save_tbl_summary<-trial %>% The p-value that gets rendered is >0.9 when it is 0.813add_p(save_tbl_summary, test = everything() ~ "aov") Here is the p-value when calculated using "aov"aov(as.numeric(as.factor(grade)) ~ as.factor(response), Df Sum Sq Mean Sq F value Pr(>F)as.factor(response) 1 0.04 0.0383 0.056 0.813 # The p-value that gets rendered is >0.9 when it is 0.813Residuals 191 129.88 0.6800Here's the code to show that the chisel.test p-value gets reported which is 0.93chisq.test(x = trial$response[which(trial$response %in% c(0, 1))], Pearson's Chi-squared testdata: trial$response[which(trial$response %in% c(0, 1))] and trial$grade[which(trial$response %in% c(0, 1))]X-squared = 0.15014, df = 2, p-value = 0.9277 |
Thanks for adding the example. I wasn't expecting users to run |
Yes, an error message would be nice or what would be better is to allow for the p-values to be overwritten in the rendered version with the new method. |
you can create another table and merge them together with |
error messaging added to main branch |
When generating a tbl_summary, if an add_p(test = everything() ~ "t.test") was used and later the tbl_summary object (let's call it: sample_tbl_summary) was run through the statement:
add_p(sample_tbl_summary, test = everything() ~ aov),
the output in viewer still displays the p-values from the t.test instead of updating them to those obtained from an ANOVA.
The text was updated successfully, but these errors were encountered: