Giter Site home page Giter Site logo

r-regression-tools's Introduction

r-regression-tools

This is a collection of functions I’ve built to make my life easier when performing regressions in r

all_pairs()

When investigating marginal effects, we’re often only interested in the first-order effects, i.e. those between two variables only.

That means that if we have three variables A, B and C, we’re not interested in ABC. However, when we’ve got lots of variables, it can take a long time to write out our function with each pair e.g. output ~ A + B + C + AB + B+C + CB and quickly gets worse as we increase the number of variables.

all_pairs() writes the formula for us automatically:

  variables <- c("A", "B", "C", "D")
  my_output = "Output"
  all_pairs(my_output, variables)

## Output ~ A + B + C + D + A * B + A * C + A * D + B * C + B * 
##     D + C * D
## <environment: 0x000001f21918ddb0>

r-regression-tools's People

Contributors

david-ellis avatar

Watchers

 avatar Kostas Georgiou avatar

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.