useDynLib(TAM)

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

export(designMatrices, .A.matrix, designMatrices.mfr,
       tam.fit, 
       tam.jml,
       tam.mml.fit , 
       tam.jml.WLE, 
       tam.jml2, 
       tam.pv, 
       tam, tam.mml, tam.mml.2pl, tam.mml.mfr, 
       tam.se, tam.wle , .A.PCM2 , .A.PCM3 , 
       tam.threshold , tam ,
       tam.ctt , tam.mml.wle , tam.mml.wle2 ,
       tam.ctt2 , tam.fa ,
       plotDevianceTAM , tam.ctt3 , tam.mml.3pl ,
       designMatrices.mfr2 ,
       tam.modelfit ,
       plotctt ,
       lavaanify.IRT ,
       tamaan , 
       tamaanify ,
       doparse,
       tampv2datalist,
       tam.latreg
       )


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

#### anova
S3method(anova, tam.mml )
S3method(anova, tam )
S3method(anova, tam.mml.3pl)
S3method(anova, tamaan)
S3method(anova, tam.latreg)


#### logLik
S3method(logLik, tam.mml )
S3method(logLik, tam )
S3method(logLik, tam.mml.3pl)
S3method(logLik, tamaan )
S3method(logLik, tam.latreg )


#### plot
S3method( plot , tam )
S3method( plot , tam.mml )
S3method( plot , tam.jml )


#### summary
S3method(summary, tam )
S3method(summary, tam.mml )
S3method(summary, tam.mml.3pl)
S3method(summary, tam.modelfit )
S3method(summary, tam.jml )
S3method(summary, tamaan)
S3method(summary, tam.latreg)



########################################
###### S3 methods IRT.xx ###############



#### IRT.factor.scores
S3method(IRT.factor.scores, tam.mml )
S3method(IRT.factor.scores, tam )
S3method(IRT.factor.scores, tam.mml.3pl)
S3method(IRT.factor.scores, tamaan )


#### IRT.irfprob
S3method(IRT.irfprob, tam.mml )
S3method(IRT.irfprob, tam )
S3method(IRT.irfprob, tam.mml.3pl)
S3method(IRT.irfprob, tamaan )


#### IRT.likelihood
S3method(IRT.likelihood, tam.mml )
S3method(IRT.likelihood, tam )
S3method(IRT.likelihood, tam.mml.3pl)
S3method(IRT.likelihood, tamaan )


#### IRT.posterior
S3method(IRT.posterior, tam.mml )
S3method(IRT.posterior, tam )
S3method(IRT.posterior, tam.mml.3pl)
S3method(IRT.posterior, tamaan)





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

import(mvtnorm)
import(tensor)
import(MASS)
import(GPArotation)
importFrom( sfsmisc , QUnif  )
importFrom( psych , schmid )
importFrom( Rcpp , evalCpp )
import(CDM)
importFrom(lattice,xyplot)
import(mirt)
import(lavaan)
importFrom(utils,packageDescription)
importFrom(msm,dtnorm)
importFrom(msm,rtnorm)
