## imports
import("stats")
import("Formula")
import("zoo")

importFrom("lmtest", "coeftest", "waldtest", "waldtest.default", "lrtest", "lrtest.default")
importFrom("car", "linearHypothesis")
importFrom("sandwich", "bread", "estfun")
importFrom("survival", "Surv", "survreg", "survreg.distributions")

## exported functions of AER
export(
  "dispersiontest",
  "tobit",
  "ivreg",
  "ivreg.fit"
)

## methods for class tobit
S3method("print", "tobit")
S3method("print", "summary.tobit")
S3method("summary", "tobit")
S3method("formula", "tobit")
S3method("update", "tobit")
S3method("model.frame", "tobit")
S3method("waldtest", "tobit")
S3method("lrtest", "tobit")
S3method("linearHypothesis", "tobit")
## methods for class tobit that could also be
## inherited from survival >= 3.1-6
S3method("bread", "tobit")
S3method("vcov", "tobit")
S3method("fitted", "tobit")
S3method("nobs", "tobit")
S3method("weights", "tobit")

## methods for class ivreg
S3method("print", "ivreg")
S3method("print", "summary.ivreg")
S3method("summary", "ivreg")
S3method("vcov", "ivreg")
S3method("bread", "ivreg")
S3method("estfun", "ivreg")
S3method("hatvalues", "ivreg")
S3method("predict", "ivreg")
S3method("anova", "ivreg")
S3method("terms", "ivreg")
S3method("model.matrix", "ivreg")
S3method("update", "ivreg")

## methods for class survreg
S3method("deviance", "survreg")

## methods for class multinom, polr, fitdistr
S3method("coeftest", "multinom")
S3method("coeftest", "polr")
S3method("lrtest", "fitdistr")
