Giter Club home page Giter Club logo

residualize's Introduction

residualize

a simple stata program to residualize some variable on some other variables

installation

download this repo.

coming soon:

  • installation via net install.

syntax

residualize varname varlist, [replace gen(varname) absorb(varlist)]

residualize takes in a varname and residualizes varname on varlist (time series and factor operators are allowed; this means i.varname syntax is supported).

absorb(varlist) is supported; since we use reghdfe under the hood, interactions of the form absorb(var1 var2#var3) are allowed.

One of replace or gen(varname) is required. replace overwrites the original variable; gen(varname) saves the residualized variable to varname.

notes

Note: this short program was developed to aid in visualizations. For this reason, after the residualization is performed, the mean is added back to the residuals. In a linear regression, the estimates will be the same with and without the means, since we are just adding or subtracting a constant. However, non-linear specifications are not, in general, robust to such addition of constants.

If you would like to use residualize with a non-linear model, don't.

If you open an issue/feature request for it, I'll implement the nomeans option. It's on my to-do's but is not particularly high priority (until someone requests it).

coming soon:

  • examples + syntax
  • implement nomeans: option to not add means back in

residualize's People

Contributors

dballaelliott avatar

Watchers

 avatar

residualize's Issues

allow absorb, rather than i.var

implement an option with areg and reghdfe to pull out fixed effects using the more familiar absorb(i.var1 i.var2) syntax.

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.