Metida.jl

Julia package for fitting mixed-effects models with flexible random/repeated covariance structure.
Popularity
25 Stars
Updated Last
3 Months Ago
Started In
July 2019

Metida

This program comes with absolutely no warranty. No liability is accepted for any loss and risk to public health resulting from use of this software.

Version pkgeval Cover Build Docs
version pkgeval codecov Tier 1 Latest docs Stable docs

Metida.jl is Julia package for fitting mixed-effects models with flexible covariance structure.

Install:

import Pkg; Pkg.add("Metida")

Using:

using Metida, CSV, DataFrames, CategoricalArrays
df = CSV.File(joinpath(dirname(pathof(Metida)),"..","test","csv","df0.csv")) |> DataFrame
transform!(df, :subject => categorical, renamecols=false)
transform!(df, :period => categorical, renamecols=false)
transform!(df, :sequence => categorical, renamecols=false)
transform!(df, :formulation => categorical, renamecols=false)

lmm = LMM(@formula(var~sequence+period+formulation), df;
random = VarEffect(@covstr(formulation|subject), CSH),
repeated = VarEffect(@covstr(formulation|subject), DIAG),
)

fit!(lmm)

# Or you can use macro @lmmformula

lmm = LMM(@lmmformula(var~sequence+period+formulation,
    random = formulation|subject:CSH,
    repeated = formulation|subject:DIAG),
    df0)
fit!(lmm)

Also you can use this package with MatidaNLopt.jl and MetidaCu.jl.

See also MixedModels.jl: powerful package for mixed models.

Copyright © 2020 Metida Author: Vladimir Arnautov mail@pharmcat.net