MarcLavielle / mlxR

mlxR
Other
18 stars 5 forks source link

Not able to simulate twice a Monolix project #16

Open benzekry opened 6 years ago

benzekry commented 6 years ago

Hello,

I have an issue when trying to simulate a Monolix project. The first time I do it it works fine but if I re-run the simulation, everything is NA

> library(mlxR)
Le chargement a nécessité le package : ggplot2
> project.file <- '/Users/benzekry/work/code/tests/simulx_mlxR/mlxR330_demosComments/caseStudies/monolixRuns/theophylline_project.mlxtran'
> res1 <- simulx(project = project.file)
> res1$population
      ka_pop        V_pop  beta_V_lw70       Cl_pop beta_Cl_lw70     omega_ka      omega_V     omega_Cl            a            b
  1,54441564  32,52657350   0,74803725   2,81784874   0,60736480   0,62128665   0,09874452   0,26384097   0,57942656   0,07639447
> res1 <- simulx(project = project.file)
Warning message:
In readPopEstimate(infoProject$resultFolder, fim) :
  NAs introduits lors de la conversion automatique
> res1$population
      ka_pop        V_pop  beta_V_lw70       Cl_pop beta_Cl_lw70     omega_ka      omega_V     omega_Cl            a            b
          NA           NA           NA           NA           NA           NA           NA           NA           NA           NA 

This also happens if trying to simulate any other project but does not seem to happen when simulating directly the model.

R version 3.4.4 (RStudio) Mac OS Sierra 10.12.6

MarcLavielle commented 6 years ago

strange...

I was not able to reproduce this behavior:

simulx(project="theophylline_project.mlxtran")$population ka_pop V_pop Cl_pop beta_Cl_lw70 omega_ka omega_V 1.54903647 32.24013330 2.82665820 0.73866215 0.60809361 0.13839157 omega_Cl a b 0.25173786 0.59472481 0.07645794 simulx(project="theophylline_project.mlxtran")$population ka_pop V_pop Cl_pop beta_Cl_lw70 omega_ka omega_V 1.54903647 32.24013330 2.82665820 0.73866215 0.60809361 0.13839157 omega_Cl a b 0.25173786 0.59472481 0.07645794 simulx(project="theophylline_project.mlxtran")$population ka_pop V_pop Cl_pop beta_Cl_lw70 omega_ka omega_V 1.54903647 32.24013330 2.82665820 0.73866215 0.60809361 0.13839157 omega_Cl a b 0.25173786 0.59472481 0.07645794 simulx(project="theophylline_project.mlxtran")$population ka_pop V_pop Cl_pop beta_Cl_lw70 omega_ka omega_V 1.54903647 32.24013330 2.82665820 0.73866215 0.60809361 0.13839157 omega_Cl a b 0.25173786 0.59472481 0.07645794 simulx(project="theophylline_project.mlxtran")$population ka_pop V_pop Cl_pop beta_Cl_lw70 omega_ka omega_V 1.54903647 32.24013330 2.82665820 0.73866215 0.60809361 0.13839157 omega_Cl a b 0.25173786 0.59472481 0.07645794

2018-06-08 18:58 GMT+02:00 benzekry notifications@github.com:

Hello,

I have an issue when trying to simulate a Monolix project. The first time I do it it works fine but if I re-run the simulation, everything is NA

library(mlxR) Le chargement a nécessité le package : ggplot2 project.file <- '/Users/benzekry/work/code/tests/simulx_mlxR/mlxR330_demosComments/caseStudies/monolixRuns/theophylline_project.mlxtran' res1 <- simulx(project = project.file) res1$population ka_pop V_pop beta_V_lw70 Cl_pop beta_Cl_lw70 omega_ka omega_V omega_Cl a b 1,54441564 32,52657350 0,74803725 2,81784874 0,60736480 0,62128665 0,09874452 0,26384097 0,57942656 0,07639447 res1 <- simulx(project = project.file) Warning message: In readPopEstimate(infoProject$resultFolder, fim) : NAs introduits lors de la conversion automatique res1$population ka_pop V_pop beta_V_lw70 Cl_pop beta_Cl_lw70 omega_ka omega_V omega_Cl a b NA NA NA NA NA NA NA NA NA NA

This also happens if trying to simulate any other project but does not seem to happen when simulating directly the model.

R version 3.4.4 (RStudio) Mac OS Sierra 10.12.6

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MarcLavielle/mlxR/issues/16, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ3yuu8BtIZukFStr4Pi8sGuPeJmF8Ikks5t6q0pgaJpZM4UgpEx .

-- https://soutienvenezuela.org/en/ https://soutienvenezuela.org/en/

Marc Lavielle

CMAP, Ecole Polytechnique91128 Palaiseau Cedex

Francehttps://soutienvenezuela.org/en/ Tel: (33) 1 69 33 46 00 (33) 6 37 31 93 05

Marc.Lavielle@inria.fr http://www.cmap.polytechnique.fr/~lavielle

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""

benzekry commented 6 years ago

thank you Marc for the quick answer! weird indeed... on my computer this happens even if I clear all variables in between and unload/reload the library... once I have launched simulx with a monolix project once, it seems then corrupted

benzekry commented 6 years ago

something that might explain the bug and also gives me other troubles is that the simulx function seems to change the decimal separator from "." to "," on my machine

> f <- list(name='f', time=seq(0, 30, by=0.1))
> y <- list(name='y', time=seq(1, 30, by=3))
> V <- list(name='V')
> 1/2
[1] 0.5
> res1 <- simulx(model     = 'model/hierarchical1a.txt', 
+                parameter = p, 
+                output    = list(f, y),
+                settings  = list(seed = 12345))
> 1/2
[1] 0,5

I am a very beginner with R and have not yet managed to figure out where this comes from. Might be connected to the fact that I am on Mac...

MarcLavielle commented 6 years ago

I don't know... you should contact the Lixoft support support@lixoft.com

best, Marc

2018-06-10 15:34 GMT+02:00 benzekry notifications@github.com:

something that might explain the bug and also gives me other troubles is that the simulx function seems to change the decimal separator from "." to "," on my machine

f <- list(name='f', time=seq(0, 30, by=0.1)) y <- list(name='y', time=seq(1, 30, by=3)) V <- list(name='V') 1/2 [1] 0.5 res1 <- simulx(model = 'model/hierarchical1a.txt',

  • parameter = p,
  • output = list(f, y),
  • settings = list(seed = 12345)) 1/2 [1] 0,5

I am a very beginner with R and have not yet managed to figure out where this comes from. Might be connected to the fact that I am on Mac...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarcLavielle/mlxR/issues/16#issuecomment-396049532, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ3yumiW95Fgn4cNrUOrWEwcq4rEL-3-ks5t7SBogaJpZM4UgpEx .

MarcLavielle commented 6 years ago

it seems indeed that there is a problem with Mac OS... :-( a solution is to reload and rerun your Monolix project with Monolix2018. Then, it should be OK...

best,

2018-06-10 15:34 GMT+02:00 benzekry notifications@github.com:

something that might explain the bug and also gives me other troubles is that the simulx function seems to change the decimal separator from "." to "," on my machine

f <- list(name='f', time=seq(0, 30, by=0.1)) y <- list(name='y', time=seq(1, 30, by=3)) V <- list(name='V') 1/2 [1] 0.5 res1 <- simulx(model = 'model/hierarchical1a.txt',

  • parameter = p,
  • output = list(f, y),
  • settings = list(seed = 12345)) 1/2 [1] 0,5

I am a very beginner with R and have not yet managed to figure out where this comes from. Might be connected to the fact that I am on Mac...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarcLavielle/mlxR/issues/16#issuecomment-396049532, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ3yumiW95Fgn4cNrUOrWEwcq4rEL-3-ks5t7SBogaJpZM4UgpEx .