
useDynLib(TAM)


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



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

importFrom(graphics, abline)
importFrom(graphics, axis)
importFrom(graphics, par)
importFrom(graphics, plot)
importFrom(graphics, points)
importFrom(graphics, legend)
importFrom(graphics, lines)
importFrom(grDevices, dev.off)
importFrom(grDevices, dev.cur)
importFrom(methods, is)
importFrom(Rcpp, evalCpp)
importFrom(stats, aggregate)
importFrom(stats, anova)
importFrom(stats, as.formula)
importFrom(stats, coef)
importFrom(stats, complete.cases)
importFrom(stats, contrasts)
importFrom(stats, cov2cor)
importFrom(stats, dbeta)
importFrom(stats, dnorm)
importFrom(stats, fitted)
importFrom(stats, logLik)
importFrom(stats, model.matrix)
importFrom(stats, na.omit)
importFrom(stats, p.adjust)
importFrom(stats, pchisq)
importFrom(stats, pnorm)
importFrom(stats, predict)
importFrom(stats, qlogis)
importFrom(stats, qnorm)
importFrom(stats, quantile)
importFrom(stats, resid)
importFrom(stats, residuals)
importFrom(stats, rnorm)
importFrom(stats, runif)
importFrom(stats, sd)
importFrom(stats, update.formula)
importFrom(stats, terms)
importFrom(stats, var)
importFrom(stats, vcov)
importFrom(stats, weighted.mean)
importFrom(utils, flush.console)
importFrom(utils, packageDescription)
importFrom(utils, sessionInfo)



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

import(CDM)




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

importFrom(GPArotation, oblimin)
importFrom(lavaan, lavaanify)
importFrom(lavaan, parameterTable)

importFrom(lattice, xyplot)
importFrom(MASS, mvrnorm)
importFrom(msm, dtnorm)
importFrom(msm, rtnorm)
importFrom(mvtnorm, dmvnorm)
importFrom(mvtnorm, pmvnorm)
importFrom(mvtnorm, rmvnorm)
importFrom(plyr, ldply)
importFrom(psych, schmid)
importFrom(sfsmisc, QUnif)
importFrom(tensor, tensor)
importFrom(WrightMap, wrightMap)




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

export(
   .A.matrix,
   .A.PCM2,
   .A.PCM3,
   cfa.extract.itempars,
   designMatrices,
   designMatrices.mfr,
   designMatrices.mfr2,
   doparse,
   IRT.drawPV,
   IRT.informationCurves,
   IRT.linearCFA,
   IRT.residuals,
   IRT.simulate,
   IRT.threshold,
   IRT.truescore,
   IRT.WrightMap,
   IRTLikelihood.cfa,
   lavaanify.IRT,
   msq.itemfit,
   msq.itemfitWLE,
   plotctt,
   plotDevianceTAM,
   tam,
   tam,
   tam.ctt,
   tam.ctt2,
   tam.ctt3,
   tam.fa,
   tam.fit,
   tam.jml,
   tam.jml.WLE,
   tam.jml2,
   tam.latreg,
   tam.mml,
   tam.mml.2pl,
   tam.mml.3pl,
   tam.mml.fit,
   tam.mml.mfr,
   tam.mml.wle,
   tam.mml.wle2,
   tam.modelfit,
   tam.modelfit.args,
   tam.modelfit.IRT,
   tam.pv,
   tam.Q3,
   tam.se,
   tam.threshold,
   tam.wle,
   tamaan,
   tamaanify,
   tampv2datalist
       )




# internal functions; not intended to be visible to users
# export(calc_exp_TK, calc_posterior.v2, calc_prob.v5, 
#        mstep.regression, Mstep_slope, Mstep_slope.v2,
#        print.designMatrices, resp.pattern3, rowcumsums, rowMaxs,
#        stud_prior.v2, tam.jml.xsi, tam.jml.xsi2, theta.sq)


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

S3method(anova, tam )
S3method(anova, tam.latreg)
S3method(anova, tam.mml )
S3method(anova, tam.mml.3pl)
S3method(anova, tamaan)
S3method(IRT.data, tam.mml )
S3method(IRT.data, tam.mml.3pl)
S3method(IRT.data, tamaan )
S3method(IRT.expectedCounts, tam )
S3method(IRT.expectedCounts, tam.mml )
S3method(IRT.expectedCounts, tam.mml.3pl)
S3method(IRT.expectedCounts, tamaan )
S3method(IRT.factor.scores, tam )
S3method(IRT.factor.scores, tam.mml )
S3method(IRT.factor.scores, tam.mml.3pl)
S3method(IRT.factor.scores, tamaan )
S3method(IRT.informationCurves, tam.mml )
S3method(IRT.informationCurves, tam.mml.2pl )
S3method(IRT.informationCurves, tam.mml.3pl )
S3method(IRT.informationCurves, tam.mml.mfr )
S3method(IRT.irfprob, tam )
S3method(IRT.irfprob, tam.mml )
S3method(IRT.irfprob, tam.mml.3pl)
S3method(IRT.irfprob, tamaan )
S3method(IRT.itemfit, tam.mml )
S3method(IRT.itemfit, tam.mml.2pl )
S3method(IRT.itemfit, tam.mml.3pl )
S3method(IRT.itemfit, tam.mml.mfr )
S3method(IRT.likelihood, tam )
S3method(IRT.likelihood, tam.latreg )
S3method(IRT.likelihood, tam.mml )
S3method(IRT.likelihood, tam.mml.3pl)
S3method(IRT.likelihood, tamaan )
S3method(IRT.modelfit, tam.mml )
S3method(IRT.modelfit, tam.mml.3pl)
S3method(IRT.modelfit, tamaan )
S3method(IRT.posterior, tam )
S3method(IRT.posterior, tam.latreg)
S3method(IRT.posterior, tam.mml )
S3method(IRT.posterior, tam.mml.3pl)
S3method(IRT.posterior, tamaan)
S3method(IRT.residuals, tam.mml )
S3method(IRT.residuals, tam.mml.2pl )
S3method(IRT.residuals, tam.mml.mfr )
S3method(IRT.simulate, tam.mml )
S3method(IRT.simulate, tam.mml.2pl )
S3method(IRT.simulate, tam.mml.3pl )
S3method(IRT.simulate, tam.mml.mfr )
S3method(IRT.WrightMap, IRT.threshold)
S3method(IRT.WrightMap, tam.mml )
S3method(IRT.WrightMap, tamaan)
S3method(logLik, tam )
S3method(logLik, tam.latreg )
S3method(logLik, tam.mml )
S3method(logLik, tam.mml.3pl)
S3method(logLik, tamaan )
S3method(plot, IRT.informationCurves )
S3method(plot, tam )
S3method(plot, tam.jml )
S3method(plot, tam.mml )
S3method(predict, tam.mml )
S3method(predict, tam.mml.3pl )
S3method(predict, tamaan )
S3method(print, IRT.threshold)
S3method(residuals, tam.mml )
S3method(residuals, tam.mml.2pl )
S3method(residuals, tam.mml.mfr )
S3method(summary, IRT.linearCFA)
S3method(summary, IRT.modelfit.tam.mml )
S3method(summary, IRT.modelfit.tam.mml.3pl )
S3method(summary, IRT.modelfit.tamaan )
S3method(summary, msq.itemfit)
S3method(summary, msq.itemfitWLE)
S3method(summary, tam )
S3method(summary, tam.fit )
S3method(summary, tam.jml )
S3method(summary, tam.latreg )
S3method(summary, tam.mml )
S3method(summary, tam.mml.3pl )
S3method(summary, tam.modelfit )
S3method(summary, tam.Q3)
S3method(summary, tamaan )
