lixoftConnectors tar gz code example
Example 1: lixoftConnectors tar gz
library(lixoftConnectors)
initializeLixoftConnectors(software="monolix")
demoPath = 'C:/Users/username/lixoft/monolix/monolix2019R1/demos/1.creating_and_using_models/1.1.libraries_of_models/'
librariesPath = 'C:/ProgramData/Lixoft/MonolixSuite2019R1/factory/library/pk'
newProject(data = list(dataFile = paste0(demoPath,'data/warfarin_data.txt'),
headerTypes =c("id", "time", "amount", "observation", "obsid", "contcov", "catcov", "ignore"),
observationTypes = list(y1 = "continuous", y2 = "continuous" ),
mapping = list("1" = "y1")),
modelFile = paste0(librariesPath,'/oral1_1cpt_TlagkaVCl.txt'))
scenario <- getScenario()
scenario$tasks = c(populationParameterEstimation = T,
conditionalModeEstimation = T,
conditionalDistributionSampling = T,
standardErrorEstimation=T,
logLikelihoodEstimation=T)
scenario$linearization = TRUE
setScenario(scenario)
popparams <- getPopulationParameterInformation()
tabestimates <- NULL; tabse <- NULL
for(i in 1:5){
popini <- sapply(1:nrow(popparams), function(j){runif(n=1, min=popparams$initialValue[j]/2, max=popparams$initialValue[j]*2)})
newpopparams <- popparams
newpopparams$initialValue <- popini
setPopulationParameterInformation(newpopparams)
runScenario()
tabestimates <- cbind(tabestimates, getEstimatedPopulationParameters())
tabse <- cbind(tabse, getEstimatedStandardErrors()$stochasticApproximation)
}
Example 2: lixoftConnectors tar gz
library(lixoftConnectors)
initializeLixoftConnectors(software="monolix")
demoPath = 'C:/Users/username/lixoft/monolix/monolix2019R1/demos/1.creating_and_using_models/1.1.libraries_of_models/'
project <- paste0(demoPath, "theophylline_project.mlxtran"
loadProject(projectFile = project)
runPopulationParameterEstimation()
iter <- getSAEMiterations()
print(paste0("Iterations in exploratory phase: ",iter$iterationNumbers[1]))
print(paste0("Iterations in smoothing phase: ",iter$iterationNumbers[2]))
Example 3: lixoftconnectors
install.packages(packagePath, repos = NULL, type="source", INSTALL_opts ="--no-multiarch")