I have done an ANOVA test on ordinal logistic regression, and I'm trying to export the results in Word, but tab_df
doesn't print stars on p-values.
How can I add stars to p-values?
This is the code:
parallel.model<- polr(ordD9~ D1d+D1+D7+D8+D10+D12+D13+D15+D16+D17+D5_3+MODOINT,data=dati2,Hess = T)
v<-Anova(parallel.model)
library(sjPlot)
tab_df(v,title = "Anova on parallel.model",
digits = 3,p.style = "stars",file = "bbb2.doc", encoding = "Windows-1252")
you should explicitly add the stars as tab_df
doesn't use the params:
signif <- symnum(an$`Pr(>F)`, corr = FALSE, na = FALSE,
cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1),
symbols = c("***", "**", "*", ".", " "))
an$`Pr(>F)`<- paste0(round(an$`Pr(>F)`, 3), format(signif))
tab_df(v, title = "Anova on parallel.model", footnote=paste0('Legend : ', attr(signif, "legend")),
show.footnote = TRUE, digits = 3, file = "bbb2.doc", encoding = "Windows-1252")