tableone icon indicating copy to clipboard operation
tableone copied to clipboard

Number of non-missing observations

Open jfiksel opened this issue 4 years ago • 1 comments

Thanks for the great package! I was just wondering if it would be possible to have a be able to print out the table in such a way that the number of non-missing observations would be obvious for each variable (either as a column or in the variable name). Thanks!

jfiksel avatar Apr 28 '20 17:04 jfiksel

Hi there, I agree, this would be an excellent addition.

It is crucial to know the proportion of missingness, particularly whether you have significantly different completeness of a variable between strata for example.

The summary(tableone) gives you this information but it doesn't appear in the print(tableone) output.

I can see that "missing = T" among the print arguments adds the missing percentage to the table, but unfortunately does this for the whole dataset and not by stratum.

Would it be possible to let the user define which outputs from the CreateTable object to print? I.e. let user define which of the funcNames = c("n", "miss", "p.miss", "mean", "sd", "median", "p25", "p75", "min", "max", "skew", "kurt") to print out

For example, In addition to the defaults mean(SD) or median(IQR) I would love to be able to print out miss and p.miss for each variable by stratum.

instead of age stratum1 (mean(SD)): 75(5) age stratum2 (mean(SD)): 76(4)

I would like to be able to show: age stratum1 (mean(SD)/miss/p.miss):: 75(5)/50/10 age stratum2 (mean(SD)/miss/p.miss):: 76(4)/20/40

Regards, 1Moe

1Moe avatar Jul 01 '20 02:07 1Moe