PharmCat ★ Russia, 2020-10-03 21:59 (1501 d 19:59 ago) Posting: # 21968 Views: 5,450 |
|
Hello, dear colleagues! Some time ago I released the mixed model solution to bioequivalence for Julia (ReplicateBE.jl) and it works fine but this package is not flexible and can calculate only one kind of task. Now I try to make a general instrument for linear mixed models with some approaches that were used in ReplicateBE.jl. Metida.jl is an experimental Julia package for fitting linear mixed model with flexible covariance structure. Main goal - to implement the ability to develop custom covariance structures and easy way for contributors to do it. Top goal - to realize the most used PROC MIXED abilities from SAS. Now Metida.jl in the early development stage and checked on one small dataset (SAS code). Covariance type implemented: Scaled identity, Variance components, Heterogeneous Compound Symmetry. If Julia is already installed Metida.jl can be installed very simple way: import Pkg; Pkg.add("Metida") Version 0.1.3 on this moment available. To check you can use this example: using Metida, StatsBase, StatsModels, CSV, DataFrames There are many work to do: check other validation datasets, add other covariance types, performance things and other... So I will be very appreciate for any issues on github or here, advices ets. It will be very cool if you guided me for any validation aspects. Note: One of the most notable problems is the long initial start-up time. The second run of the same command is much faster. Worst of all, at the moment, changing the covariance structure also requires recompilation and takes a certain amount of time. Some comparations with PROC MIXED SAS: using Metida, StatsBase, StatsModels, CSV, DataFrames Best regards, |
PharmCat ★ Russia, 2021-02-08 22:33 (1373 d 18:25 ago) @ PharmCat Posting: # 22205 Views: 4,361 |
|
Version 0.2.4 released 10 minutes ago :) The package is documented here. Now covariance types available:
|
PharmCat ★ Russia, 2021-02-18 19:44 (1363 d 21:14 ago) @ PharmCat Posting: # 22213 Views: 4,283 |
|
Version 0.4.0 released ... New covariance types available:
|
PharmCat ★ Russia, 2021-03-05 15:17 (1349 d 01:41 ago) @ PharmCat Posting: # 22246 Views: 4,261 |
|
Version 0.6.0 released ... Add cov types:
|
Weidson ☆ Brazil, 2022-01-12 00:57 (1036 d 16:01 ago) @ PharmCat Posting: # 22729 Views: 3,740 |
|
Dear Friends, I'm not able to install Metida.jl package and I would like to test your functiolities. I downloaded the archive zip (Metida.jl-master.zip) from page: https://github.com/PharmCat/Metida.jl#readme on the botton Code and save it on my diretory (my documents). When I use the option Install from Achive File (.zip; targ.gz) of Rstudio Panel and choose the file at save directory the following message appears on RStudio's console : Installing package into ‘C:/Users/weidson.carlo/Documents/R/win-library/3.6’ Could someone help me with problem? |
Helmut ★★★ Vienna, Austria, 2022-01-12 02:02 (1036 d 14:56 ago) @ Weidson Posting: # 22730 Views: 3,796 |
|
Hi Weidson, ❝ When I use the option Install from Achive File (.zip; targ.gz) of Rstudio Panel and choose the file at save directory the following message appears on RStudio's console: ❝ ❝ ❝ (as ‘lib’ is unspecified) ❝ Warning in install.packages : ❝ Error in install.packages : cannot open the connection As expected (see the subject line). It’s like presenting a Fortran-source to a C-compiler. Can’t work. First you have to download and install Julia. Then start julia.exe (in the installation’s /bin -folder) and in its terminal:
The terminal (Read-Eval-Print-Loop) of Julia is pain in the back. I suggest Atom/Juno or Visual Studio Code. Didn’t try package JuliaCall, except in very simple examples. According to the documentation one could install Julia with the function install_julia() and packages with julia_install_package() . Never tried that.— Dif-tor heh smusma 🖖🏼 Довге життя Україна! Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
Weidson ☆ Brazil, 2022-04-04 16:50 (954 d 01:08 ago) @ Helmut Posting: # 22908 Views: 3,177 |
|
Hi Helmut, During instalation I had problem with this two comands lines: ❝ julia> import Pkg; Pkg.add("DataFrames") ❝ julia> import Pkg; Pkg.add("CategoricalArrays") Not executed . You can see at this figure: How can I solver this? I am a beginner user of this application and I need your help (My OS is Windows 10 (today )) best regards. Weidson |
Helmut ★★★ Vienna, Austria, 2022-01-13 16:18 (1035 d 00:40 ago) @ Weidson Posting: # 22731 Views: 3,636 |
|
Hi Weidson, examples in Julia. Note that I suppressed most of the intermediate output with a semicolon ; and the end of commands.# The (in)famous EMA reference 'data set I' Gives Linear Mixed Model: :(log(PK)) ~ sequence + period + treatment In Phoenix WinNonlin I got with Heterogenous Compound Symmetry:
cshSD(1)_11 0.85274463 Close but not identical. Residual df did not work: *** WARNING 11088: Residual DF is 0. Satterthwaite DF method will be used. However, with Banded No-Diagonal Factor Analytic (f=2) like in the FDA’s SAS-code FA0(2) :Var(period*treatment*subject)_21 0.20211806 That’s much closer to PharmCat’s Metida.jl .Now your data: df = CSV.read("E:/Public/Documents/BEBAC/R/Weidson/IPC_Drug.Cmax.csv", delim="\t", DataFrame); In Phoenix WinNonlin with Heterogenous Compound Symmetry:
cshSD(1)_11 0.99404029 Again, close but not identical; residual df did not work. This time with FA0(2) Var(Period*Treatment*Subject)_21 0.55514404 An alternative is PharmCat’s ReplicateBE.jl (great documentation): using Pkg; Pkg.add("ReplicateBE") # download/install first — Dif-tor heh smusma 🖖🏼 Довге життя Україна! Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
PharmCat ★ Russia, 2022-05-20 19:54 (907 d 22:04 ago) @ Helmut Posting: # 23009 Views: 3,017 |
|
Hi Helmut! Thank you for this great explanation and comparison! I didn't test Metida vs Phoenix, only vs SPSS and SAS. And as I know CSH and FA(2) are completely identical for data with 2 levels in random model (in this case G have 2x2 dim). And I think the difference in results with Phoenix for CSH and FA(2) is the issue (unfortunately it can't be submitted on GitHub). Also if we look at SPSS/SAS documentation we can find that rho optimized in '-1<rho<1' range. And it can't be more 1.0, but we have 'cshCorr_11 1.0005616', rly? It is difficult to make good optimization with Newton methods if parameters are limited, in Metida sigmoid function is used to change the optimization region for rho from -1:1 to -inf:+inf. In SAS and SPSS this feature works fine and I never get rho more than 1 and less -1. But maybe in Phoenix, this limiting work not so good if we see 1.0005616. From one side we can just look at REML values and get a better fitting, from the other - only the fact that we see covariance coefficient = 1.0005616 in the variance-covariance matrix leads that other computations and REML estimation have no sense. In this situation maybe it is a good choice - never use Heterogenous Compound Symmetry in Phoenix. If we see at point estimate and variance values for Metida and Phoenix with FA(0) - they are identical. But the minimal difference may be in DF estimation. I observe differences for DF in all software - between SPSS, SAS and Phoenix, sometimes it depends on data (especially if the covariance matrix is ill-conditioned). Maybe the cause is different approaches for derivating REML function, but it is only an assumption. So also I can say that spatial covariance was added to Metida, and interface to any custom structure. Now I try to work on bootstrapping and multiple imputations for Metida. Maybe some other packages can be interesting: ODMXMLTools.jl - experimental package for ODM-XML MetidaNCA.jl - Julia NCA package |