Code Monkey home page Code Monkey logo

Comments (3)

kbattocchi avatar kbattocchi commented on June 17, 2024 3

Mathematically, it's the limit of ate(X,T,T+dT)/dT as dT gets arbitrarily small (this only literally makes sense for continuous treatments, but for discrete treatments you could think of it as incrementing the probability of treatment by that tiny amount).

To take your first example, the difference in outcome from moving the treatment from $2.5 to $3.5 is the ATE, specifically ATE(X, 2.5, 3.5). If we want to know the marginal ATE at $2.5, we can view this as a coarse approximation to it (we increased the price by a dollar, rather than an infinitesimal amount). We can get a closer approximation to the marginal effect if we then look at a smaller price difference, say the difference when moving from $2.5 to $2.6 (but we have to scale the result by dividing by 0.1, to make up for the difference in the range that we're looking at), or in other words, marginal_ATE(X,2.5) ~= 10*ate(X, 2.5, 2.6). Then we could get an even better approximation if we change from $2.5 to $2.51 instead of $2.5 to $2.6 (but multiply by 100 instead of 10), etc. If the effect is actually linear (which is true for many of our models), then it turns out that these will all give you exactly the same answer.

from econml.

kbattocchi avatar kbattocchi commented on June 17, 2024 1

The ate method returns just the point estimate of the ATE while the ate_inference method returns an "inference results" object which contains not only the point estimate but methods for providing confidence intervals, p-values, etc.

The ATE is the average change in the response when moving from one treatment value to another (for most of our classes these values default to 0 and 1, but DeepIV is an outlier in this regard). The marginal ATE is the derivative of this quantity at a particular treatment value, which basically says if I very slightly increase the treatment, what will be the relative increase in the response.

For estimators that compute an effect that is linear in the treatment (such as our DML estimators, among others), the ATE can be written as ϴ(T1-T0) and the marginal ATE is just the constant ϴ (regardless of the treatment value), so we provide the const_marginal_ate method which doesn't require you to specify the treatment where we take the derivative; this will also provide the exact same result as the ate method with the default treatment arguments, since ϴ(1-0) = ϴ.

from econml.

titubs avatar titubs commented on June 17, 2024

@kbattocchi Gotcha, very helpful. Just just make sure I understood correctly for the Marginal_ATE, so basically it tells us the relative change in the outcome based on a slight change in the treatment (i.e. derivative). Do I interpret it as something like this?:

Example:

  • If I change a continuous treatment by 1 unit, i.e price=$2.50 to $3.50, what is the change in outcome? Or would this refer to 1 unit as cents (i.e. from $2.50 to $2.51)?
  • If I change a discrete treatment from 0 to 1 (or vice versa), what is the change in outcome?

Can you please confirm or correct me?

from econml.

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.