useDynLib("pscl")

export("hurdle", "hurdle.control", "hurdletest",
       "zeroinfl", "zeroinfl.control",
       "odTest",
       "predprob", "vuong", "ntable", "betaHPD")

export("densigamma", "pigamma", "qigamma", "rigamma", "igammaHDR")

export("computeMargins",
       "constrain.items", "constrain.legis",
       "convertCodes",
       "dropRollCall",
       "dropUnanimous", 
       "extractRollCallObject",
       "ideal", "idealToMCMC",
       "readKH",
       "rollcall", "summary.rollcall",
       "plot.predict.ideal",
       "plot.ideal",
       "postProcess",
       "simpi",
       "tracex",
       "vectorRepresentation")

export("seatsVotes", "plot.seatsVotes")

export("hitmiss", "pR2")

importFrom("MASS", "glm.nb", "polr")
importFrom("grDevices", "dev.interactive", "gray", "rainbow")
importFrom("graphics", "abline", "axis", "layout", "legend", "lines",
           "mtext", "pairs", "par", "plot", "points", "polygon", "rug",
           "text", "title")
importFrom("stats", ".getXlevels", "AIC", "binomial", "coef", "cor",
           "dbeta", "delete.response", "density", "dnbinom", "dpois",
           "family", "glm", "glm.fit", "lm", "loess", "logLik",
           "make.link", "model.frame", "model.matrix", "model.response",
           "model.weights", "na.omit", "na.pass", "optim", "optimize",
           "pbeta", "pchisq", "pgamma", "pnbinom", "pnorm", "poisson",
           "ppois", "predict", "printCoefmat", "qbeta", "qchisq",
           "qgamma", "quantile", "residuals", "rgamma", "rnorm", "sd",
           "terms", "uniroot", "update")
importFrom("utils", "tail")

## methods for class zeroinfl
  S3method("print", "zeroinfl")
  S3method("print", "summary.zeroinfl")
  S3method("summary", "zeroinfl")
  S3method("coef", "zeroinfl")
  S3method("vcov", "zeroinfl")
  S3method("logLik", "zeroinfl")
  S3method("predict", "zeroinfl")
  S3method("residuals", "zeroinfl")
  S3method("fitted", "zeroinfl")
  S3method("predprob", "zeroinfl")
  S3method("terms", "zeroinfl")
  S3method("model.matrix", "zeroinfl")
  S3method("extractAIC", "zeroinfl")

## methods for class hurdle
  S3method("print", "hurdle")
  S3method("print", "summary.hurdle")
  S3method("summary", "hurdle")
  S3method("coef", "hurdle")
  S3method("vcov", "hurdle")
  S3method("logLik", "hurdle")
  S3method("predict", "hurdle")
  S3method("residuals", "hurdle")
  S3method("fitted", "hurdle")
  S3method("predprob", "hurdle")
  S3method("terms", "hurdle")
  S3method("model.matrix", "hurdle")
  S3method("extractAIC", "hurdle")

## methods for class ideal
  S3method("plot", "ideal")
  S3method("plot", "predict.ideal")
  S3method("predict", "ideal")
  S3method("predprob", "ideal")
  S3method("print", "ideal")
  S3method("print", "predict.ideal")
  S3method("print", "summary.ideal")
  S3method("summary", "ideal")

## methods for class rollcall
  S3method("dropUnanimous", "rollcall")
  S3method("print", "rollcall")
  S3method("print", "summary.rollcall")
  S3method("summary", "rollcall")

## misc methods
  S3method("dropUnanimous", "matrix")
  S3method("predprob", "glm")

## methods for class seatsVotes
   S3method("print", "seatsVotes")
   S3method("plot", "seatsVotes")
   S3method("summary", "seatsVotes")

## hitmiss methods
   S3method("hitmiss", "glm")
   S3method("hitmiss", "polr")
   S3method("hitmiss", "multinom")

## pR2 methods
   S3method("pR2", "glm")
   S3method("pR2", "polr")
   S3method("pR2", "multinom")
