Code Monkey home page Code Monkey logo

Comments (6)

larmarange avatar larmarange commented on June 20, 2024

Note: should we consider two additional tidyselectors: all_treatment_contrasts() and all_sum_contrasts()?

from broom.helpers.

larmarange avatar larmarange commented on June 20, 2024

A simpler solution:

  • tidy_add_contrasts() all add a column reference_term
  • tidy_add_term_labels() populate a column reference_label
  • new selectors all_treatment_coded() and all_sum_coded() to select categorical variables with sum or treatment contrasts
  • new function tidy_rename_term_labels() with a glue pattern based on other cols

from broom.helpers.

larmarange avatar larmarange commented on June 20, 2024

Bonus question: do we need a selector all_intercepts()?

from broom.helpers.

larmarange avatar larmarange commented on June 20, 2024

After thinking, I'm feeling that a better approach would be to implement a glue pattern for categorical terms through model_list_terms_levels() and tidy_add_term_lables()

Such an approach will allow to take into account the term labels when computing interaction terms labels.

from broom.helpers.

ddsjoberg avatar ddsjoberg commented on June 20, 2024

Note: should we consider two additional tidyselectors: all_treatment_contrasts() and all_sum_contrasts()?

@larmarange question for you: At the moment in the PR I am working on, I made the following contrast functions: all_treatment_contrasts(), all_sum_contrasts(), all_poly_contrasts(), all_helmert_contrasts().

Would you prefer a single function with an argument to select the type, e.g. all_contrasts(type = c("treatment", "sum", "poly", "helmert")) ? I think I prefer one contrast function, but you should decide ☺️

from broom.helpers.

larmarange avatar larmarange commented on June 20, 2024

one contrast function is great.

I will review the PR ASAP (not sure today, but will try tomorrow)

from broom.helpers.

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.