for questions relating to the `rstatix` R package ("Pipe-Friendly Framework for Basic Statistical Tests")
Questions tagged [rstatix]
89 questions
0
votes
1 answer
Is there a better way to conduct a 3 way ANOVA in R?
Right now I am working with my own dataset, which is very similar to the example at https://www.datanovia.com/en/lessons/anova-in-r/, specifically the Three-Way ANOVA section. The code is well laid out, but when I get to the section for…

reeto9
- 11
- 2
0
votes
1 answer
How to make calculations separated by factors within a data frame using R?
I have a data table with the results of an experiment that evaluated 2 factors: Light and Day_light at 2 different temperatures (Temperature).
I performed a 2-way ANOVA for each Temperature using the rstatix package.
The result of the 2-way ANOVA is…

Daniel Valencia C.
- 2,159
- 2
- 19
- 38
0
votes
2 answers
group_by %>% anova_test inconsistency in DFn DFd
I have an unbalanced repeated measures design that I would like to run separate ANOVAS for each time period (i.e. Curve) and then Bonferroni correction results for.
Here is the data, where Curve is the repeated measure:
T_data…

hoganhaben
- 1
- 4
0
votes
0 answers
Add p-values for factorial ANOVA post-hoc comparisons to a ggplot
I'm attempting to visualize main effects and interactions from Tukey HSD pairwise comparisons after a 3x12 ANOVA in R. I've been able to add the pairwise comparisons of the second (12-level) factor using code similar to that below. (Below is a much…

Kveylet
- 3
- 1
0
votes
1 answer
Adding mean comparisons to plot + Is it possible to display p-values in ggplot (or R in general) from a KS test, specifically on a violin plot?
I'm seeking to create something like this:
Example Output
Using my own data, I would be specifically using the p-values I found here:
KS test p-values
I was able to produce something similar, albeit with the incorrect method. Specifically, I was…

glico
- 3
- 4
0
votes
1 answer
Error with levene_test() from rstatix: problem with mutate() and filter()
When I try to execute the levene_test() function, something that I previously did without problems, I get the following error:
noc01_long %>%
group_by(block) %>%
levene_test(brady ~ group)
Error: Problem with `mutate()` input `data`.
x Problem…

Tamara
- 21
- 2
0
votes
1 answer
When using rstatix::get_summary_stats how do I export the results to a .csv file?
I am trying to calculate group means from a 4-way mixed ANOVA. The code is working great -- and I can output the results into my console -- but how do I save this table to a file (i.e. export as a .csv)? I tried using the capture.output() command,…

Nikki Scheerer
- 11
- 1
0
votes
1 answer
Categorical covariate with two way anova in R
This is a random sample of my data set:
structure(list(DTI_ID = structure(c(31L, 241L, 84L, 298L, 185L,
269L, 198L, 24L, 286L, 177L, 228L, 158L, 57L, 293L, 218L, 8L,
180L, 39L, 211L, 134L, 291L, 309L, 99L, 70L, 154L, 138L, 250L,
41L, 276L, 262L,…

CanyonView
- 401
- 3
- 15
0
votes
2 answers
chi square over multiple groups and variables
I have a huge dataset with several groups (factors with between 2 to 6 levels), and dichotomous variables (0, 1).
example data
DF <- data.frame(
group1 = sample(x = c("A","B","C","D"), size = 100, replace = T),
group2 = sample(x =…

Boaz Palterer
- 21
- 2
0
votes
1 answer
Loop through variables to produce balance table
I am creating a balance test table using rstatix.
I can produce the outcome I want for each variable, but cannot get to loop over a number of variables to produce a table to my linking in one go.
require(dplyr)
require(rstatix)
data <-…

MCS
- 1,071
- 9
- 23
0
votes
1 answer
Incorrect p-value position on ggplots using rstatix
I am having trouble placing the p-values in the correct position on the y axis of a ggplot using rstatix. I can get the example provided on the package author's blog to work fine, but when I change the values, the positions are incorrect. Here is…

Damian
- 516
- 1
- 4
- 20
0
votes
1 answer
anova_test not returning Mauchly's for three way within subject ANOVA
I am using a data set called sleep (found here: https://drive.google.com/file/d/15ZnsWtzbPpUBQN9qr-KZCnyX-0CYJHL5/view) to run a three way within subject ANOVA comparing Performance based on Stimulation, Deprivation, and Time. I have successfully…

Hannah Harder
- 67
- 10
0
votes
1 answer
rstatix package installation
I´m having problems with the "rstatix" package installation. When the installation finishes and I try to run the library, I get this message:
Error: package or namespace load failed for ‘rstatix’ in loadNamespace(j <- i[[1L]], c(lib.loc,…

Alfonsina López
- 9
- 1
0
votes
3 answers
How to get Mean SD and Pvalue for multiple groups in r?
My data frame looks like this:
category calss test1 test2
1 Yes 5.5 4.2
1 No 5.8 4.3
1 Yes 6.6 3.2
2 Yes 6 7.7
2 No 5.7 5.8
3 No 9.7 …

Rebel_47
- 69
- 4