Tobit | R Documentation |
Returns a Surv
object that allows for setting up a Tobit
regression model by calling survreg
Tobit(data, limit = 0, limhigh = NULL, transform = NULL, log = FALSE, ...)
data |
the variable to be used as the response in the Tobit regression |
limit |
Lower limit which censors the observations.
If |
limhigh |
Upper limit which censors the observations (for untransformed data). |
transform |
if data should be transformed, specify the function to be used. |
log |
logical. If |
... |
any additional arguments to the |
Tobit regression is a special case of regression with left censored
response data. The function survreg
is suitable for fitting.
In regr
, this is done automatically.
A Surv
object.
Werner A. Stahel
Surv()
from package survival.
if(requireNamespace("survival")) {
data("tobin", package="survival")
Tobit(tobin$durable)
(t.r <- survival::survreg(Tobit(durable) ~ age + quant,
data = tobin, dist="gaussian"))
if(interactive())
plregr(t.r)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.