Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 066413c2 authored by HARLE Remy's avatar HARLE Remy
Browse files

featuring : nouvelle version du mechanisticModel

refactor : correction erreur pour fixer des variables
output : suppression des outputs inutiles
parent 0ba650eb
Branches
No related tags found
No related merge requests found
File deleted
File added
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
{ {
"analysis_name": "Identifi", "analysis_name": "Identifi",
"r_script": "identif_mu.R", "r_script": "identifiabilite.R",
"py_env": "base", "py_env": "base",
"reticulate_env": "", "reticulate_env": "",
"logfile": "install.log", "logfile": "install.log",
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"lib": "" "lib": ""
}, },
"dependencies": { "dependencies": {
"R-local": ["mechanisticModel.tar.gz"], "R-local": ["mechanisticModel_1.5.6.tar.gz"],
"R": ["glue","doParallel"], "R": ["glue","doParallel"],
"reticulate": [], "reticulate": [],
"python": [] "python": []
......
...@@ -5,22 +5,18 @@ library(doParallel) ...@@ -5,22 +5,18 @@ library(doParallel)
control <- saemix::saemixControl(map = FALSE,fix.seed = T, fim = FALSE, ll.is = FALSE, nbiter.saemix = c(300, 50), nb.chains = 1, nbiter.burn = 5, nbiter.mcmc = c(2, 2, 2, 0), displayProgress = FALSE, print= FALSE, save = FALSE, nbdisplay = 50) control <- saemix::saemixControl(map = FALSE,fix.seed = T, fim = FALSE, ll.is = FALSE, nbiter.saemix = c(300, 50), nb.chains = 1, nbiter.burn = 5, nbiter.mcmc = c(2, 2, 2, 0), displayProgress = FALSE, print= FALSE, save = FALSE, nbdisplay = 50, save.graphs = F)
alpha_pop = exp(-6.34) alpha_pop = exp(-6.34)
mu_pop = exp(-26.8) mu_pop = exp(-26.8)
sigma = 1 sigma = 1
omega_alpha = 1 omega_alpha = 3.37
omega_mu = 0 omega_mu = 3.78
true_v = c(alpha_pop,mu_pop,sigma,omega_alpha,omega_mu)
true_v = c(alpha_pop,mu_pop,sigma,omega_alpha,omega_mu)
alpha <- c()
mu <- c()
omega_alpha <- c()
omega_mu <- c()
Ncpus <- parallel::detectCores() - 1 Ncpus <- parallel::detectCores() - 1
cl <- parallel::makeCluster(Ncpus) cl <- parallel::makeCluster(Ncpus)
...@@ -40,17 +36,23 @@ res <- foreach::foreach(i=1:100 , .packages = c("tidyverse","mechanisticModel")) ...@@ -40,17 +36,23 @@ res <- foreach::foreach(i=1:100 , .packages = c("tidyverse","mechanisticModel"))
Surv(tps, event) ~ TTR(vdiag), Surv(tps, event) ~ TTR(vdiag),
log(alpha) ~ 1, log(mu) ~ 1, log(alpha) ~ 1, log(mu) ~ 1,
data = JD1, data = JD1,
alpha_0 = 0.001, mu_0 = 2e-12, sigma_0 = 1, omega_0 = c(1, 0), alpha_0 = 0.001, mu_0 = 2e-12, sigma_0 = sigma, omega_0 = c(3.37, 1),
beta_0 = list(alpha = numeric(), mu = numeric()), beta_0 = list(alpha = numeric(), mu = numeric()),
options = control options = control
) )
m = fit(m, silent = T, N_sim_surv = 0) m = fit(m, silent = T, N_sim_surv = 0, omega.estim = c(1, 0), fixed.estim = c(1, 0, 0))
} }
parallel::stopCluster(cl) parallel::stopCluster(cl)
alpha <- c()
mu <- c()
omega_alpha <- c()
omega_mu <- c()
for(i in 1:100){ for(i in 1:100){
alpha <- append(alpha,unlist(res[[i]]$coefs[1])[1]) alpha <- append(alpha,unlist(res[[i]]$coefs[1])[1])
mu <- append(mu,unlist(res[[i]]$coefs[1])[2]) mu <- append(mu,unlist(res[[i]]$coefs[1])[2])
......
...@@ -5,34 +5,27 @@ library(doParallel) ...@@ -5,34 +5,27 @@ library(doParallel)
control <- saemix::saemixControl(map = FALSE,fix.seed = T, fim = FALSE, ll.is = FALSE, nbiter.saemix = c(300, 50), nb.chains = 1, nbiter.burn = 5, nbiter.mcmc = c(2, 2, 2, 0), displayProgress = FALSE, print= FALSE, save = FALSE, nbdisplay = 50) control <- saemix::saemixControl(map = FALSE,fix.seed = T, fim = FALSE, ll.is = FALSE, nbiter.saemix = c(300, 50), nb.chains = 1, nbiter.burn = 5, nbiter.mcmc = c(2, 2, 2, 0), displayProgress = FALSE, print= FALSE, save = FALSE, nbdisplay = 50, save.graphs = F)
alpha_pop = exp(-6.34) alpha_pop = exp(-6.34)
mu_pop = exp(-26.8) mu_pop = exp(-26.8)
sigma = 1 sigma = 1
omega_alpha = 0 omega_alpha = 3.37
omega_mu = 1 omega_mu = 3.78
true_v = c(alpha_pop,mu_pop,sigma,omega_alpha,omega_mu) true_v = c(alpha_pop,mu_pop,sigma,omega_alpha,omega_mu)
alpha <- c()
mu <- c()
omega_alpha <- c()
omega_mu <- c()
Ncpus <- parallel::detectCores() - 1 Ncpus <- parallel::detectCores() - 1
cl <- parallel::makeCluster(Ncpus) cl <- parallel::makeCluster(Ncpus)
doParallel::registerDoParallel(cl) doParallel::registerDoParallel(cl)
res <- foreach::foreach(i=1:100 , .packages = c("tidyverse","mechanisticModel"))%dopar%{ res <- foreach::foreach(i=1:100, .packages = c("tidyverse","mechanisticModel"))%dopar%{
set.seed(i) set.seed(i)
control$seed <- i control$seed <- i
JD1 <- GDC(1000,22.38,1.33,exp(-6.34),exp(-26.8),1,0,1,20*365) JD1 <- GDC(1000,22.38,1.33,exp(-6.34),exp(-26.8),1,3.37,3.78,20*365)
JD1 <- JD1 %>% filter(tps > 0) JD1 <- JD1 %>% filter(tps > 0)
...@@ -40,16 +33,20 @@ res <- foreach::foreach(i=1:100 , .packages = c("tidyverse","mechanisticModel")) ...@@ -40,16 +33,20 @@ res <- foreach::foreach(i=1:100 , .packages = c("tidyverse","mechanisticModel"))
Surv(tps, event) ~ TTR(vdiag), Surv(tps, event) ~ TTR(vdiag),
log(alpha) ~ 1, log(mu) ~ 1, log(alpha) ~ 1, log(mu) ~ 1,
data = JD1, data = JD1,
alpha_0 = 0.001, mu_0 = 2e-12, sigma_0 = 1, omega_0 = c(0, 1), alpha_0 = 0.001, mu_0 = 2e-12, sigma_0 = sigma, omega_0 = c(1, 3.78),
beta_0 = list(alpha = numeric(), mu = numeric()), beta_0 = list(alpha = numeric(), mu = numeric()),
options = control options = control
) )
m = fit(m, silent = T, N_sim_surv = 0) m = fit(m, silent = T, N_sim_surv = 0, omega.estim = c(0, 1), fixed.estim = c(0, 1, 0))
} }
parallel::stopCluster(cl) parallel::stopCluster(cl)
alpha <- c()
mu <- c()
omega_alpha <- c()
omega_mu <- c()
for(i in 1:100){ for(i in 1:100){
alpha <- append(alpha,unlist(res[[i]]$coefs[1])[1]) alpha <- append(alpha,unlist(res[[i]]$coefs[1])[1])
......
...@@ -5,7 +5,7 @@ library(doParallel) ...@@ -5,7 +5,7 @@ library(doParallel)
control <- saemix::saemixControl(map = FALSE,fix.seed = T, fim = FALSE, ll.is = FALSE, nbiter.saemix = c(300, 50), nb.chains = 1, nbiter.burn = 5, nbiter.mcmc = c(2, 2, 2, 0), displayProgress = FALSE, print= FALSE, save = FALSE, nbdisplay = 50) control <- saemix::saemixControl(map = FALSE,fix.seed = T, fim = FALSE, ll.is = FALSE, nbiter.saemix = c(300, 50), nb.chains = 1, nbiter.burn = 5, nbiter.mcmc = c(2, 2, 2, 0), displayProgress = FALSE, print= FALSE, save = FALSE, nbdisplay = 50, save.graphs = F)
alpha_pop = exp(-6.34) alpha_pop = exp(-6.34)
mu_pop = exp(-26.8) mu_pop = exp(-26.8)
...@@ -15,13 +15,6 @@ omega_mu = 3.78 ...@@ -15,13 +15,6 @@ omega_mu = 3.78
true_v = c(alpha_pop,mu_pop,sigma,omega_alpha,omega_mu) true_v = c(alpha_pop,mu_pop,sigma,omega_alpha,omega_mu)
alpha <- c()
mu <- c()
omega_alpha <- c()
omega_mu <- c()
Ncpus <- parallel::detectCores() - 1 Ncpus <- parallel::detectCores() - 1
cl <- parallel::makeCluster(Ncpus) cl <- parallel::makeCluster(Ncpus)
doParallel::registerDoParallel(cl) doParallel::registerDoParallel(cl)
...@@ -40,17 +33,22 @@ res <- foreach::foreach(i=1:100 , .packages = c("tidyverse","mechanisticModel")) ...@@ -40,17 +33,22 @@ res <- foreach::foreach(i=1:100 , .packages = c("tidyverse","mechanisticModel"))
Surv(tps, event) ~ TTR(vdiag), Surv(tps, event) ~ TTR(vdiag),
log(alpha) ~ 1, log(mu) ~ 1, log(alpha) ~ 1, log(mu) ~ 1,
data = JD1, data = JD1,
alpha_0 = 0.001, mu_0 = 2e-12, sigma_0 = 1, omega_0 = c(3, 3), alpha_0 = 0.001, mu_0 = 2e-12, sigma_0 = sigma, omega_0 = c(3, 3),
beta_0 = list(alpha = numeric(), mu = numeric()), beta_0 = list(alpha = numeric(), mu = numeric()),
options = control options = control
) )
m = fit(m, silent = T, N_sim_surv = 0) m = fit(m, silent = T, N_sim_surv = 0, omega.estim = c(1, 1), fixed.estim = c(1, 1, 0))
} }
parallel::stopCluster(cl) parallel::stopCluster(cl)
alpha <- c()
mu <- c()
omega_alpha <- c()
omega_mu <- c()
for(i in 1:100){ for(i in 1:100){
alpha <- append(alpha,unlist(res[[i]]$coefs[1])[1]) alpha <- append(alpha,unlist(res[[i]]$coefs[1])[1])
mu <- append(mu,unlist(res[[i]]$coefs[1])[2]) mu <- append(mu,unlist(res[[i]]$coefs[1])[2])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment