You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -911,10 +911,10 @@ checkAssumptionsForAnova <- function(data, y, factors) {
911
911
return("You must take the non-parametric ANOVA as Levene’s test is significant (p < 0.05).")
912
912
}
913
913
914
-
message("You may take parametric ANOVA (function anova_test). See https://www.datanovia.com/en/lessons/anova-in-r/#check-assumptions-1 for more information.")
915
-
916
-
invisible(NULL)
917
-
}
914
+
message("You may take parametric ANOVA (function anova_test). See https://www.datanovia.com/en/lessons/anova-in-r/#check-assumptions-1 for more information.")
915
+
916
+
invisible(NULL)
917
+
}
918
918
919
919
920
920
#' Generate the Latex-text based on the NPAV by Lüpsen (see \url{http://www.uni-koeln.de/~luepsen/R/}).
stringtowrite<- paste0("The NPAV found a significant main effect of \\", trimws(model$descriptions[i]), " on ", dv, " (\\chisq~(1)=", Chivalue, ", ", pValue, ")")
1116
1116
}
1117
1117
1118
-
effect_size_text<-""
1119
-
if (!is.null(sample_size) && is.numeric(sample_size) &&sample_size>0) {
1120
-
effect_size<- tryCatch(
1121
-
effectsize::chisq_to_w(
1122
-
chi=Chivalue,
1123
-
n=sample_size,
1124
-
ci=0.95
1125
-
),
1126
-
error=function(e) NULL
1127
-
)
1128
-
1129
-
w_value<- sqrt(Chivalue/sample_size)
1130
-
ci_low<-NULL
1131
-
ci_high<-NULL
1132
-
1133
-
if (!is.null(effect_size)) {
1134
-
effect_size<- as.data.frame(effect_size)
1135
-
w_value<-effect_size$Cohens_w %||% w_value
1136
-
ci_low<-effect_size$CI_low
1137
-
ci_high<-effect_size$CI_high
1138
-
}
1139
-
1140
-
if (!is.null(w_value) &&!is.na(w_value)) {
1141
-
effect_size_text<- paste0(
1142
-
", $w=",
1143
-
sprintf("%.2f", w_value)
1144
-
)
1145
-
1146
-
if (!is.null(ci_low) &&!is.null(ci_high) &&!any(is.na(c(ci_low, ci_high)))) {
1147
-
effect_size_text<- paste0(
1148
-
effect_size_text,
1149
-
" [",
1150
-
sprintf("%.2f", ci_low),
1151
-
", ",
1152
-
sprintf("%.2f", ci_high),
1153
-
"]"
1154
-
)
1155
-
}
1156
-
}
1157
-
}
1118
+
effect_size_text<-""
1119
+
if (!is.null(sample_size) && is.numeric(sample_size) &&sample_size>0) {
1120
+
effect_size<- tryCatch(
1121
+
effectsize::chisq_to_w(
1122
+
chi=Chivalue,
1123
+
n=sample_size,
1124
+
ci=0.95
1125
+
),
1126
+
error=function(e) NULL
1127
+
)
1128
+
1129
+
w_value<- sqrt(Chivalue/sample_size)
1130
+
ci_low<-NULL
1131
+
ci_high<-NULL
1132
+
1133
+
if (!is.null(effect_size)) {
1134
+
effect_size<- as.data.frame(effect_size)
1135
+
w_value<-effect_size$Cohens_w %||% w_value
1136
+
ci_low<-effect_size$CI_low
1137
+
ci_high<-effect_size$CI_high
1138
+
}
1139
+
1140
+
if (!is.null(w_value) &&!is.na(w_value)) {
1141
+
effect_size_text<- paste0(
1142
+
", $w=",
1143
+
sprintf("%.2f", w_value)
1144
+
)
1145
+
1146
+
if (!is.null(ci_low) &&!is.null(ci_high) &&!any(is.na(c(ci_low, ci_high)))) {
@@ -1846,24 +1846,24 @@ reportDunnTestTable <- function(d = NULL, data, iv = "testiv", dv = "testdv", or
1846
1846
# Format effect size
1847
1847
table$r<- formatC(table$r, digits=2, format="f")
1848
1848
1849
-
# Adjust the xtable call to handle the modified columns
1850
-
if (requireNamespace("xtable", quietly=TRUE)) {
1851
-
xtable_obj<-xtable::xtable(table,
1852
-
digits= c(0, 0, 4, 0, 0),
1853
-
caption= paste0("Post-hoc comparisons for independent variable \\", iv,
1854
-
" and dependent variable \\", dv,
1855
-
". Positive Z-values mean that the first-named level is sig. higher than the second-named. For negative Z-values, the opposite is true. Effect size reported as rank-biserial correlation (r)."),
# Adjust the xtable call to handle the modified columns
1850
+
if (requireNamespace("xtable", quietly=TRUE)) {
1851
+
xtable_obj<-xtable::xtable(table,
1852
+
digits= c(0, 0, 4, 0, 0),
1853
+
caption= paste0("Post-hoc comparisons for independent variable \\", iv,
1854
+
" and dependent variable \\", dv,
1855
+
". Positive Z-values mean that the first-named level is sig. higher than the second-named. For negative Z-values, the opposite is true. Effect size reported as rank-biserial correlation (r)."),
0 commit comments