NickCH-K / vtable

An R package for creating Variable Documentation Files

Home Page:https://nickch-k.github.io/vtable/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Display p values as opposed to F values in sumtable

yiqinfu opened this issue · comments

Hi! Is there a way we could modify independence.test such that sumtable() displays p values as opposed to F values from the regressions?

I tried modify result$`Pr(>F)`[1] / result$`F value`[1] in independence.test, but it didn't seem to work.

Thank you!

Check the format option in independence.test. format = '{pval}' will return p-values.

And you can pass this option along in sumtable by sending the independence.test() options as a named list. So sumtable(group.test = list(format = '{pval}')), or for a working example:

sumtable(mtcars, vars = c('mpg'), group = 'am', group.test= list(format = '{pval}'))