
import("basefun")
import("variables")
import("numDeriv") ### needed by BB???
importFrom("BB", "spg", "BBoptim")
importFrom("alabama", "auglag")
importFrom("nloptr", "nloptr")
importFrom("sandwich", "estfun", "bread")
importFrom("stats", "simulate", "variable.names", "model.matrix", "logLik",
           "vcov", "AIC", "coef", "confint", "dlogis", "dnorm",
           "lm.fit", "plogis", "pnorm", "predict", "qlogis", "qnorm",
           "runif", "stepfun", "weights", "approxfun", "xtabs", "resid",
           "complete.cases", "dexp", "pexp", "qexp")

# importFrom("quadprog", "solve.QP")
importFrom("coneproj", "qprog")
importFrom("grDevices", "rgb")
importFrom("graphics", "axis", "box", "lines", "plot")
importFrom("methods", "as")
importFrom("survival", "Surv")

export(R, "coef<-", mlt, ctm, confband, Hessian, Gradient, as.mlt, 
       mltoptim, as.Surv)
#, paraboot, description
# Hmlt dmlt, hmlt, pmlt, qmlt, smlt, tmlt

S3method("update", "mlt_fit")

S3method("predict", "mlt")
S3method("predict", "ctm")
S3method("simulate", "mlt")
S3method("simulate", "ctm")
S3method("coef", "mlt")
S3method("coef", "ctm")
S3method("variable.names", "mlt")
S3method("mkgrid", "mlt")
S3method("logLik", "mlt")
S3method("vcov", "mlt")
S3method("coef<-", "mlt")
S3method("coef<-", "ctm")
S3method("summary", "mlt")
S3method("print", "mlt")
S3method("print", "summary.mlt")
S3method("R", "Surv")
S3method("R", "factor")
S3method("R", "ordered")
S3method("R", "numeric")
S3method("R", "integer")
S3method("R", "interval")
S3method("R", "list")
S3method("R", "response")
S3method("print", "response")
S3method("bounds", "mlt")
S3method("bounds", "ctm")

S3method("variable.names", "ctm")
S3method("mkgrid", "ctm")
S3method("model.matrix", "ctm")
S3method("confband", "mlt")
S3method("plot", "mlt")
S3method("plot", "ctm")
S3method("weights", "mlt")
S3method("Hessian", "mlt")
S3method("Gradient", "mlt")

S3method("as.mlt", "mlt")

S3method("as.Surv", "response")

#S3method("model.matrix", "mlt")
#S3method("paraboot", "mlt")

S3method("estfun", "mlt")
S3method("residuals", "mlt")
S3method("bread", "mlt")
S3method("bread", "mlt_fit")
