Description Usage Arguments Details Value References Examples

mhurdle fits a large set of models relevant when the dependent variable is 0 for a part of the sample.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |

`formula` |
a symbolic description of the model to be fitted, |

`data` |
a |

`subset` |
see |

`weights` |
see |

`na.action` |
see |

`start` |
starting values, |

`dist` |
the distribution of the error of the consumption
equation: one of |

`h2` |
if |

`scaled` |
if |

`corr` |
a boolean indicating whether the errors of the different equations are correlated or not, |

`robust` |
transformation of the structural parameters in order to avoid numerical problems, |

`check_gradient` |
if |

`...` |
further arguments. |

`mhurdle`

fits models for which the dependent variable is zero for
a part of the sample. Null values of the dependent variable may
occurs because of one or several mechanisms : good rejection, lack
of ressources and purchase infrequency. The model is described
using a three-parts formula : the first part describes the
selection process if any, the second part the regression equation
and the third part the purchase infrequency process. `y ~ 0 | x1 + x2 | z1 + z2`

means that there is no selection process. `y ~ w1 + w2 | x1 + x2 | 0`

and `y ~ w1 + w2 | x1 + x2`

describe the same
model with no purchase infrequency process. The second part is
mandatory, it explains the positive values of the dependant
variable. The `dist`

argument indicates the distribution of the
error term. If `dist = "n"`

, the error term is normal and (at least
part of) the zero observations are also explained by the second
part as the result of a corner solution. Several models described
in the litterature are obtained as special cases :

A model with a formula like `y~0|x1+x2`

and `dist="n"`

is the Tobit
model proposed by \insertCiteTOBIN/58mhurdle.

`y~w1+w2|x1+x2`

and `dist="l"`

or `dist="t"`

is the single hurdle
model proposed by \insertCiteCRAGG/71mhurdle. With `dist="n"`

,
the double hurdle model also proposed by
\insertCiteCRAGG/71mhurdle is obtained. With `corr="h1"`

we get
the correlated version of this model described by
\insertCiteBLUNDELL/87mhurdle.

`y~0|x1+x2|z1+z2`

is the P-Tobit model of
\insertCiteDEATO/IRISH/84mhurdle, which can be a single hurdle
model if `dist="t"`

or `dist="l"`

or a double hurdle model if
`dist="n"`

.

#' an object of class `c("mhurdle", "maxLik")`

.

A `mhurdle`

object has the following elements :

coefficients: the vector of coefficients,

vcov: the covariance matrix of the coefficients,

fitted.values: a matrix of fitted.values, the first column being the probability of 0 and the second one the mean values for the positive observations,

logLik: the log-likelihood,

gradient: the gradient at convergence,

model: a data.frame containing the variables used for the estimation,

coef.names: a list containing the names of the coefficients in the selection equation, the regression equation, the infrequency of purchase equation and the other coefficients (the standard deviation of the error term and the coefficient of correlation if

`corr = TRUE`

,formula: the model formula, an object of class

`Formula`

call: the call,

rho: the lagrange multiplier test of no correlation.

BLUNDELL/87mhurdle

\insertRefCRAGG/71mhurdle

\insertRefDEATO/IRISH/84mhurdle

\insertRefTOBIN/58mhurdle

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
data("Interview", package = "mhurdle")
# independent double hurdle model
idhm <- mhurdle(vacations ~ car + size | linc + linc2 | 0, Interview,
dist = "ln", h2 = TRUE, method = "bfgs")
# dependent double hurdle model
ddhm <- mhurdle(vacations ~ car + size | linc + linc2 | 0, Interview,
dist = "ln", h2 = TRUE, method = "bfgs", corr = TRUE)
# a double hurdle p-tobit model
ptm <- mhurdle(vacations ~ 0 | linc + linc2 | car + size, Interview,
dist = "ln", h2 = TRUE, method = "bfgs", corr = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.