#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)

#testIndReg
importFrom("MASS", rlm)

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

#testIndZIP
importFrom("pscl", zeroinfl)

#testIndReg
importFrom("stats", lm)

#censIndWR
importFrom("survival", is.Surv, coxph, Surv, survreg, clogit, strata)

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

#testIndSpeedglm
importFrom("speedglm", speedlm, speedglm)

#robust glms
#importFrom("robust", glmRob, lmsreg)

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

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

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

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

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

importFrom("e1071", allShortestPaths, extractPath )

importFrom("relations", relation, relation_incidence, transitive_closure)

importFrom("ggm", essentialGraph )

importFrom("Rfast", colVars )


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, censIndCR, censIndWR, gSquare, testIndFisher, testIndLogistic, 
       testIndRQ, testIndGLMM, testIndMVreg, testIndBeta, testIndNB, testIndClogit, testIndPois, testIndReg, 
       testIndSpearman, testIndZIP, testIndSpeedglm, testIndBinom, cv.ses, auc.mxm, acc.mxm, acc_multinom.mxm, mse.mxm, ci.mxm, ciwr.mxm, 
       ord_mae.mxm, poisdev.mxm, nbdev.mxm, glm.mxm, lm.mxm, pois.mxm, nb.mxm, multinom.mxm, rq.mxm, lmrob.mxm, ordinal.mxm, 
       coxph.mxm, beta.mxm, weibreg.mxm, ridge.reg, ridgereg.cv, ridge.plot, ses.model, mmpc.model, nei, plota, reg.fit, pc.or, undir.path, rdag, 
       mb, mmmb, permcor, findAncestors, findDescendants, transitiveClosure, dag2eg, bic.fsreg, bic.glm.fsreg, fs.reg, glm.fsreg, 
       lm.fsreg, glm.bsreg, tc.plot, cv.mmpc, mmpc.path, condi, partialcor)

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