useDynLib(CDM)




####################################################
############# IMPORTS ##############################


#***************************************************
#*************** R Basics / Linking To *************

importFrom(graphics, abline)
importFrom(graphics, axis)
importFrom(graphics, barplot)
importFrom(graphics, hist)
importFrom(graphics, legend)
importFrom(graphics, lines)
importFrom(graphics, par)
importFrom(graphics, plot)
importFrom(graphics, points)
importFrom(graphics, rect)
importFrom(graphics, text)
importFrom(grDevices, dev.off)
importFrom(grDevices, pdf)
importFrom(methods, is)
importFrom(Rcpp, evalCpp)
importFrom(stats, aggregate)
importFrom(stats, anova)
importFrom(stats, as.formula)
importFrom(stats, coef)
importFrom(stats, confint)
importFrom(stats, cor)
importFrom(stats, cov2cor)
importFrom(stats, dnorm)
importFrom(stats, fitted)
importFrom(stats, lm)
importFrom(stats, loess)
importFrom(stats, logLik)
importFrom(stats, median)
importFrom(stats, model.matrix)
importFrom(stats, p.adjust)
importFrom(stats, pchisq)
importFrom(stats, plogis)
importFrom(stats, pnorm)
importFrom(stats, predict)
importFrom(stats, qlogis)
importFrom(stats, qnorm)
importFrom(stats, rbinom)
importFrom(stats, runif)
importFrom(stats, sd)
importFrom(stats, terms)
importFrom(stats, vcov)
importFrom(stats, weighted.mean)
importFrom(utils, combn)
importFrom(utils, flush.console)
importFrom(utils, packageDescription)
importFrom(utils, sessionInfo)



#***************************************************
#************** Depends ****************************

import(mvtnorm)


#***************************************************
#************** Imports ****************************

importFrom(MASS, mvrnorm)
importFrom(lattice, xyplot)
importFrom(plyr, rbind.fill)
importFrom(polycor, polychor)
importFrom(psych, fa)
importFrom(psych, fisherz)
importFrom(sfsmisc, QUnif)





########################################################
################ EXPORTS ###############################

export(
    cdi.kli,
    cdm.est.class.accuracy,
    din, 
    din.deterministic,
    din.equivalent.class,
    din.validate.qmatrix,
    entropy.lca,
    equivalent.dina,
    gdd,
    gdina,
    gdina.dif,
    gdina.wald,
    gdm,
    ideal.response.pattern,
    IRT.anova,
    IRT.compareModels,
    IRT.data,
    IRT.derivedParameters,
    IRT.expectedCounts,
    IRT.factor.scores,
    IRT.IC,
    IRT.irfprob,
    IRT.irfprobPlot,
    IRT.itemfit,
    IRT.jackknife,
    IRT.likelihood,
    IRT.modelfit,
    IRT.parameterTable, 
    IRT.posterior,
    IRT.predict,
    IRT.repDesign,
    IRT.se,
    itemfit.rmsea,
    itemfit.sx2,
    mcdina,
    modelfit.cor,
    modelfit.cor.din,
    modelfit.cor2, 
    personfit.appropriateness,
    sequential.items,
    sim.din, 
    sim.gdina, 
    sim.gdina.prepare,
    skill.cor, 
    skill.polychor,
    skillspace.approximation,
    skillspace.full,
    skillspace.hierarchy,
    slca,
    WaldTest
    )

# internal functions; not intended to be visible to users
# export(check.input, rowMaxs, rowProds2, plot.din, print.din, summary.din,
#        print.summary.din)



#####################################################
######### S3 methods ################################



S3method(anova, din)
S3method(anova, gdina)
S3method(anova, gdm)
S3method(anova, mcdina)
S3method(anova, slca)
S3method(coef, din)
S3method(coef, gdina)
S3method(coef, gdm)
S3method(coef, IRT.jackknife)
S3method(coef, mcdina)
S3method(coef, slca)
S3method(confint,din)
S3method(IRT.data, din)
S3method(IRT.data, gdina)
S3method(IRT.data, gdm)
S3method(IRT.data, mcdina)
S3method(IRT.data, slca)
S3method(IRT.expectedCounts, din)
S3method(IRT.expectedCounts, gdina)
S3method(IRT.expectedCounts, gdm)
S3method(IRT.expectedCounts, mcdina)
S3method(IRT.expectedCounts, slca)
S3method(IRT.factor.scores, din)
S3method(IRT.factor.scores, gdina)
S3method(IRT.factor.scores, gdm)
S3method(IRT.factor.scores, mcdina)
S3method(IRT.factor.scores, slca)
S3method(IRT.irfprob, din)
S3method(IRT.irfprob, gdina)
S3method(IRT.irfprob, gdm)
S3method(IRT.irfprob, mcdina)
S3method(IRT.irfprob, slca)
S3method(IRT.itemfit, din)
S3method(IRT.itemfit, gdina)
S3method(IRT.itemfit, gdm)
S3method(IRT.itemfit, slca)
S3method(IRT.jackknife, gdina)
S3method(IRT.likelihood, din)
S3method(IRT.likelihood, gdina)
S3method(IRT.likelihood, gdm)
S3method(IRT.likelihood, mcdina)
S3method(IRT.likelihood, slca)
S3method(IRT.modelfit, din)
S3method(IRT.modelfit, gdina)
S3method(IRT.posterior, din)
S3method(IRT.posterior, gdina)
S3method(IRT.posterior, gdm)
S3method(IRT.posterior, mcdina)
S3method(IRT.posterior, slca)
S3method(IRT.se, din)
S3method(logLik, din)
S3method(logLik, gdina)
S3method(logLik, gdm)
S3method(logLik, mcdina)
S3method(logLik, slca)
S3method(plot, din)
S3method(plot, gdina)
S3method(plot, gdm)
S3method(plot, itemfit.sx2)
S3method(plot, personfit.appropriateness )
S3method(plot, slca)
S3method(predict,din)
S3method(predict,gdina)
S3method(predict,gdm)
S3method(predict,mcdina)
S3method(predict,slca)
S3method(print, din)
S3method(print, gdina)
S3method(print, gdm)
S3method(print, mcdina)
S3method(print, slca)
S3method(print, summary.din)
S3method(summary, cdi.kli)
S3method(summary, din)
S3method(summary, entropy.lca)
S3method(summary, gdina)
S3method(summary, gdina.dif)
S3method(summary, gdina.wald)
S3method(summary, gdm)
S3method(summary, IRT.compareModels )
S3method(summary, IRT.jackknife)
S3method(summary, itemfit.sx2)
S3method(summary, mcdina)
S3method(summary, modelfit.cor.din)
S3method(summary, personfit.appropriateness )
S3method(summary, slca)
S3method(vcov, din)
S3method(vcov, IRT.jackknife)

