---
title: "Model restrictions and efficiency"
subtitle: "How model restrictions shape influence functions and efficiency."
aliases:
- "/guides/semiparametric-methods/models-and-efficiency.html"
- "/guides/statistical-background/05-semiparametric-models.html"
guide-status: "Available"
---
**Before reading:** [Conditional expectation and L2 geometry](conditional-expectation.qmd), [Estimating equations and asymptotic linearity](../estimation-and-inference/estimating-equations.qmd), [Likelihood, scores, and parametric efficiency](likelihood-and-information.qmd), and [Influence functions](influence-functions.qmd).
## Begin with a stated model and target {#three-kinds-of-model}
A model is a set of permitted distributions, and the target is a functional on that set. [Statistical models, targets, and paths](model-target-paths.qmd) introduced these objects and valid score paths; [Influence functions](influence-functions.qmd) derived elementary gradient representations. Here the question is which representation gives the smallest regular-estimation variance.
The complete-data mean has influence function $Y-\mu$ in the unrestricted model. The partially linear example below is a transfer to a restricted model with a scalar coefficient and an unknown regression function. Its extra assumptions must be stated before interpreting its efficiency bound.
## What the extra freedom buys and costs
Allowing an unknown nuisance function avoids imposing an incorrect parametric shape. It does not automatically protect an estimator: identification, adequate nuisance estimation, and a controlled remainder are still required. The partially linear model also needs assumptions on the conditional error and residual exposure variation.
The estimator must support its inferential claim under the nuisance variations permitted by the model. A smaller model can exclude some of those variations and yield a smaller variance bound at a shared population law. The reduction need not be strict. The comparison is always between stated models and regular estimators, not between arbitrary algorithms with small empirical variances.
Work at a fixed population law $P$ and scalar target $\beta(P)$, with all expectations below taken under $P$. Let $W$ denote one complete observation record and $N$ the number of independent records. Assume the target has a square-integrable gradient on the model's tangent space. We will distinguish its limiting influence variance from the estimator variance, which includes division by $N$.
## Moving the truth: paths, scores, and the tangent space
Recall from [Statistical models, targets, and paths](model-target-paths.qmd) that valid paths have mean-zero scores and their closed linear span is the tangent space $\mathcal T$. Here we use that construction to compare the directions different models permit. A path may change $\beta$, change the nuisance, or change both.
- In a parametric model there is one score per parameter, and $\mathcal T$ is the span of those few functions.
- In a nonparametric model, every bounded mean-zero function $s$ is the score of a path, namely $f_t = f\,(1 + t s)$. Taking limits fills out every mean-zero function with a finite variance, so $\mathcal T$ is all of them.
- In the semiparametric parameterizations used here, a path moving $\beta$ while holding the nuisance fixed has score $S_\beta$. Paths changing only the nuisance generate the closed nuisance tangent space $\mathcal T_\eta$. The full tangent space is the closed linear span of $S_\beta$ and $\mathcal T_\eta$. These spaces need not be orthogonal before projection.
The influence function from the [Influence functions](influence-functions.qmd) page is also a derivative along a path. It was defined with one particular path, which contaminates $F$ with a point mass. Smooth paths give the same derivative in a more convenient form. In a nonparametric model, a path with score $s$ gives
$$
\left.\frac{d}{dt}\beta(P_t)\right|_0=E[\phi(W)s(W)].
$$
For the bounded-score path $f_t=f(1+ts)$ and the differentiable functionals studied earlier, this follows by differentiating along that path. A contamination derivative alone would not establish the representation for an arbitrary functional.
## What an influence function has to satisfy
An asymptotically linear estimator has expansion $\hat\beta-\beta=N^{-1}\sum_i\phi(W_i)+o_p(N^{-1/2})$, with $E[\phi]=0$ and finite variance. This describes its behavior at a fixed law. **Regularity** additionally requires stability under nearby laws in the model.
The working local comparison takes a regular path $P_t$ and studies data from $P_{h/\sqrt N}$ for each fixed $h$. A regular estimator's centered, scaled error $\sqrt N\{\hat\beta-\beta(P_{h/\sqrt N})\}$ has the same limiting law across these local shifts. Establishing this property uses the corresponding regular-submodel theory; a pointwise CLT alone is not enough.
For example, an estimator that always reports zero has zero variance and is correct at a population mean of zero. Along nearby populations with mean $h/\sqrt N$, its centered scaled error is $-h$, so its limiting behavior depends on the local shift. Such a procedure cannot bypass an efficiency bound by being correct at one special population.
For regular asymptotically linear estimators, stability gives the derivative constraint: the mean shift of the contribution must match the target's path derivative. Thus, for every permitted score $s$,
$$
E[\phi(W)s(W)]=\left.\frac{d}{dt}\beta(P_t)\right|_0.
$$
For a path that moves only the nuisance, the right side is zero, because $\beta$ has not changed. For the path that moves only $\beta$, at unit speed, it is one. So in a semiparametric model an influence function has to satisfy two conditions.
1. $E[\operatorname{IF}\cdot s] = 0$ for every score $s$ in the nuisance tangent space $\mathcal T_\eta$.
2. $E[\operatorname{IF}\cdot S_\beta] = 1$.
These conditions describe first-order centering: a nuisance-only perturbation leaves the target fixed, while a unit-speed target perturbation changes it at rate one. They do not say that a finite-sample estimate or its variance stays unchanged whenever a nuisance changes.
In the unrestricted model, $\mathcal T=L_2^0(P)$, and the derivative equations for every permitted score determine a unique mean-zero gradient. When restrictions give a proper smaller closed tangent space, adding a mean-zero component orthogonal to that space preserves the derivative equations. If that orthogonal complement is nontrivial, more than one gradient represents the same derivatives. A model restriction alone does not guarantee a smaller tangent space at every distribution. These representations are candidate first-order contributions. Constructing a regular estimator that attains a candidate influence function requires further conditions; the derivative equations alone do not construct one.
To see how they differ, suppose $\operatorname{IF}_1$ and $\operatorname{IF}_2$ both satisfy the two conditions. Their difference is orthogonal to $S_\beta$ and to every score in $\mathcal T_\eta$, so it is orthogonal to the whole tangent space. Exactly one influence function lies inside $\mathcal T$ itself, and it is called the efficient influence function (EIF). Every other influence function is the EIF plus a piece $h$ that is orthogonal to $\mathcal T$. The two pieces are orthogonal to each other, so
$$
\begin{aligned}
E[\operatorname{IF}^2]&=E[\operatorname{EIF}^2]+E[h^2]\\
&\ge E[\operatorname{EIF}^2].
\end{aligned}
$$
The extra $h$ is orthogonal to every permitted score, so it changes none of the target derivatives. It adds $E[h^2]$ to the variance of a centered contribution. For an estimator attaining that influence function, the limiting variance of its scaled error is $E[\operatorname{IF}^2]$, and its first-order estimator variance is $E[\operatorname{IF}^2]/N$. The canonical gradient has the smallest variance among gradient representations, giving a lower bound for regular asymptotically linear estimators. Attainment is a separate question; an estimator attaining it is semiparametrically efficient.
::: {#fig-tangent}
```{=html}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 780 440" role="img" aria-label="The geometry of influence functions in a semiparametric model. Left: the score for beta is drawn as the hypotenuse of a right triangle. One leg lies along the nuisance tangent space and is the part of the score that a nuisance direction can imitate. The other leg, perpendicular to it, is the efficient score. Right: the tangent space is drawn as a plane, and the efficient influence function is a vector in it. Any other influence function is that vector plus a piece h that sticks out of the plane and is orthogonal to every direction the model allows, so its second moment is the EIF second moment plus the second moment of h." style="display:block;width:100%;max-width:780px;height:auto;margin:0 auto">
<defs>
<marker id="tg-arrow-dark" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M0 0 L10 5 L0 10 z" fill="currentColor"/></marker>
<marker id="tg-arrow-blue" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M0 0 L10 5 L0 10 z" fill="#2F80C8"/></marker>
<marker id="tg-arrow-verm" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M0 0 L10 5 L0 10 z" fill="#D55E00"/></marker>
</defs>
<rect x="10" y="10" width="380" height="420" rx="10" fill="currentColor" fill-opacity="0.04" stroke="currentColor" stroke-opacity="0.3"/>
<text x="26" y="37" font-size="16" text-anchor="start" fill="currentColor" font-weight="700">Remove what the nuisance can imitate</text>
<line x1="40" y1="310" x2="355" y2="310" stroke="currentColor" stroke-width="2" stroke-opacity="0.55" marker-end="url(#tg-arrow-dark)"/>
<text x="262" y="286" font-size="12" text-anchor="start" fill="currentColor">nuisance</text>
<text x="262" y="301" font-size="12" fill="currentColor">tangent space <tspan font-style="italic">T</tspan><tspan font-size="10" dy="3">η</tspan></text>
<line x1="60" y1="310" x2="250" y2="110" stroke="currentColor" stroke-width="2.5" stroke-opacity="0.95" marker-end="url(#tg-arrow-dark)"/>
<text x="128" y="202" font-size="13" text-anchor="end" fill="currentColor">score for β,</text>
<text x="128" y="219" font-size="13" text-anchor="end" fill="currentColor"><tspan font-style="italic">S</tspan><tspan font-size="10" dy="3">β</tspan></text>
<line x1="250" y1="308" x2="250" y2="113" stroke="#2F80C8" stroke-width="3.2" marker-end="url(#tg-arrow-blue)"/>
<text x="262" y="198" font-size="13" fill="#2F80C8" font-weight="700">efficient score</text>
<text x="262" y="215" font-size="13" fill="currentColor"><tspan font-style="italic">S</tspan><tspan font-size="10" dy="3">eff</tspan></text>
<line x1="62" y1="310" x2="249" y2="310" stroke="currentColor" stroke-width="5" stroke-opacity="0.45" marker-end="url(#tg-arrow-dark)"/>
<circle cx="60" cy="310" r="4.5" fill="currentColor"/>
<path d="M237 310 L237 297 L250 297" fill="none" stroke="currentColor" stroke-opacity="0.7" stroke-width="1.5"/>
<text x="155" y="336" font-size="12" text-anchor="middle" fill="currentColor">the part a nuisance direction</text>
<text x="155" y="351" font-size="12" text-anchor="middle" fill="currentColor">can imitate: the projection of <tspan font-style="italic">S</tspan><tspan font-size="10" dy="3">β</tspan></text>
<text x="26" y="410" font-size="12" text-anchor="start" fill="currentColor" fill-opacity="0.85">What is left, perpendicular to every</text>
<text x="26" y="424" font-size="12" text-anchor="start" fill="currentColor" fill-opacity="0.85">nuisance direction, is information about β.</text>
<rect x="400" y="10" width="370" height="420" rx="10" fill="currentColor" fill-opacity="0.04" stroke="currentColor" stroke-opacity="0.3"/>
<text x="416" y="37" font-size="16" fill="currentColor" font-weight="700">Others add a piece outside <tspan font-style="italic">T</tspan></text>
<polygon points="409.8,359 661.8,359 748.6,266 496.6,266" fill="currentColor" fill-opacity="0.07" stroke="currentColor" stroke-opacity="0.5" stroke-width="1.5"/>
<text x="439.8" y="333" font-size="12" fill="currentColor">tangent space <tspan font-style="italic">T</tspan></text>
<text x="433.8" y="349" font-size="12" fill="currentColor" fill-opacity="0.85">(what the model allows)</text>
<line x1="575" y1="332" x2="670.2" y2="165" stroke="currentColor" stroke-width="2.5" stroke-opacity="0.95" marker-end="url(#tg-arrow-dark)"/>
<line x1="575" y1="332" x2="670.2" y2="290" stroke="#2F80C8" stroke-width="3.2" stroke-opacity="1" marker-end="url(#tg-arrow-blue)"/>
<line x1="670.2" y1="290" x2="670.2" y2="167" stroke="#D55E00" stroke-width="3.2" stroke-opacity="1" marker-end="url(#tg-arrow-verm)"/>
<circle cx="575" cy="332" r="4.5" fill="currentColor"/>
<path d="M657.2 290 L657.2 277 L670.2 277" fill="none" stroke="currentColor" stroke-opacity="0.7" stroke-width="1.5"/>
<text x="682.2" y="306" font-size="13" fill="#2F80C8" font-weight="700">EIF</text>
<text x="682.2" y="219.5" font-size="13" fill="#D55E00" font-weight="700">h</text>
<text x="682.2" y="235.5" font-size="12" fill="currentColor">orthogonal</text>
<text x="682.2" y="250.5" font-size="12" fill="currentColor">to <tspan font-style="italic">T</tspan></text>
<text x="680.2" y="170" font-size="13" fill="currentColor">IF = EIF + h</text>
<text x="416" y="395" font-size="14" text-anchor="start" fill="currentColor" font-weight="700">E[IF²] = E[EIF²] + E[h²]</text>
<text x="416" y="412" font-size="12" text-anchor="start" fill="currentColor" fill-opacity="0.85">so the EIF has the smallest variance.</text>
</svg>
```
The geometry behind the efficiency bound. Left: the score for $\beta$ splits into the part that a direction in the nuisance tangent space can imitate (its projection) and what is left, the efficient score, which is perpendicular to every nuisance direction. Right: the tangent space drawn as a plane. The efficient influence function (EIF) lies in it. Any other influence function is the EIF plus a piece $h$ that sticks out of the plane, so its second moment is larger by $E[h^2]$.
:::
### A mean with known stratum probabilities
Consider i.i.d. records $W=(Z,Y)$ with binary $Z$. The model specifies $P(Z=0)=P(Z=1)=1/2$ as known, while allowing unrestricted conditional outcome laws with the needed finite second moments. The target is still the population mean $\mu=E[Y]$. Sampling produces random stratum counts; the known population probabilities are additional model information.
A permitted score must satisfy $E[s\mid Z]=0$, since paths cannot change the marginal stratum probabilities. Write $m(Z)=E[Y\mid Z]$. The unrestricted-model mean contribution decomposes as
$$
Y-\mu=\{Y-m(Z)\}+\{m(Z)-\mu\}.
$$
The first piece has conditional mean zero and lies in this model's tangent space. The second is a function of $Z$, so its inner product with every allowed score is zero. Projection therefore gives the efficient gradient $Y-m(Z)$, with influence variance $E[\operatorname{Var}(Y\mid Z)]$. The full sample mean remains a valid regular estimator, but carries the additional variance $\operatorname{Var}(m(Z))$.
At a population with stratum means 0 and 4 and within-stratum variances 1, $\mu=2$. The full mean has influence variance $1+4=5$, while the efficient influence variance is 1. Their first-order estimator variances are $5/N$ and $1/N$.
An estimator achieving the latter combines the two within-stratum means using the known weights: $\hat\mu=(\bar Y_0+\bar Y_1)/2$. To check its contribution, write $p_z=P(Z=z)$ and $m_z=E[Y\mid Z=z]$. The stratum mean is a ratio,
$$
\bar Y_z=\frac{P_N[1\{Z=z\}Y]}{P_N[1\{Z=z\}]}.
$$
Its ratio-rule contribution is $1\{Z=z\}(Y-m_z)/p_z$. Multiplying by the known $p_z$ and summing over strata leaves $Y-m(Z)$, the efficient gradient. Each stratum has positive population probability, so its count grows and empty-stratum events vanish asymptotically.
If the weights were instead the same dataset's observed stratum frequencies, this weighted average would reduce to the full sample mean. The gain depends on the assumed known population weights; uncertainty in externally estimated weights would require another contribution.
## Finding the efficient influence function
The left panel of @fig-tangent is the recipe. Take the score for $\beta$ and remove the part of it that the nuisance can imitate. That part is the projection of $S_\beta$ onto $\mathcal T_\eta$, which is the best least-squares prediction of $S_\beta$ from the functions in $\mathcal T_\eta$. What remains is the efficient score,
$$
\begin{aligned}
S_{\text{eff}}&=S_\beta-\Pi(S_\beta\mid\mathcal T_\eta),\\
\operatorname{EIF}&=\frac{S_{\text{eff}}}{E[S_{\text{eff}}^2]}.
\end{aligned}
$$
Both conditions hold. The efficient score is orthogonal to $\mathcal T_\eta$ by construction, which is condition 1. The score $S_\beta$ is the efficient score plus a piece in $\mathcal T_\eta$, and that piece is orthogonal to the efficient score, so $E[S_{\text{eff}}\,S_\beta] = E[S_{\text{eff}}^2]$ and the division gives condition 2. The EIF is built from elements of $\mathcal T$, so it lies in $\mathcal T$. The efficiency bound is $\{N\,E[S_{\text{eff}}^2]\}^{-1}$. With no nuisance, $S_{\text{eff}} = S_\beta$ and the bound is the inverse Fisher information. With a nuisance, $E[S_{\text{eff}}^2] \le E[S_\beta^2]$, and the difference is the price of not knowing the nuisance.
Keep the two projections separate:
- **Project a gradient onto the full tangent space $\mathcal T$.** This preserves its target derivatives and removes an unnecessary orthogonal component, reducing or preserving its influence variance. The known-stratum example does this.
- **Project a target score onto the nuisance space $\mathcal T_\eta$, then subtract.** This isolates the efficient score. Its squared length is information; taking its inverse gives the variance bound after normalization. This is the score calculation from the likelihood page.
A smaller score norm means less information compared with knowing the nuisance. A smaller gradient norm means lower variance among derivative representations within the stated model. The objects and comparison spaces explain the different directions of these inequalities.
### The partially linear model
Take $Y=\beta X+g(Z)+\varepsilon$ with $\varepsilon\mid X,Z\sim N(0,\sigma^2)$, where $\sigma^2>0$ is constant, $g$ and the covariate law are unrestricted subject to the needed moments, and $v_X=E[\operatorname{Var}(X\mid Z)]>0$. This is a conditional Gaussian model, stronger than specifying a conditional mean alone. Write $m_X(Z)=E[X\mid Z]$.
Treat $\sigma^2$ as known for the derivation. If it is unknown, its normal variance score is orthogonal to the mean scores because the centered normal third moment is zero. Estimating it therefore leaves this first-order bound for $\beta$ unchanged, while a feasible SE still needs its estimation. The remaining scores are
- Moving $\beta$ gives $S_\beta = X\varepsilon/\sigma^2$.
- Moving $g$ to $g+tk$ along an admissible square-integrable direction gives score $k(Z)\varepsilon/\sigma^2$.
- Moving the covariate law generates mean-zero scores $a(X,Z)$, with the tangent space including their appropriate limits.
These nuisance directions have zero cross inner product because $E[\varepsilon\mid X,Z]=0$. The target score is already orthogonal to the covariate-law scores by the same conditioning argument. For the remaining directions, seek $h(Z)$ such that $(X-h(Z))\varepsilon$ is orthogonal to every $k(Z)\varepsilon$. Conditioning on $(X,Z)$ gives
$$
E[(X-h(Z))k(Z)\varepsilon^2]=\sigma^2E[(X-h(Z))k(Z)].
$$
This is zero for every $k$ when $h=m_X$, by the conditional-expectation projection property. Thus the nuisance-score projection removes $m_X(Z)\varepsilon/\sigma^2$, leaving the residual-exposure score below. Its second moment is $v_X/\sigma^2$, giving
$$
\begin{aligned}
S_{\text{eff}}&=\frac{(X-m_X(Z))\varepsilon}{\sigma^2},\\
\operatorname{EIF}&=\frac{(X-m_X(Z))\varepsilon}{v_X},\\
\text{variance bound}&=\frac{\sigma^2}{Nv_X}.
\end{aligned}
$$
The nuisance $g$ can absorb the part of $X$ predictable from $Z$. The residual variation supplies the remaining information about $\beta$. The corresponding estimator form regresses residualized $Y$ on residualized $X$ (Robinson, 1988), using $Y-E[Y\mid Z]=\beta(X-m_X(Z))+\varepsilon$. Attaining the bound additionally requires sufficiently accurate nuisance fits and a justified estimator expansion. When $v_X$ is small, the bound is large; when $v_X=0$, the target coefficient cannot be separated from $g$ in this model.
## Checking the partially linear model
The code below checks three claims for the partially linear model: the two conditions, the bound, and the price of the extra freedom. The simulated model has $Z \sim U(0, 1)$, $X = 1.5\sin(2\pi Z) + u$ with $u \sim N(0, 1)$, $\beta = 0.5$, and $\sigma = 1$. Then $E[\operatorname{Var}(X \mid Z)] = 1$, so the bound is a variance of $1/N$.
Three candidate influence functions are compared. The first is the efficient one. The second is the same construction with a weight $w(Z) = e^{2Z}$,
$$
\operatorname{IF}_w = \frac{w(Z)\,(X - m_X(Z))\,\varepsilon}{E[w(Z)\operatorname{Var}(X \mid Z)]},
$$
which satisfies both conditions for a positive weight with finite second moments and a finite, nonzero denominator (exercise 2). It is the candidate influence function for residual-on-residual regression with each observation weighted by $w(Z)$, subject to the required nuisance-learning and remainder conditions.
The third candidate comes from ordinary least squares of $Y$ on $X$ and $Z$. At a law where $g$ is linear, its influence function is $(X-L(Z))\varepsilon/E[(X-L(Z))^2]$, where $L(Z)$ is the best linear predictor of $X$ from $Z$. This representation is valid for the smaller model restricting $g$ to a line. We now ask whether it also satisfies the derivative constraints of the larger model, which permits curved changes to $g$. A large simulated sample stands in for expectations, and two nuisance directions $k(Z)\varepsilon$ test condition 1.
```{r}
set.seed(5)
n <- 2e6
z <- runif(n); mX <- 1.5 * sin(2 * pi * z) # E[X | Z]; Var(X | Z) = 1
x <- mX + rnorm(n); eps <- rnorm(n) # beta = 0.5 and sigma = 1, so S_beta = x * eps
S_beta <- x * eps
w <- exp(2 * z)
r_lin <- resid(lm(x ~ z)) # X minus its best linear predictor from Z
IF <- list(efficient = (x - mX) * eps / mean((x - mX)^2),
weighted = w * (x - mX) * eps / mean(w * (x - mX)^2),
ols_line = r_lin * eps / mean(r_lin^2))
k1 <- sin(2 * pi * z) * eps; k2 <- (z - 0.5)^3 * eps # two nuisance directions
round(sapply(IF, function(f) c(`E[IF * S_beta]` = mean(f * S_beta),
`E[IF * k1]` = mean(f * k1), `E[IF * k2]` = mean(f * k2),
`E[IF^2]` = mean(f^2))), 2)
```
The simulated moments approximately match the derivative constraints for the efficient and weighted candidates: $E[\operatorname{IF}\cdot S_\beta]=1$ and both nuisance moments are zero. Their validity for all admissible directions follows from the population calculation, not from testing only two directions. Their second moments differ: the efficient one has $E[\operatorname{IF}^2]=1$, the influence-variance bound, while the weighted one has 1.31. An estimator attaining the latter contribution has first-order variance 31% above the bound.
The least squares candidate has $E[\operatorname{IF}\cdot S_\beta]=1$ but fails condition 1, with an inner product of about 0.20 for the first nuisance direction. One failing direction is enough: even at a law with linear $g$, this estimator is not regular for $\beta$ under the larger model's curved local perturbations. Its second moment, 0.69, can lie below that model's bound because it does not meet the bound's requirements. A fixed curved $g$ can produce a larger, persistent bias, illustrated next.
The difference between the weighted and the efficient influence functions is the piece $h$ of the previous section, and the decomposition says its second moment accounts for the whole gap.
```{r}
c(extra_second_moment = mean(IF$weighted^2) - mean(IF$efficient^2),
second_moment_of_h = mean((IF$weighted - IF$efficient)^2))
```
Next, the estimators themselves. The efficient and weighted estimators regress the residuals of $Y$ on the residuals of $X$, with both residualized on $Z$ by a smoothing spline. The least squares estimator uses a line for $g$. The simulation runs two scenarios, one in which $g$ is a line and one in which it is a curve.
```{r}
beta <- 0.5
SimPL <- function(n, g) {
z <- runif(n); x <- 1.5 * sin(2 * pi * z) + rnorm(n)
data.frame(z = z, x = x, y = beta * x + g(z) + rnorm(n))
}
EstPL <- function(d, df = 8) {
rx <- d$x - predict(smooth.spline(d$z, d$x, df = df), d$z)$y # X minus its smoothed mean given Z
ry <- d$y - predict(smooth.spline(d$z, d$y, df = df), d$z)$y
wz <- exp(2 * d$z)
c(ols_line = unname(coef(lm(y ~ x + z, d))["x"]),
efficient = sum(rx * ry) / sum(rx^2),
weighted = sum(wz * rx * ry) / sum(wz * rx^2))
}
g_list <- list(line = function(z) 2 * z,
curve = function(z) 2 * sin(2 * pi * z))
set.seed(11)
n <- 500; R <- 2000
sims <- lapply(g_list, function(g) t(replicate(R, EstPL(SimPL(n, g)))))
do.call(rbind, lapply(names(sims), function(s)
data.frame(g = s, estimator = colnames(sims[[s]]), mean = round(colMeans(sims[[s]]), 3),
sd = round(apply(sims[[s]], 2, sd), 4), row.names = NULL)))
# the standard deviation each estimator should have, from its influence function: sqrt(E[IF^2] / N)
round(sqrt(sapply(IF, function(f) mean(f^2)) / n), 4)
```
Compare each mean with the true value 0.5. The last line predicts standard deviations from the efficient and weighted contributions under either scenario, and from the least squares contribution when $g$ is linear. The displayed least squares formula is not automatically its influence function around its misspecified limit when $g$ is curved; assess that scenario's center and spread directly. Monte Carlo uncertainty is roughly 0.001 for each mean and 0.0007 for each standard deviation, with the precise values depending on the estimator.
- The efficient-form estimator is approximately centered in these simulations whether $g$ is a line or a curve. Its standard deviations, 0.0445 and 0.0444, are close to the SE bound $1/\sqrt{500}=0.0447$; the corresponding variance bound is $1/500$.
- The weighted estimator is also approximately centered in this simulation. Its standard deviation, about 0.051, matches the 0.0512 that its influence function predicts, which is about 15% above the efficient estimator's.
- Least squares shows both sides of the trade. When $g$ is a line, it is approximately centered in this simulation and has the smallest standard deviation of the three, 0.037, because it uses the knowledge that $g$ is a line. The efficient estimator, which does not use that knowledge, pays about 20% in standard deviation. When $g$ is a curve, the knowledge is wrong, and least squares has a mean of 0.91 instead of 0.5, a bias of more than nine of its own standard deviations.
The size of the price depends on how much of $X$ lies in curved functions of $Z$. Here $E[X \mid Z]$ is a sine curve, which a line cannot follow. Had it been a line in $Z$, the least squares and efficient estimators would have had the same variance.
The estimator labels refer to their intended first-order contributions. These finite simulations do not prove efficiency or zero finite-sample bias. In particular, a smoother with a fixed nominal complexity need not make approximation error vanish for every regression function; the nuisance-learning guide supplies the conditions needed for an estimator theorem.
## A recipe
For a model with a parameter of interest and a nuisance, an efficient estimator is built in this order.
1. State the model: which parameter you want, and what is left unrestricted.
2. Find the scores: the score $S_\beta$ for the parameter, and the nuisance tangent space $\mathcal T_\eta$ from the paths that move only the nuisance.
3. Project $S_\beta$ onto $\mathcal T_\eta$ and subtract. The remainder is the efficient score, and dividing by its second moment gives the EIF and the bound.
4. Build an estimator whose influence function is the EIF, which usually means solving the sample version of the efficient score equation.
5. Compare it with the simple alternatives, using the two conditions and the bound as the yardsticks.
Step 4 hides the hard part. The efficient score contains quantities that have to be estimated, such as $m_X(Z)$ in the partially linear model. Their estimation errors enter the procedure. [Orthogonality and cross-fitting](../semiparametric-methods/orthogonality-and-cross-fitting.qmd) develops the required bias and empirical-term controls for the missing-outcome mean. A partially linear estimator needs the corresponding argument for its own score.
## Words you will meet
- A regular asymptotically linear (RAL) estimator is one with an influence function that tracks the estimand along every path in the model. The efficiency bound applies to this class.
- The pathwise derivative maps each score direction to the target's rate of change. A gradient is a mean-zero, square-integrable function representing that map through an inner product. An influence function of a regular asymptotically linear estimator must be such a gradient. The unique gradient in the tangent space is the EIF, also called the canonical gradient.
- The efficient score is $S_{\text{eff}}$, and the efficient information is $E[S_{\text{eff}}^2]$. The bound is the inverse of the efficient information, divided by $N$.
- An estimator is semiparametrically efficient when its influence function is the EIF, so that it reaches the bound.
## Exercises
**Checkpoints are completion targets for this page. Additional practice below is optional.** Each checkpoint gives a completion standard, a hint, and a solution outline.
::: {#checkpoint-sp-08 .checkpoint}
### Checkpoint · SP-08 — Prove the efficient-gradient variance comparison {.unnumbered}
**Task type:** Proof and interpretation.
Let $\mathcal T$ be a closed subspace of $L_2^0(P)$ and let a square-integrable gradient $\phi$ represent the target derivative on $\mathcal T$. Define $\phi_{\mathrm{eff}}=\Pi(\phi\mid\mathcal T)$ and $h=\phi-\phi_{\mathrm{eff}}$.
Show that the projected gradient represents the same derivatives, prove the Pythagorean variance identity, and state the equality condition. Explain how this differs from projecting a target score away from the nuisance tangent space.
**Ready to continue when:** you can identify both the object and the projection space, prove the variance comparison, and state what remains to show for an estimator to attain it.
**Transfer:** Why can the variance inequality fail if you add a component that is not orthogonal to $\mathcal T$?
<details class="checkpoint-help">
<summary>Hint</summary>
The projection residual has zero inner product with every element of $\mathcal T$. Scores are in that space.
</details>
<details class="checkpoint-help">
<summary>Solution outline — open after trying</summary>
For any score $s\in\mathcal T$, $E[hs]=0$, so $E[\phi_{\mathrm{eff}}s]=E[\phi s]$. Also $E[\phi_{\mathrm{eff}}h]=0$. Both pieces are centered, giving $E[\phi^2]=E[\phi_{\mathrm{eff}}^2]+E[h^2]$. Equality holds iff $h=0$ almost surely. This compares valid gradients and, when attained by regular asymptotically linear estimators, their first-order variances. It does not construct an estimator or control its remainder. Score residualization instead subtracts $\Pi(S_\beta\mid\mathcal T_\eta)$; the nuisance space and the object being projected are different.
</details>
:::
### Additional practice (optional) {.unnumbered}
These exercises extend the ideas through further derivations, simulations, or applications. Choose those useful for your work.
1. Consider the regular location model $X=\mu+\epsilon$, where $\epsilon$ has an unknown density $f$ symmetric about zero. Assume finite positive variance and Fisher information, and the differentiation and boundary conditions needed for the score identities. Derivatives may hold almost everywhere, allowing the Laplace example. The nuisance is $f$. Show that nuisance scores are even functions of $x-\mu$ and the location score $S_\mu=-f'(x-\mu)/f(x-\mu)$ is odd. Conclude that $S_{\text{eff}}=S_\mu$. Show that the sample mean's influence function $x-\mu$ satisfies both derivative conditions, and that it differs from the EIF unless $f$ is normal. For the Laplace density with scale $b$, compute both variances and check by simulation that the sample median has half the variance of the sample mean.
2. In the partially linear model, show that $\operatorname{IF}_w$ satisfies both conditions for a positive weight $w(Z)$ with $0<E[w\operatorname{Var}(X\mid Z)]<\infty$ and $E[w^2\operatorname{Var}(X\mid Z)]<\infty$. Show that its variance is $\sigma^2 E[w^2 \operatorname{Var}(X \mid Z)] / (E[w \operatorname{Var}(X \mid Z)])^2$ per observation, and that this is smallest when $w$ is constant on the part of the population with positive conditional exposure variance (Cauchy–Schwarz). Check that $w=e^{2Z}$ gives the 1.31 from the code.
3. Suppose the errors are heteroscedastic, $\varepsilon \mid X, Z \sim N(0, \sigma^2(Z))$, with $\sigma^2(\cdot)$ known. Redo the derivation of the efficient score and show that the EIF is $\operatorname{IF}_w$ with $w(Z) = 1/\sigma^2(Z)$. Why is the estimator that was efficient in this page no longer efficient?
## Reading
- Tsiatis, A. A. (2006). *Semiparametric Theory and Missing Data*. Springer. Chapters 3 and 4 develop the geometry used here (influence functions, the tangent space, the nuisance tangent space, and the efficient score), and Chapter 5 works through further models.
- van der Vaart, A. W. (1998). *Asymptotic Statistics*. Cambridge University Press. Chapter 25, the standard graduate treatment of semiparametric models.
- Bickel, P. J., Klaassen, C. A. J., Ritov, Y., and Wellner, J. A. (1993). *Efficient and Adaptive Estimation for Semiparametric Models*. Johns Hopkins University Press. The standard reference.
- Newey, W. K. (1990). Semiparametric efficiency bounds. *Journal of Applied Econometrics*, 5(2), 99 to 135. Derives bounds and efficient scores for a long list of models, with the projection argument shown step by step.
- Robinson, P. M. (1988). Root-N-consistent semiparametric regression. *Econometrica*, 56(4), 931 to 954. The residual-on-residual estimator for the partially linear model.
- Begun, J. M., Hall, W. J., Huang, W.-M., and Wellner, J. A. (1983). Information and asymptotic efficiency in parametric-nonparametric models. *The Annals of Statistics*, 11(2), 432 to 452. The efficiency of Cox's partial likelihood is one of the examples.
- Andersen, P. K. and Gill, R. D. (1982). Cox's regression model for counting processes: a large sample study. *The Annals of Statistics*, 10(4), 1100 to 1120.
- Hines, O., Dukes, O., Diaz-Ordaz, K., and Vansteelandt, S. (2022). Demystifying statistical learning based on efficient influence functions. *The American Statistician*, 76(3), 292 to 304. A short route to efficient influence functions by direct differentiation.
<span id="continue-through-the-collection"></span>
## Related calculations
<span id="at-each-event-time-the-covariate-of-the-person-who-fails-minus-the-average-covariate-of-the"></span><span id="checking-the-cox-model"></span><span id="risk-set-multiplied-by-a-weight-wt-with-w-1-this-is-coxs-partial-likelihood-score"></span><span id="the-cox-model"></span>
The relocated worked calculation is in [Survival models and efficiency (optional)](survival-extension.qmd).
<span id="checkpoint-sp-03"></span><span id="checkpoint-sp-03-build-a-valid-path-and-calculate-its-score"></span>
The relocated worked calculation is in [Statistical models, targets, and paths](model-target-paths.qmd).