Skip to content

Summary type in tbl_roche_summary() is a bit stochastic....should it be? #79

@ddsjoberg

Description

@ddsjoberg

In gtsummary's tbl_summary() (and subsequently in crane's tbl_roche_summary()), the summary type of a variable is initially determined by inspecting the class of the column and it's spread. For example, a factor/character will default to categorical summaries. Most numeric columns will default to continuous, but if that numeric column very few levels, it will then default to categorical.

Should we make this more deterministic for tbl_roche_summary()? For example, all numeric results default to continuous (which can of course be changed). This way, there will be no surprises from a study team as their data accumulates and perhaps a default summary type changes.

The default precision of summary statistics is similar in that it is determined by the spread of the data. It could occur that at the beginning of a study, the algorithm chooses to round to the nearest integer, but as more data is added the default changes to 1 decimal place.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions