Integrating indicator function to derive pseudovalue I'm reading a paper on the use of pseudovalues in survival analysis and am trying to derive the pseudovalue for the restricted mean lifetime function. We have,
$$ \hat{\mu}_{\tau_i} = \int_{0}^{\tau} \hat{S}_{i}(t) ~ dt $$
where $\hat{S}_i(t)$ is the ith pseudovalue of the survival function.
With no censoring,
$$ \hat{S}_{i}(t) = \mathbb{I}(X_i > t)$$
where $X_i$ is the $i^{th}$ event time. So,
$$ \hat{\mu}_{\tau_i} = \int_{0}^{\tau} I(X_i > t) ~dt $$
By evaluating this, apparently $\hat{\mu}_{\tau_i}$ should be equal to $X_i$ when $X_i \leq \tau$ and $ \tau$ when $X_i > \tau$. I think I am missing something with regards to integrating the indicator function because I am getting $\hat{\mu}_{\tau_i} = \tau - t$.
For indicator functions, I thought
$$ \int_{-\infty}^{\infty} I(X > a) dx  = \int_{a}^{\infty} dx$$
So I changed my integral such that,
$$ \hat{\mu}_{\tau_i} = \int_{t}^{\tau} 1 ~dt = \tau - t$$
I'm thinking this is wrong because the differential is in the integral limits but I'm not sure how to do this correctly. Is anyone able to help point out the correct way of handling this?
 A: The notation $\hat{\mu}_{\tau_i}$ is bad notation, since there is no variable $\tau_i$.  Using the alternative notation $\hat{\mu}_i(\tau)$ for the same thing (which is better notation), you should have:
$$\begin{aligned}
\hat{\mu}_i(\tau)
&= \int \limits_0^\tau \mathbb{I}(X_i > t) \ dt \\[6pt]
&= \int \limits_0^\tau \mathbb{I}(t < X_i) \ dt \\[6pt]
&= \int \limits_0^{\min(X_i,\tau)} \mathbb{I}(t < X_i) \ dt + \int \limits_{\min(X_i,\tau)}^\tau \mathbb{I}(t < X_i) \ dt \\[6pt]
&= \int \limits_0^{\min(X_i,\tau)} 1 \ dt + \int \limits_{\min(X_i,\tau)}^\tau 0 \ dt \\[6pt]
&= \int \limits_0^{\min(X_i,\tau)} 1 \ dt \\[6pt]
&= {\min(X_i,\tau)}. \\[6pt]
\end{aligned}$$
Note that when you perform a definite integral over the variable-of-integration $t$ (and so long as the limits of the integral do not involve $t$) you must get an answer that does not have a $t$ in it.  That is, you "integrate out" the $t$.  The fact that you are getting an answer involving $t$ means that you have not integrated this out correctly.
A: Okay I've figured it out.
My indicator function is
$$ I(X_i > t) = \begin{cases} 1 ~,~ t < X_i < \infty \\ 0 ~,~ otherwise\end{cases} $$
I can rewrite this as a function of t instead of $X_i$,
$$ I(t \leq X_i) = \begin{cases} 1 ~,~ 0 \leq t \leq X_i \\ 0 ~,~ otherwise\end{cases} $$
So I have,
$$ \hat{\mu}_{\tau_i} = \int_{0}^{\tau} I(t \leq X_i) ~dt = \int_{0}^{X_i} 1 ~dt $$
When $X_i \leq \tau$,
$$ \int_{0}^{\tau} I(t \leq X_i) ~dt = \int_{0}^{X_i} 1 ~dt + \int_{X_i}^{\tau} 0 ~ dt = X_i $$
When $X_i > \tau$, we are only integrating to $\tau$ so we have
$$ \int_{0}^{\tau} I(t \leq X_i) ~dt = \int_{0}^{\tau} 1 ~dt = \tau$$
