prediction_margins: prediction methods

prediction_marginsR Documentation

prediction methods

Description

Methods to compute the predictions and the marginal effects for tobit1 objects

Usage

## S3 method for class 'mhurdle'
prediction(
  model,
  data = find_data(model, parent.frame()),
  at = NULL,
  what = c("E", "Ep", "p"),
  vcov = stats::vcov(model),
  calculate_se = FALSE,
  ...
)

Arguments

model

a model fitted using mhurdle

data, at, vcov, calculate_se

see prediction::prediction

what

see mhurdle:::predict.mhurdle

...

further arguments, especially, a what argument can be provided and will be passed to predict

Details

tobit1 exports the prediction::prediction and margins::margins functions. prediction use the predict method to compute the predictions in a "tidy way", it returns the data frame provided for the predictions augmented by the predictions. margins compute the average marginal effect of every covariate. It uses the numerical derivatives of the predictions using the prediction function.


mhurdle documentation built on June 22, 2024, 9:48 a.m.