Why a Transformed-Scale Density Needs Correction
A continuous-treatment model may be easier to fit after transforming the treatment: a positive dose can be modeled on the log scale, and a dose bounded between two limits can be modeled on the logit scale. But the fitted density is initially a density for the transformed variable, not for the treatment itself. A density is measured relative to the variable on its horizontal axis, so changing that axis changes its numerical value.
This distinction matters for inverse probability of treatment weights. If \(A\) is a continuous treatment and \(L\) denotes the covariates used in the treatment model, a stabilized weight at \(A=a\) commonly uses a ratio such as \(q_A(a)/p_A(a\mid L)\). Both densities in that ratio must be expressed with respect to the same treatment scale. Transforming each correctly makes that explicit.
For a conditional treatment density, the same formula applies with the covariates held fixed: \(p_A(a\mid L)=p_Z\{h(a)\mid L\}|h'(a)|\). The transformation must be applied to the value \(a\) at which the density is evaluated, and the derivative is with respect to \(a\). If the transformation also depends on covariates, its derivative is still taken with respect to treatment while holding those covariates fixed.
Deriving the Change-of-Variables Formula
For a strictly increasing transformation, the event \(A\leq a\) is equivalent to \(Z\leq h(a)\). Thus the cumulative distribution function of \(A\) is \(F_A(a)=F_Z\{h(a)\}\). At points where the densities and derivatives exist, differentiating this identity by the chain rule gives the density formula. For a strictly decreasing transformation, the event becomes \(Z\geq h(a)\); differentiating the resulting survival-probability expression gives the absolute value of the derivative.
The formula also preserves total probability. For an increasing transformation, substitution \(z=h(a)\), with \(dz=h'(a)\,da\), gives
where the integrals run over the corresponding supports. The decreasing case gives the same result with the integration limits reversed. This argument requires a one-to-one transformation on the support and the usual change-of-variables conditions; a transformation that folds several treatment values onto the same \(z\) needs a sum over inverse branches instead.
This cancellation is a property of a ratio, not permission to call a transformed-scale density an original-scale density. It also depends on using the same transformation for both terms. If the numerator and denominator are represented on different scales, each density must first be converted to a common scale.
Log Transformations for Positive Treatments
For a positive treatment \(A>0\), set \(Z=\log(A)\), so \(h(a)=\log(a)\) and \(h'(a)=1/a\). Therefore
The factor \(1/a\) varies with the treatment value. It cannot be omitted when reporting an original-scale density, even though it cancels from a ratio if both terms use the log transformation. This is the familiar lognormal density formula when \(Z\) is normally distributed.
Worked Example: Converting Log-Scale Densities for a Positive Dose
Suppose the numerator model has \(Z=\log(A)\sim N(0,0.5^2)\), and the conditional denominator model at a particular covariate value has \(Z\mid L\sim N(0.2,0.4^2)\). Evaluate the stabilized density ratio at \(a=1\).
At \(a=1\), \(z=\log(1)=0\), and the Jacobian is \(1/a=1\). For a normal density with standard deviation \(\sigma\), the density at \(z\) is \(\exp\{-(z-\mu)^2/(2\sigma^2)\}/(\sigma\sqrt{2\pi})\). Hence $$ q_Z(0)=\frac{1}{0.5\sqrt{2\pi}}\approx0.7979, $$ and $$ p_Z(0\mid L) =\frac{1}{0.4\sqrt{2\pi}} \exp\left\{-\frac{(0-0.2)^2}{2(0.4)^2}\right\} \approx0.8802. $$
Multiplying each by \(1/a=1\) gives \(q_A(1)\approx0.7979\) and \(p_A(1\mid L)\approx0.8802\). The density ratio is \(0.7979/0.8802\approx0.907\). In this example the numerical correction is one because \(a=1\); at another treatment value it would not be one. The ratio agrees with \(q_Z(0)/p_Z(0\mid L)\), as the theorem predicts.
Logit Transformations for Bounded Treatments
Suppose \(A\) lies in the open interval \((c,d)\). Define \(X=(A-c)/(d-c)\), which lies in \((0,1)\), and then \(Z=\operatorname{logit}(X)=\log\{X/(1-X)\}\). In terms of \(a\), $$ z=h(a)=\log\left(\frac{a-c}{d-a}\right). $$ Differentiating both logarithms gives $$ h'(a)=\frac{1}{a-c}+\frac{1}{d-a} =\frac{d-c}{(a-c)(d-a)}. $$ Thus the original-scale density is
The interval width \(d-c\) is essential. The derivative would be \(1/\{(a-c)(d-a)\}\) only when the interval has width one. The Jacobian grows near either endpoint, reflecting the rapid change in logit scale there.
Worked Example: A Dose Between 2 and 10
Let \(A\in(2,10)\) and \(Z=\log\{(A-2)/(10-A)\}\). Suppose the numerator density for \(Z\) is standard normal and the conditional denominator density is \(N(-0.3,0.7^2)\). Find the two original-scale densities and their ratio at \(a=5\).
First, \(z=\log(3/5)=\log(0.6)\approx-0.5108\). The derivative is $$ \left|\frac{dz}{da}\right|_{a=5} =\frac{10-2}{(5-2)(10-5)} =\frac{8}{15}\approx0.5333. $$ For the numerator, the standard normal density at \(-0.5108\) is approximately \(0.3503\). Therefore $$ q_A(5)\approx0.3503\left(\frac{8}{15}\right)=0.1868. $$
For the denominator, the standardized value is \(\{-0.5108-(-0.3)\}/0.7\approx-0.3012\). The \(N(-0.3,0.7^2)\) density at \(-0.5108\) is approximately \(0.5447\), so $$ p_A(5\mid L)\approx0.5447\left(\frac{8}{15}\right)=0.2905. $$ Consequently, \(q_A(5)/p_A(5\mid L)\approx0.1868/0.2905\approx0.643\). The ratio also equals \(0.3503/0.5447\approx0.643\), since the same factor \(8/15\) appears in both densities. The original-scale density values, however, are not the transformed-scale values.
When the Jacobian Does Not Cancel
A common practical issue is combining density estimates that were produced on different scales. Here is a concrete calculation. On \((2,10)\), let the numerator treatment distribution be uniform on the original scale, so \(q_A(5)=1/8=0.125\). Let the denominator be the \(N(-0.3,0.7^2)\) model for the logit-transformed treatment from the previous example. Its original-scale density at \(5\) is \(p_A(5\mid L)\approx0.2905\), so the weight ratio is $$ \frac{q_A(5)}{p_A(5\mid L)} \approx\frac{0.125}{0.2905}=0.430. $$
It would be incorrect to divide \(0.125\), a density per unit of \(A\), by \(0.5447\), a density per unit of \(Z\). To compare on the transformed scale instead, use \(da/dz=15/8\) at \(a=5\). The numerator transformed density is \(q_Z(z)=q_A(5)|da/dz|=0.125(15/8)=0.234375\). Then \(q_Z(z)/p_Z(z\mid L)\approx0.234375/0.5447=0.430\), the same ratio after both terms are on the same scale.
Worked Example: A Scale Mismatch in a Weight Calculation
A researcher has a numerator density reported per unit of the original dose, \(q_A(5)=0.20\), and a denominator density reported per unit of the logit-transformed variable, \(p_Z(z\mid L)=0.50\), for the interval \((2,10)\). Convert the denominator and calculate the weight ratio at \(a=5\).
At \(a=5\), \(z=\log(3/5)\) and \(|dz/da|=8/15\). Thus the denominator density per unit of the original dose is $$ p_A(5\mid L)=0.50\left(\frac{8}{15}\right)=0.2667. $$ The scale-compatible ratio is \(q_A(5)/p_A(5\mid L)=0.20/0.2667\approx0.750\). The uncorrected division \(0.20/0.50=0.400\) mixes density scales and is not the treatment-density ratio. Alternatively, convert the numerator to the transformed scale: \(q_Z(z)=0.20(15/8)=0.375\), and \(0.375/0.50=0.750\).
Assumptions, Diagnostics, and Limitations
A Jacobian corrects a change of units; it does not make an unsuitable treatment model adequate. The treatment must lie in the stated support, the transformation must be valid there, and the fitted transformed density must describe the data adequately. For a density-ratio weight, the denominator density must be positive at observed treatment values where the numerator is positive. A small denominator can still produce an extreme weight after a perfectly correct transformation.
Useful checks include confirming that the transformed value and derivative use the same \(a,c,d\) and units; checking that the corrected density is nonnegative and integrates to one over its support; and comparing computed ratios on both scales when numerator and denominator share a transformation. Near a bounded interval's endpoints, the logit Jacobian can be large, so inspect fitted densities and weights there rather than assuming the scale transformation stabilizes all estimates. Extreme weights, poor overlap, or misspecified conditional distributions require substantive attention; clipping a weight may change the analysis but does not repair an omitted Jacobian.
The log transformation requires strictly positive treatment values. A treatment with a point mass at zero plus a continuous positive part is not represented by a single ordinary log-scale density: its probability mass and continuous density need separate treatment. Likewise, endpoint masses for a bounded treatment are not handled by the interior logit-density formula. The formula here concerns continuous densities on the interior of the support.
The main alternative is to model the treatment density directly on its original scale, for example with a suitable positive or bounded-support density model, or to estimate it nonparametrically. That avoids transforming a fitted density back, but each approach has its own modeling and estimation requirements. The Jacobian method is useful when a transformed-scale model is chosen; it is not evidence that such a model is the best choice. The essential comparison is always between densities defined with respect to the same treatment measure.
Check Your Understanding
Answer each question, then compare with the solutions below.
- For \(Z=\log(A)\), what Jacobian converts a density for \(Z\) to a density for \(A>0\)?
- For a treatment on \((1,7)\), write the logit transformation and its derivative with respect to \(a\).
- If numerator and denominator densities use the same one-to-one transformation, why does the density ratio remain unchanged?
- A numerator is reported per unit of \(A\), while a denominator is reported per unit of \(Z=h(A)\). What must be done before forming a weight ratio?
Solutions. (1) Since \(dz/da=1/a\), multiply the transformed density at \(\log(a)\) by \(1/a\). (2) \(z=\log\{(a-1)/(7-a)\}\), and \(dz/da=6/\{(a-1)(7-a)\}\). (3) Both transformed densities acquire the same positive factor \(|h'(a)|\), which cancels in their ratio. (4) Convert one density so both are expressed with respect to the same variable; for example, multiply the transformed-scale denominator by \(|dz/da|\) to obtain its original-scale density, then form the ratio.