useDynLib(MXM, .registration = TRUE)

#testIndFisher
importFrom("stats", coef, resid, cor)

#testIndLogistic
importFrom("stats", model.frame, model.matrix, glm.fit, lm.fit, deviance, as.formula, pchisq)
importFrom("nnet", multinom)
importFrom("ordinal", clm)

#testIndRQ
importFrom("quantreg", rq)

#testIndBeta
importFrom("betareg", betareg)

#testIndNB
importFrom("MASS", glm.nb, loglm)

#testIndPois
importFrom("stats", glm, anova)

#testIndZIP
importFrom("pscl", zeroinfl)

#testIndReg
importFrom("MASS", rlm)
importFrom("stats", lm)

#censIndLR
importFrom("survival", is.Surv, coxph, Surv)

#testIndGLMM
importFrom("lme4", lmer, glmer)

#cv.ses
importFrom("ROCR", prediction, performance)
importFrom("Hmisc", rcorr.cens)
importFrom("TunePareto", generateCVRuns)

#importFrom("survival", predict.coxph)
importFrom("utils", combn)
importFrom("MASS", lm.ridge)

#pc.skel
importFrom("stats", "chisq.test")

#more
importFrom("methods", "new")
importFrom("stats", "predict", "var", "pt", "pf", "binomial", "family", "predict.lm", "BIC", "logLik", "median", "poisson", "sd",
             "xtabs")

importFrom("grDevices", "dev.new")
  
importFrom("graphics", barplot, grid, lines, legend, axis)

import("doParallel")
import("parallel")
import("foreach")


#importFrom("gRbase", combnPrim)
#importFrom("Biobase", exprs)

export(SES, InternalSES, MMPC, InternalMMPC, SES.temporal, InternalSES.temporal, MMPC.temporal, 
       InternalMMPC.temporal, mmhc.skel, pc.skel, pc.con, censIndLR, gSquare, testIndFisher, testIndLogistic, 
       testIndRQ, testIndGLMM, testIndMVreg, testIndBeta, testIndNB, testIndPois, testIndReg, 
       testIndSpearman, testIndZIP, cv.ses, auc.mxm, acc.mxm, mse.mxm, ci.mxm, glm.mxm, lm.mxm, 
       coxph.mxm, ridge.reg, ridgereg.cv, ridge.plot, model, nei, plota ,reg.fit)

exportClasses("SESoutput")
exportClasses("SES.temporal.output")
exportClasses("MMPC.temporal.output")
exportMethods("plot", "summary")