
import("methods") 
importFrom("graphics", plot)
importFrom("stats", optim, nlminb)
importFrom("stats", residuals)
importFrom("stats", fitted)
importFrom("stats", weights)
import("stats4")
importFrom("mnormt", pmnorm, dmt, pmt, pd.solve)
importFrom("numDeriv", grad, hessian)

importFrom("grDevices", "dev.interactive", "devAskNewPage", "extendrange")
importFrom("graphics", "Axis", "abline", "axis", "box", "boxplot", "contour",
  "hist", "lines", "mtext", "panel.smooth", "par", "points", "rug", 
  "strheight", "text", "title")
importFrom("stats", ".getXlevels", "as.formula", "contrasts", "cov2cor", 
  "dcauchy", "dchisq", "dnorm", "dt", "integrate", "is.empty.model", 
  "lm.wfit", "model.matrix", "model.offset", "model.response", "model.weights",
  "optimize", "pf", "pnorm", "printCoefmat", "pt", "qchisq", "qf", "qnorm", 
  "qt", "quantile", "rchisq", "resid", "rnorm", "runif", "uniroot", "var")
importFrom("utils", "packageDescription")

S3method(weights, selm)
S3method(weights, mselm)
S3method(coef, selm)
S3method(coef, mselm)
S3method(plot, selm)
S3method(plot, mselm)
S3method(fitted, selm)
S3method(fitted, mselm)
S3method(residuals, selm)
S3method(residuals, mselm)
S3method(sd, default)

export(
  T.Owen, zeta, sn.cumulants, st.cumulants,
  dsn, psn, qsn, rsn,
  dst, pst, qst, rst,
  dsc, psc, qsc, rsc,
  dmsn, pmsn, rmsn, 
  dmst, pmst, rmst,
  dmsc, pmsc, rmsc,
  makeSECdistr, modeSECdistr, 
  marginalSECdistr, affineTransSECdistr,  conditionalSECdistr, 
  dp2cp, cp2dp, dp2op, op2dp, 
  sn.infoUv, sn.infoMv, st.infoUv, st.infoMv,
  selm, MPpenalty, Qpenalty, extractSECdistr,
  selm.fit, sn.mple,  st.mple, msn.mle, msn.mple, mst.mple,
  vech, vech2mat, duplicationMatrix,
  coef.selm, plot.selm, residuals.selm, fitted.selm,
  coef.mselm, plot.mselm, residuals.mselm, fitted.mselm,
  sd.default, sd
  )
 
exportMethods("show", "plot", "summary", "coef",  "logLik", "residuals",
   "fitted", "mean", "vcov", "sd")

exportClasses("SECdistrUv", "SECdistrMv", "summary.SECdistrUv", 
  "summary.SECdistrMv", "selm", "mselm", "summary.selm", "summary.mselm")
