Skip to content

Julia package for fitting mixed-effects models with flexible random/repeated covariance structure.

License

Notifications You must be signed in to change notification settings

PharmCat/Metida.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

541 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 Citation Code Coverage Build ststus Docs
version codecov Tier 1 Aqua QA pkgeval 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

About

Julia package for fitting mixed-effects models with flexible random/repeated covariance structure.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages