View source: R/mhurdle.methods.R
rsq | R Documentation |
This function computes the R squared for multiple hurdle models. The measure is a pseudo coefficient of determination or may be based on the likelihood.
rsq(
object,
type = c("coefdet", "lratio"),
adj = FALSE,
r2pos = c("rss", "ess", "cor")
)
object |
an object of class |
type |
one of |
adj |
if |
r2pos |
only for pseudo coefficient of determination, should the
positive part of the R squared be computed using the residual sum of squares
( |
a numerical value
McFadden D (1974). The Measurement of Urban Travel Demand. Journal of Public Economics, 3, 303-328.
data("Interview", package = "mhurdle")
# independent double hurdle model
idhm <- mhurdle(vacations ~ car + size | linc + linc2 | 0, Interview,
dist = "ln", h2 = TRUE, method = "bfgs")
rsq(idhm, type = "lratio")
rsq(idhm, type = "coefdet", r2pos = "rss")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.