# NOT RUN {
data("feesadm", package = "tobit1")
z <- tobit1(fees ~ expense + I(expense ^ 2) + region, feesadm)
head(predict(z))
# same with what = "expvalue", the default
head(predict(z, what = "expvalue"))
# compute the linear predictor and the probability
head(predict(z, what = "linpred"))
head(predict(z, what = "prob"))
# the prediction method returns a data frame
prediction(z, what = "prob")
# use a smaller data set
fees2 <- feesadm[5:25, ]
predict(z, newdata = fees2, what = "prob")
prediction(z, data = fees2, what = "prob")
margins(z, data = fees2, what = "prob")
summary(margins(z, data = fees2, what = "prob"))
# }
Run the code above in your browser using DataLab