from mixedlm import datasets, diagnostics, families, inference, nlme, power, utils
from mixedlm.datasets import (
    load_arabidopsis,
    load_cake,
    load_cbpp,
    load_dyestuff,
    load_dyestuff2,
    load_grouseticks,
    load_insteval,
    load_pastes,
    load_penicillin,
    load_sleepstudy,
    load_verbagg,
)
from mixedlm.estimation.laplace import GQN, GQdk
from mixedlm.estimation.optimizers import NelderMead, NelderMeadState, golden, nlminbwrap
from mixedlm.estimation.reml import DevianceComponents
from mixedlm.families.custom import CustomFamily, QuasiFamily, validate_family
from mixedlm.formula.parser import (
    dropOffset,
    expandDoubleVerts,
    findbars,
    getFixedFormulaStr,
    getNGroups,
    getRandomFormulaStr,
    getResponseName,
    is_mixed_formula,
    nobars,
    parse_formula,
    set_cov_type,
    subbars,
)
from mixedlm.inference.anova import AnovaResult, AnovaType3Result, anova, anova_type3
from mixedlm.inference.bootstrap import bootMer, bootstrap_nlmer
from mixedlm.inference.ddf import (
    DenomDFResult,
    kenward_roger_df,
    pvalues_with_ddf,
    satterthwaite_df,
)
from mixedlm.inference.emmeans import Emmeans, emmeans
from mixedlm.inference.profile import (
    Profile2DResult,
    logProf,
    plot_profiles,
    slice2D,
    splom_profiles,
    varianceProf,
)
from mixedlm.models.control import GlmerControl, LmerControl, glmerControl, lmerControl
from mixedlm.models.glmer import GlmerMod, GlmerVarCorr, glmer, glmer_nb
from mixedlm.models.lmer import (
    LmerMod,
    LogLik,
    ModelTerms,
    PredictResult,
    RanefResult,
    RePCA,
    RePCAGroup,
    VarCorr,
    VarCorrGroup,
    lmer,
)
from mixedlm.models.modular import (
    GlmerDevfun,
    GlmerParsedFormula,
    LmerDevfun,
    LmerParsedFormula,
    OptimizeResult,
    ReTrms,
    devfun2,
    glFormula,
    lFormula,
    mkDataTemplate,
    mkGlmerDevfun,
    mkGlmerMod,
    mkLmerDevfun,
    mkLmerMod,
    mkMinimalData,
    mkNewReTrms,
    mkParsTemplate,
    mkReTrms,
    optimizeGlmer,
    optimizeLmer,
    simulate_formula,
)
from mixedlm.models.nlmer import NlmerMod, NlmerResult, nlmer
from mixedlm.power import PowerCurveResult, PowerResult, extend, powerCurve, powerSim
from mixedlm.utils.lme4_compat import (
    ConvergenceInfo,
    DevComp,
    GHrule,
    REMLcrit,
    checkConv,
    convergence_ok,
    devcomp,
    dummy,
    factorize,
    fortify,
    isNested,
    lmList,
    mkMerMod,
    ngrps,
    pvalues,
    quickSimulate,
    scale_vcov,
    sigma,
    vcconv,
)
from mixedlm.utils.variance import (
    Cv_to_Sv,
    Cv_to_Vv,
    Sv_to_Cv,
    Vv_to_Cv,
    condVar,
    cov2sdcor,
    getL,
    mlist2vec,
    safe_chol,
    sdcor2cov,
    vec2mlist,
    vec2STlist,
)

__version__ = "0.2.0"

__all__ = [
    "lmer",
    "LmerMod",
    "lmerControl",
    "LmerControl",
    "glmer",
    "glmer_nb",
    "GlmerMod",
    "glmerControl",
    "GlmerControl",
    "nlmer",
    "NlmerMod",
    "NlmerResult",
    "anova",
    "anova_type3",
    "AnovaResult",
    "AnovaType3Result",
    "emmeans",
    "Emmeans",
    "bootMer",
    "bootstrap_nlmer",
    "satterthwaite_df",
    "kenward_roger_df",
    "pvalues_with_ddf",
    "DenomDFResult",
    "powerSim",
    "powerCurve",
    "extend",
    "PowerResult",
    "PowerCurveResult",
    "power",
    "sigma",
    "ngrps",
    "lmList",
    "pvalues",
    "checkConv",
    "ConvergenceInfo",
    "convergence_ok",
    "plot_profiles",
    "splom_profiles",
    "slice2D",
    "Profile2DResult",
    "logProf",
    "varianceProf",
    "parse_formula",
    "nobars",
    "findbars",
    "subbars",
    "is_mixed_formula",
    "set_cov_type",
    "expandDoubleVerts",
    "dropOffset",
    "getResponseName",
    "getFixedFormulaStr",
    "getRandomFormulaStr",
    "getNGroups",
    "families",
    "CustomFamily",
    "QuasiFamily",
    "validate_family",
    "DevianceComponents",
    "nlme",
    "inference",
    "diagnostics",
    "datasets",
    "utils",
    "load_sleepstudy",
    "load_cbpp",
    "load_dyestuff",
    "load_dyestuff2",
    "load_penicillin",
    "load_cake",
    "load_pastes",
    "load_insteval",
    "load_arabidopsis",
    "load_grouseticks",
    "load_verbagg",
    "fortify",
    "devcomp",
    "DevComp",
    "vcconv",
    "GHrule",
    "factorize",
    "mkMerMod",
    "LogLik",
    "ModelTerms",
    "PredictResult",
    "RanefResult",
    "VarCorr",
    "VarCorrGroup",
    "GlmerVarCorr",
    "RePCA",
    "RePCAGroup",
    "lFormula",
    "glFormula",
    "mkLmerDevfun",
    "mkGlmerDevfun",
    "optimizeLmer",
    "optimizeGlmer",
    "mkLmerMod",
    "mkGlmerMod",
    "LmerParsedFormula",
    "GlmerParsedFormula",
    "LmerDevfun",
    "GlmerDevfun",
    "OptimizeResult",
    "ReTrms",
    "mkReTrms",
    "simulate_formula",
    "devfun2",
    "isNested",
    "sdcor2cov",
    "cov2sdcor",
    "Vv_to_Cv",
    "Cv_to_Vv",
    "Sv_to_Cv",
    "Cv_to_Sv",
    "mlist2vec",
    "vec2mlist",
    "vec2STlist",
    "condVar",
    "getL",
    "safe_chol",
    "dummy",
    "REMLcrit",
    "scale_vcov",
    "quickSimulate",
    "GQdk",
    "GQN",
    "NelderMead",
    "NelderMeadState",
    "golden",
    "nlminbwrap",
    "mkDataTemplate",
    "mkParsTemplate",
    "mkMinimalData",
    "mkNewReTrms",
]
