Git Product home page Git Product logo

Comments (4)

ewenharrison avatar ewenharrison commented on July 29, 2024

Thanks. This is done.

devtools::install_github('ewenharrison/finalfit')
library(finalfit)
explanatory = c("age", "age.factor", "sex.factor", "obstruct.factor")
dependent = "perfor.factor"
colon_s %>%
  summary_factorlist(dependent, explanatory, p=TRUE, 
                     cont = "median", cont_range = TRUE)

        label       levels                  No                 Yes     p
1 Age (years) Median (IQR) 61.0 (53.0 to 69.0) 60.0 (50.0 to 68.0) 0.578
2         Age    <40 years            68 (7.5)             2 (7.4) 1.000
3              40-59 years          334 (37.0)           10 (37.0)      
4                60+ years          500 (55.4)           15 (55.6)      
7         Sex       Female          432 (47.9)           13 (48.1) 0.979
8                     Male          470 (52.1)           14 (51.9)      
5 Obstruction           No          715 (81.2)           17 (63.0) 0.018
6                      Yes          166 (18.8)           10 (37.0)   

from finalfit.

LukaszDerylo avatar LukaszDerylo commented on July 29, 2024

Great!

Although, I'd change "Median (IQR)" in levels column to something like "Median (quartiles)".

from finalfit.

ewenharrison avatar ewenharrison commented on July 29, 2024

Thanks. Yes please change in your own work, but I'm comfortable with the definition of "range" being the limits as well as the difference.

from finalfit.

LukaszDerylo avatar LukaszDerylo commented on July 29, 2024

I agree that "range" can be understood as the limits as well as the difference, but IQR is special case of range that is strictly defined as difference between quartiles. So I think, using the name "IQR" for limits can lead to confusion: person, who sees "IQR" label expects a single value, just like he/she read in his/her textbook.

from finalfit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.