# last modified 2015-07-14 by J. Fox

useDynLib(sem)
useDynLib(sem, csemSolve)

import(stats)

importFrom(matrixcalc, duplication.matrix, vech)
importFrom(MASS, ginv)
importFrom(boot, boot.ci)
importFrom(mi, mi, complete)
#importFrom(DiagrammeR, DiagrammeR)
importFrom(utils, combn, edit, setTxtProgressBar, txtProgressBar)

export(ram, standardizedResiduals, normalizedResiduals, readMoments, 
    startvalues, startvalues2,
    standardizedCoefficients, stdCoef, tsls, sem, modIndices, pathDiagram,
    specifyModel, specifyEquations, cfa, math, bootSem, rawMoments, cov2raw, fscores,
    AICc, CAIC,
    classifyVariables, combineModels, removeRedundantPaths,
    optimizerNlm, optimizerOptim, optimizerNlminb,
    objectiveML2, objectiveGLS2, objectiveFIML2,
	optimizerSem,  
	objectiveML, objectiveGLS, objectiveFIML,   
	multigroupModel, msemObjectiveML, msemObjectiveGLS, msemOptimizerNlm,
	# msemObjectiveFIML, 
	msemObjectiveML2, optimizerMsem,  
    miSem,
    # deprecated:
    standardized.residuals, normalized.residuals, read.moments,
    standardized.coefficients, std.coef, mod.indices, path.diagram,
    specify.model, boot.sem, raw.moments
    )

S3method(effects, sem)
S3method(logLik, objectiveML)
S3method(logLik, objectiveFIML)
S3method(miSem, semmod)
S3method(miSem, semmodList)
S3method(bootSem, sem)
S3method(bootSem, msem)
S3method(residuals, sem)
S3method(residuals, objectiveFIML)
S3method(standardizedCoefficients, sem)
S3method(standardizedResiduals, sem)
S3method(standardizedResiduals, objectiveFIML)
S3method(normalizedResiduals, objectiveML)
S3method(normalizedResiduals, objectiveGLS)
S3method(normalizedResiduals, objectiveFIML)
S3method(tsls, default)
S3method(tsls, formula)
S3method(print, tsls)
S3method(summary, tsls)
S3method(print, summary.tsls)
S3method(residuals, tsls) 
S3method(coef, tsls)
S3method(coef, sem)
S3method(fitted, tsls)
S3method(anova, tsls)
S3method(anova, objectiveML)
S3method(anova, objectiveFIML)
S3method(vcov, tsls)
S3method(vcov, sem)
S3method(sem, semmod)
S3method(sem, default)
S3method(summary, objectiveML)
S3method(summary, objectiveGLS)
S3method(summary, objectiveFIML)
S3method(print, summary.objectiveML)
S3method(summary, modIndices)
S3method(summary, msemModIndices)
S3method(print, modIndices)
S3method(print, msemModIndices)
S3method(modIndices, objectiveML)
S3method(modIndices, msemObjectiveML)
S3method(pathDiagram, sem)
S3method(pathDiagram, semmod)
S3method(print, semeffects)     
S3method(print, semmod)
S3method(print, bootsem)
S3method(print, objectiveML)
S3method(print, objectiveGLS)
S3method(print, objectiveFIML)
S3method(summary, bootsem)
S3method(print, summary.bootsem)
S3method(print, miSem)
S3method(summary, miSem)
S3method(print, summary.miSem)
S3method(rawMoments, formula)
S3method(rawMoments, default)
S3method(print, rawmoments)
S3method(deviance, objectiveML)
S3method(deviance, objectiveFIML)
S3method(df.residual, sem)
S3method(coef, sem)
S3method(vcov, sem)
S3method(fscores, sem)
S3method(AIC, objectiveML)
S3method(AIC, objectiveFIML)
S3method(AICc, objectiveML)
S3method(AICc, objectiveFIML)
S3method(CAIC, objectiveML)
S3method(CAIC, objectiveFIML)
S3method(BIC, objectiveML)
S3method(BIC, objectiveFIML)
S3method(combineModels, semmod)
S3method(update, semmod)
S3method(edit, semmod)
S3method(print, semmodList)
S3method(sem, semmodList)
S3method(sem, msemmod)
S3method(print, msemObjectiveML)
S3method(summary, msemObjectiveML)
S3method(print, msemObjectiveGLS)
S3method(summary, msemObjectiveGLS)
S3method(print, msemObjectiveFIML)
S3method(summary, msemObjectiveFIML)
S3method(deviance, msemObjectiveML)
S3method(AIC, msemObjectiveML)
S3method(AICc, msemObjectiveML)
S3method(BIC, msemObjectiveML)
S3method(residuals, msem)
S3method(coef, msem)
S3method(vcov, msem)
S3method(df.residual, msem)
S3method(anova, msemObjectiveML)
S3method(logLik, msemObjectiveML)
S3method(effects, msem)
S3method(print, semeffectsList)
S3method(standardizedCoefficients, msem)
S3method(standardizedResiduals, msem)
S3method(normalizedResiduals, msemObjectiveML)
S3method(fscores, msem)
S3method(vcov, msem)
