Skip to content

Main content

Elasticity Logchange Residual Tool

Calculate elasticity logchange residual from explicit caller-supplied inputs.

Loading tool…

Description

quantityLogChange = ln(quantityAfter)-ln(quantityBefore); predictedLogChange = elasticity*(ln(priceAfter)-ln(priceBefore)); residual is observed minus predicted.

An economic model specifies how quantities, prices or marginal values relate under stated assumptions. A derivative, reaction function or first-order-condition term is a local model object rather than an empirical finding or complete equilibrium solution.

quantityLogChange = ln(quantityAfter)-ln(quantityBefore); predictedLogChange = elasticity*(ln(priceAfter)-ln(priceBefore)); residual is observed minus predicted.

When to use this tool

Use Elasticity Logchange Residual when checking one explicit theoretical economic-model relationship.

How to use the tool and how it works

  1. Enter quantityBefore, quantityAfter, priceBefore, priceAfter, elasticity. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read quantityLogChange, predictedLogChange, residual. Use the output convention below.

Require positive before/after quantities and prices. quantityLogChange = ln(quantityAfter)-ln(quantityBefore); predictedLogChange = elasticity*(ln(priceAfter)-ln(priceBefore)); residual is observed minus predicted.1

Input fieldMeaning and unitsAccepted input
quantityBeforeQuantity BeforeRequired. Finite number; strictly above 0.
quantityAfterQuantity AfterRequired. Finite number; strictly above 0.
priceBeforePrice BeforeRequired. Finite number; strictly above 0.
priceAfterPrice AfterRequired. Finite number; strictly above 0.
elasticityElasticityRequired. Finite number.
Output fieldInterpretationReturned shape
quantityLogChangeQuantity Log ChangeRequired. Finite number.
predictedLogChangePredicted Log ChangeRequired. Finite number.
residualResidualRequired. Finite number.
json
{
  "input": {
    "quantityBefore": 1,
    "quantityAfter": 2,
    "priceBefore": 1,
    "priceAfter": 2,
    "elasticity": 1
  },
  "output": {
    "quantityLogChange": 0.6931471805599453,
    "predictedLogChange": 0.6931471805599453,
    "residual": 0
  }
}

Limitations and assumptions

  • This applies a supplied constant log-elasticity relationship. It does not estimate elasticity, correct confounding or interpret the residual as a causal demand shock.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use a complete model, defensible parameter estimates and suitable identification before drawing empirical or policy conclusions.

References

  1. Calculation and input contract: economics/elasticity-logchange-residual — tool.io

Similar or alternative tools