The predict()
and fitted()
methods for tobit
objects compute the estimates for the latent mean $\mu = E[y^*] = x^\top \beta$. Additionally, the scale parameter $\sigma$ is available as $scale
in the objects:
mu <- fitted(fit)
sigma <- fit$scale
The probability of a non-zero observation is then $P(y > 0) = \Phi(\mu/\sigma)$, i.e.:
p0 <- pnorm(mu/sigma)
The conditional expectation of the censored $y$ given that it is non-zero is $E[y | y > 0] = \mu + \sigma \cdot \lambda(\mu/\sigma)$, where $\lambda(\cdot)$ is the inverse Mills ratio $\lambda(x) = \phi(x)/\Phi(x)$:
lambda <- function(x) dnorm(x)/pnorm(x)
ey0 <- mu + sigma * lambda(mu/sigma)
Finally, the unconditional expectation is $E[y] = P(y > 0) \cdot E[y | y > 0]$, i.e.:
ey <- p0 * ey0
If you want to visualize everything together in a time series style plot:
plot(y, ylim = my.range)
lines(mu, col = "slategray")
lines(y.star, col = "black")
lines(ey0, col = "green")
lines(ey, col = "blue")
The reason that the predict()
method for tobit
objects does not provide all of this automatically is that for all the distributions other than the normal / Gaussian, the relationship is not that easy. But maybe we should at least support the normal case.
Best Answer
It is not in the package, just write your own command. If your regression is reg <- tobit(y~x) then the vector of effects should be