useDynLib(randomLCA)

# Refer to all C/Fortran routines by their name prefixed by C_
useDynLib(randomLCA, .registration = TRUE)

export(.onAttach)
export(randomLCA)
export(calcCondProb)
export(calcCond2Prob)
export(calcMargProb)
export(ranef)
export(ranef.randomLCA)
export(outcomeProbs)
export(refit)
export(refit.randomLCA)
export(summary.randomLCA)
export(classProbs)
export(postClassProbs)
export(maxPostClass)
export(AIC3)
export(print.randomLCA)
export(simulate.randomLCA)

# Imported functions
importFrom(graphics, plot)
importFrom(stats,simulate)
importFrom(lattice,xyplot)
importFrom(lattice,simpleKey)
importFrom(boot,boot)
importFrom(boot,boot.ci)
importFrom("stats", "dbeta", "dnorm", "nlm", "pnorm", "qnorm", "rnorm", "runif","as.formula","rbinom")
importFrom(stats, BIC)
importFrom(stats, AIC)
importFrom(stats, logLik)

importFrom(fastGHQuad, "gaussHermiteData")

importFrom(Matrix, "rankMatrix")

importFrom(Rfast, "rowMaxs")

importFrom(parallel, "detectCores", "makeCluster","stopCluster")

importFrom("doParallel", "registerDoParallel")

importFrom("foreach", "foreach", "%dopar%")

importFrom("doRNG", "%dorng%")

# S3 methods
S3method(plot, randomLCA)
S3method(summary, randomLCA)
S3method(ranef, randomLCA)
S3method(fitted, randomLCA)
S3method(refit, randomLCA)
S3method(outcomeProbs, randomLCA)
S3method(simulate, randomLCA)
S3method(logLik, randomLCA)
S3method(AIC, randomLCA)
S3method(BIC, randomLCA)
S3method(print, randomLCA)
S3method(postClassProbs, randomLCA)
S3method(maxPostClass, randomLCA)

S3method(print, outcomeProbs.randomLCA)
S3method(print, summary.randomLCA)


