Package: pharmpy-core
Pharmpy is a library and toolkit for pharmacometrics. It can be used as a regular Python package, in R
via thepharmrpackage or via its built in command
line interface.Current features:A model abstraction as a foundation for higher level operations on modelsFunctions for manipulation of models, e.g. changing model components like elimination or absorptionReading NONMEM models and resultsRunning models and complex workflows (with NONMEM or to some extent nlmixr)0.106.0 (2024-01-11)New featuresChange to mBIC as default ranking function in modelsearch, iivsearch and iovsearchAdd modeling.get_central_volume_and_clearanceNew option parameter_uncertainty_method to amdNew option ignore_datainfo_fallback to amdHandle conversion to ETA/ETC for PHI/PHC in NONMEM phi filesChangesRemove the order option in amd and instead add strategy with “fixed” orders and options to subtoolsBugfixesAllow ~ in paths in write_csvHave non-linear elimination models in default search space for amd TMDD modelsFix issue causing removed off-diagonal omegas being transformed into thetasFix issues in frem postprocessing when using mu-referencing0.105.0 (2023-12-07)New featuresAdd modeling.bin_observationsAdd modeling.plot_dv_vs_predAdd modeling.plot_abs_cwres_vs_ipredSupport strictness for thetas, omegas and sigmas separatelySupport stagewise addition of covariates in amdSupport multiple DVs for TMDD modelsAdd retries toolUse retries in the amdChangesAlways keep an iiv eta on clearence in amd0.104.0 (2023-11-06)New featuresAdd modeling.replace_non_random_rvsAdd option keep_index to modeling.get_observations to allow keeping the original dataset indexAdd path-option to tools.fitAdd function tools.is_strictness_fulfilledAdd strictness option to AMD and subtoolsAdd TMDD models to AMDAdd option for TMDD models in structsearchMFL for COVSearch works the same way as for ModelsearchBugfixesProperly handle 0 FIX etas in calculate_bicFix crash when setting 0 transit compartmentsFix various bugs in TMDD models (including allometry)0.103.0 (2023-10-12)ChangesUpdate initial estimates in structsearchAdd option dv to modeling.get_individual_parametersAdd default search space for drug-metabolite models in AMDBugfixesFix bug in calculate_bic where parameters were incorrectly set to fixed for PKPD and drug-metabolite modelsFix bug in COVSearch step numberingFix bug in COVSearch where the final_model was set incorrectlyFix bug in COVSearch where p-value wasn’t displayed for backward models0.102.0 (2023-09-28)New featuresAdd modeling.plot_dv_vs_ipredAdd modeling.plot_cwres_vs_idvAdd modeling.add_indirect_effectAdd option for presystemic circulation for modeling.add_metaboliteAdd bic for multiple testing in modeling.calculate_bicSupport PKPD models in the amd toolSupport Drug-metabolite models in the amd toolAdd first version of report for amdAdd PKPD models to MFLAdd modeling.filter_datasetChangesChange default p-value in ruvsearch from 0.05 to 0.001Change default p-values in covsearch from 0.05 and 0.01 to 0.01 and 0.001Change the mfl for modelsearch to mean search space and not which transformations to doChange the syntax for LAGTIME in the MFLBugfixesAllow ~ for home directory in read_modelfit_results0.101.0 (2023-09-01)New featuresAdd modeling.load_dataset and modeling.unload_datasetAdd @BIOAVAIL to MFLAdd support for iv-oral administration for amd tool0.100.0 (2023-08-25)New featuresSupport for M5, M6 and M7 methods for blq dataNew symbols @PK and @PD in MFLInternal support for multiple doses to one compartmentChangesChange the blqdv type to blq in datainfoBetter usage of BLQ and LLOQ columns for blq data0.99.0 (2023-08-23)New featuresAdd function modeling.set_reference_valuesAdd function modeling.set_lloq_dataParse IV+oral models using CMT columnSpecify DV in RUVSearchOption to add logit IIV inadd_iivNew options for remove_loq_dataChangesMake Task and Workflow immutableIgnore fixed IIVs/IOVs in IIVSearch and IOVSearchBugfixesFix bug where epsilons where removed inremove_iivFix bug increate_basic_pk_modelto handle space separated datasets0.98.0 (2023-07-21)New featuresSupport for multiple dosesAdd functionmodeling.add_bioavailabilityAdd functionmodeling.remove_bioavailabilitySupport for PKPD models in structsearchOption to keep IIVs in IIVSearchOption to test uncertainty methods in EstmethodAutogenerate CMT columnChangesRename BLQ flag datainfo typ toblqdv0.97.0 (2023-06-28)New featuresSupport BLQ transformations in RUVSearchNew tool structsearch and support for TMDD modelsAdd functionmodeling.set_direct_effectAdd functionmodeling.add_effect_compartmentChangesReorganizing of modeling moduleSupport changing error model with BLQ transformationAddmax_iteroption for RUVSearch0.96.0 (2023-05-26)ChangesRename functions handling the precision matrix (was previously referring to information matrix which was an error)Remove saddle reset for default AMD modelLet LLQ column takes precedence over BLQ columnNew featuresAdd tools.load_example_modelfit_resultsBugfixesFix bug where if-statements were reordered incorrectly0.95.0 (2023-05-22)ChangesModelfitResults.ofv_iterationsandModelfitResults.parameter_estimates_iterationshave NaN rows in failed runsBugfixesFix bug causing changes in FIX from model1 to model4 to crash fremFix bug causing individual parameters in $ERROR to crash fremcreate_report now does not assume that results.json already exists~ for $HOME is now supported in write_model and create_reportFix bug where LLOQ value did not override column in dataset intransform_blqCorrect BLQ indicator column condition intransform_blqFix bug where modelfit results were not connected to model after a fit0.94.0 (2023-04-26)New featuresSupport parsing assignments other than DADT in $DES in NONMEMFix parsing of some complex ODE-systems in NONMEMChangesDrop support for Python 3.8BugfixesFix bug causing BIC calculation to fail for models having first order absorption and lag_time after going into zero order absorption0.93.0 (2023-04-19)New featuresAdd functionmodeling.get_zero_order_inputsAdd functionmodeling.set_zero_order_inputAdd functionmodeling.set_tmddAdded plugin to convert models to RxODESupport conversion of more models to nlmixrChangesmodeling.generate_model_codewas renamed tomodeling.get_model_codesince the code is not generated by this functionDo not use ADVAN7 because models that should work with ADVAN7 didn’t were foundBugfixesFix multiple bugs in parsing $TABLE headers0.92.0 (2023-04-05)New featuresAdd functionmodeling.is_linearizedAdd functionmodeling.plot_transformed_eta_distributionsAdd functionmodeling.create_config_templateAdd functionmodeling.get_dv_symbolAdd functionmodeling.get_initial_conditionsAdd functionmodeling.set_initial_conditionAdd functionmodeling.transform_blqBugfixesFix bug where $ABBR wasn’t added for etas0.91.0 (2023-03-03)New featuresAdd functionmodeling.create_basic_pk_modelAdd functionmodeling.add_metaboliteAdd functionmodeling.set_dvidAdd functionmodeling.has_weighted_error_modelChangesmodel.dependent_variablebecomesmodel.dependent_variablesBugfixesFix regression causing DEFDOSE to sometimes be put on the wrong compartmentFix ruvsearch crashing in case of bad modelfit_results (#1551)0.90.0 (2023-02-24)New featuresAdd functionmodeling.has_odesAdd functionmodeling.has_linear_odesAdd functionmodeling.has_linear_odes_with_real_eigenvaluesAdd functionmodeling.is_realSupport for more types of models in the nlmixr pluginAutomatic selection between ADVAN5 and ADVAN7 for NONMEM modelsChangesRemove modeling.copy_modelSupport nlmixr2 instead of nlmixr for the nlmixr pluginThe Model class is now immutableupdate_source is run by all transformation functions0.89.0 (2023-01-26)New featuresAdd functionmodeling.display_odesAdd support for Python 3.11ChangesNaming of parameters for NONMEM models reworked. Configuration options removed.Only allow MFL as input torun_covsearchRemoveread_model_from_databasefrompharmpy.modelingMergeExplicitODESystemintoCompartmentalSystem0.88.0 (2022-12-21)New featuresAdd algorithmexhaustive_only_evalto Estmethod toolAdd replace methods to Assignment, Compartment, Bolus and InfusionChangesRename algorithms in Estmethod tool:reduced->exhaustive.exhaustive->exhaustive_only_evalAlways add iteration 0 in ofv_iterations and parameter_estimates_iterations for eval models with FO/FOCE0.87.0 (2022-12-14)ChangesAllometry model will update initial estimates in allometry toolBase model in IIVSearch tool will update initial estimatesDo not update initial estimates from model that did not minimize successfully (except rounding errors), this affects all AMD subtoolsRename derive to replace in some base classes0.86.0 (2022-11-30)ChangesAdd description to proxy-models (#1314)Input check covariates (#1355), allometric variable (#1378) occasion-column before running AMDBugfixesFix typo in COVSearch that caused it to select model with highest OFV (#1377)Ignore NaNs when selecting models in COVSearch (#1381)Fix issue where initial estimate for KM (in MM-elimination) was set outside of NONMEM’s bounds (#1064)Fix issue where individuals without observations were not filtered for general model objects (afd7707, #1139)Fix issue where saddle reset was not added in start model for AMD (#1394)0.85.0 (2022-11-18)ChangesCovariates are defined in search space option in AMD-toolStore name of final model instead of final model in AMDChange methods and solvers option in estimation method tool: None means none should be testedAdd FORMAT option if length of IDs are too long (#1139)Make Result classes immutableBugfixesFix bug in results parsing where extracting whether parameters are fixed (#1117)Add timeout-loop to wait for .lst-file when renaming0.84.1 (2022-11-13)ChangesMuch faster parsing of NONMEM models4 times faster parsing of NONMEM phi filesBug fixesHave correct F-statement in $ERROR for $DES NONMEM modelsRead compartment names correctly when having both NCOMP and COMP in $MODEL of NONMEM models0.84.0 (2022-11-09)New featuresAdd modeling.deidentify_dataChangesChange CLI anonymize into deidentify0.83.0 (2022-11-01)ChangesOnly test IOV on statements before ODEBug fixesAllow spaces in DADT definitions when parsing ODEFix issue where expression setter was usedFix issue in IIVSearch where tool doesn’t continue to next step if there is a multivariate distributionInput dataset into model constructor in convert model (fixes #1293)Modelfit should not crash if .lst-file does not exist, warns if .lst and .ext-files do not exist (#1302, #1303)0.82.0 (2022-10-24)Changesmodeling.summarize_modelfit_results takes results objects instead of model objectsDo not include aic and bic in summarize_modelfit_results0.81.1 (2022-10-24)Bug fixesHandle NM-TRAN datasets with one and two digit year in DATx column using default LAST20 (50)0.81.0 (2022-10-21)New featuresAdd tools.read_modelfit_resultsChangesrun_modelsearch, run_iovsearch, run_ruvsearch, run_allometry, run_covsearch, run_amd and run_iivsearch now need results as a separate inputBug fixesCorrect scaling for F in NOMEM models for ADVAN 2,4,5,7 and 120.80.0 (2022-10-19)Changesmodeling.fit returns ModelfitResults instead of ModelLet zero_protect default to True for modeling.set_proportional_error_modelFaster parsing of NONMEM table filesBug fixesLet bioavailability parameters be part of rhs of ode_systemMake sure initials are non-zero for absorption parameters0.79.0 (2022-10-16)New featuresRelative paths in files, absolute paths in Python objects (#1180, fixes 887)Validate tool inputs (#1162, fixes #1032)Add allow_nested flag to add_covariate_effect (#1004)Add has_covariate_effect and remove_covariate_effect (#1004)Generalize get_rv_parameters (#1181)9fd701521 Store input models in tool databaseReplace best_model with final_model_name and retrieve_final_modela7fbcbfe2 Handle results and databases as input to retrieve_modelsAdd modeling.update_initial_individual_estimates functionChangesInclude input model as step 0 in summary_models for AMD toolsRename all AMD tool candidates such that modelsearch_candidate1 -> modelsearch_run1Add columns for number of parameters and delta parameters in summary_tool for AMD toolsOnly include chosen models in AMD summary_toolNew names and description for COVSearch candidatesModify COVSearch summary_tool to include information from the steps-table, remove rankingNew candidate descriptions in IOVSearchAdd multiindex to RUVSearch which include step/iteration, remove ranking.Add algorithm column to IIVSearch summary_tool, remove algorithm from candidate nameCompare final model in IIVSearch to input model, return input if worseGeneralize detection of existing effects in add_covariate_effect (#1004)calculate_bic and calculate_aic will need the -2LL as input instead of modelfit_resultscalculate_eta_shrinkage needs the explicit arguments parameter_estimates and individual_estimatescalculate_individual_shrinkage needs the explicit arguments parameter_estimates and individual_estimates_covariancecheck_parameters_near_bounds needs the parameter estimates given in the argumentscheck_high_correlations needs the correlation matrix as an explicit argumentplot_iofv_vs_iofv takes two iofv series instead of two models as inputplot_individual_predictions takes the predictions dataframe as inputcreate_joint_distribution takes an option individual_estimates argument and does not use modelfit_results directlyevaluate_expression to get parameter estimates from optional argument instead of from modelfit_resultsevaluate_population_prediction will not take parameter estimates from modelfit_resultsevaluate_individual_prediction will not take parameter estimates from modelfit_resultsevaluate_eta_gradient will not take parameter estimates from modelfit_resultsevaluate_epsilon_gradient will not take parameter estimates from modelfit_resultsevaluate_weighted_residuals will not take parameter estimates from modelfit_resultssample_parameters_from_covariance_matrix will need parameter_estimates and covariance_matrix as explicit argumentssample_parameters_uniformly will need parameter_esimtates as explicit argumentssample_individual_estimates will need individual_estimates and individual_estimates_covariance as explicit argumentscalculate_individual_parameter_statistics and calculate_pk_parameters_statistics will need parameter estimates and covariance matrixupdate_inits need explicit estimates as argument and does not use modelfit_resultsupdate_inits does not update initial individual estimatesMove predict_* functions from modeling to pharmpy.toolsMove summarize_individuals and summarize_individuals_count_table to pharmpy.toolsMove print_fit_summary to pharmpy.toolsMove write_results to pharmpy.toolsMove summarize_errors to pharmpy.toolsMove rank_models to pharmpy.toolsMove summarize_modelfit_results to pharmpy.toolsSpeedup parsing of NONMEM resultsBug fixes297a64041 Handle individual_ofv is None in dofv (fixes #1101)57fc4fee8 Fix adding categorical covariate effects (#1004)0.78.0 (2022-09-20)Changesfd417aaf Always return a new model in convert_modeld5458e36 Raise KeyError in LocalModelDirectory#retrieve_model (instead of FileNotFoundError)1193bd39 Remove unused pharmpy.symbols submoduleBugfixesbb96a13c Fix update_parameters when parameters are added0ca786c5 Fix backward search of covsearchdd056da3 Fix for models with bioavailability parameters915bc9c7 Fix get_config_path output when config file is disabled82b32278 Remove some unwanted debug printing1131a610 Fix issue in PsN SCM results parsingebfafb45 Assign ODE as compartmental system to variable (#1173)0.77.0 (2022-09-08)Changesfb070ee1 Return input model if allometry model fails (#1049)0.76.1 (2022-09-06)BugfixesFix issue with adding allometry to models with MM eliminationMake pyreadr an optional dependency, making Pharmpy easier to install on Mac M10.76.0 (2022-09-05)New featuresAdd modeling.get_evid to get or create evid from a modelAdd modeling.get_cmt to get or create a cmt column from a modelNew column type: “rate”ChangesRename “resmod” tool to “ruvsearch”Return only DataFrame in modeling.rank_modelsFall back to rank value if model fails in modeling.rank_models (fix #916)Rename “strictness” to “errors_allowed” in modeling.rank_modelsOnly allow “rounding errors” by amd, iivsearch, iovsearch, modelsearch and covsearch (fix #1055)Add attibute significant_digits to ModelfitResultsBugfixesSerialize modelfit results #1092Exlude “unreportable number of significant digits” in modeling.rank_models (fix #1076)0.75.0 (2022-08-10)New featuresSCM forward search followed by backward search in covsearch (#988)ChangesChange initial estimates of IIV parameters of start model in AMD tool (1c65359)Change default order of subtools in AMD tool (42fe72f)BugfixesMake NONMEM column renaming work in more cases (#1001)Fix issue when search spaces which lead to uneven branch length in reduced stepwise algorithm (#694)Fix issue with error record not numbering amounts properly with non-linear elimination (#708)Fix issue with comments being removed in omega blocks (#790, #974)Fix ranking issue when candidate models do not produce an OFV (#1017)Fix issue with reading datasets in AMD with RATE column (#989)0.74.0 (2022-07-18)ChangesRenamepharmpy.parametertopharmpy.parameters(71f4cf23)Merge COVsearch DSL into MFL (#932, #973)Add ZO absorption to default search space in AMD (cfc09bad)BugfixesMakerun_amdwork in more cases (#975)Makerun_iovsearchwork in more cases (#917, #977)Makeremove_iovwork in more cases (#917)Makeget_pk_parameters/run_covsearchwork in more cases (#908)Make NONMEM.modparsing work in more cases (#917, #975, #977)Make NONMEM.modupdating work in more cases (fd564168)Make NONMEM dataset column dropping work in more cases (088a046a)Make ODES updates work in more cases (c76fa476, 430f1d2e)0.73.0 (2022-06-21)New featuresAdd covsearch toolAdd function tools.retrieve_models to read in models from a tool databaseAdd functions modeling.get_individual_parameters, modeling.get_pk_parameters, modeling.get_rv_parameter, and modeling.has_random_effectChangesInclude covsearch tool in AMDAdd results for AMD toolMove fit, run_tool, run_amd, and all tool wrappers from modeling module to tool moduleRename ‘diagonal’ -> ‘add_diagonal’ in iiv strategy option for iivsearch and modelsearch toolInclude column for selection criteria in rank_models0.72.0 (2022-06-08)New featuresAdd iovsearch toolAdd function modeling.summarize_errors to get a summary dataframe of parsed errors from result filesAdd modeling.make_declarativeAdd modeling.cleanup_modelAdd modeling.greekify_modelChangesUse ‘no_add’, ‘diagonal’, ‘fullblock’, or ‘absorption_delay’ instead of numbers for iiv_strategy in iivsearch and modelsearch-toolAdd results and documentation for allometry toolAdd error summaries to iivsearch, modelsearch, resmod, and allometry toolsAdd algorithm argument in estmethod tool (‘exhaustive’ and ‘reduced’)BugfixesHandle etas after ODEs in iivsearch-tool0.71.0 (2022-05-24)New featuresAdd functions find_clearance_parameters and find_volume_parametersChangesRename candidate models in estmethod toolBugfixesAdd upper limit to VP parameter in modelsearch toolFix issue with matrices not being considered positive semidefinite but considered positive definite0.70.1 (2022-05-17)BugfixesRequire pandas 1.4 or newer for multiindex joins. (Fixes #820)0.70.0 (2022-05-13)New featuresNew tool allometry addedAdd modeling.summarize_individuals_count_tableAdd modeling.calculate_ucp_scaleAdd modeling.calculate_parameters_from_ucpAdd description attribute to model objectsAdd wrappers for iivsearch and modelsearch tools (run_iivsearch and run_modelsearch)Add documentation for iivsearch toolChangesresmod can now iterate and add multiple residual error modelsAutomatically generate R examples in a seprate tab in documentationMerge iiv functions into one iivsearch algorithm (‘brute_force’)Use parameter names instead of eta names in iivsearch tool featuresBugfixesMake sure dropping of DATE columns in NONMEM models are handled correctlySolve issue with sporadic crashes because of a database race conditionSolve issue with sporadic crashes caused by race in lazy parsing of NONMEM recordsFix issues with converting some piecewise functions to NONMEM code correctlyFix issue with generating candidate models for iivsearch toolFix issue with duplicate candidate models in iivsearch tool (#745)0.69.0 (2022-04-29)New featuresAdd 1st and 3rd quantiles of residual to simeval resultsChangesRename mfl -> search_space in modelsearch and amdUse BIC as default ranking function in modelsearchStart model in modelsearch is not fittedUpdate modelsearch documentationBugfixesFix bad odes when adding two peripheral compartments to model with MM eliminationFix bug in block splitting in IIV-tool (fixes #745)0.68.0 (2022-04-27)BugfixesFix bad odes when adding peripheral compartment to model with MM elimination (fixes #710)0.67.0 (2022-04-25)New featuresAdd modeling.get_thetas, modeling.get_omegas and modeling.get_sigmasAdd configuration option for NONMEM license file pathBugfixesCorrect parsing of ADVAN=ADVANx in $SUBROUTINES in NONMEM modelsFix issue with duplicated TAD in $INPUT after add_time_after_doseFix issue with not being able to use models with assignments in $DES in estmethod toolSet an upper limit for intercompartmental clearances in the modelsearch tool (fixes #695)0.66.0 (2022-04-20)BugfixesFix NONMEM model parsing issue causing ADVAN not to change for models with DEFOBS in $MODEL0.65.0 (2022-04-14)New featuresAdd option inadd_iivandadd_pk_iivto choose initial estimateChangesReplace different iiv-options in IIV-tool withiiv_strategyUse 0.01 as initial estimate for added IIVs in modelsearch toolBugfixesAdd K-parameters in NONMEM model when changing to general linear (GL) solvers0.64.0 (2022-04-12)New featuresAdd modeling.solve_ode_systemAdd documentation for .datainfo fileAdd iofv plot to linearize resultsStore tool meta data in metadata.jsonChangesNew options for modelsearch tool: switch order of mfl and algorithm, replace different iiv-options withiiv_strategy0.63.0 (2022-04-07)New featuresSupport ~ as HOME in file paths input by usersAdd modeling.read_dataset_from_datainfoStore unique datasets for tool runsBugfixesFix problem with TAD calculation for datasets with ADDLHandle LinAlgError when updating initial estimates in modelsearch (#656)0.62.0 (2022-04-04)New featureStore unique datasets in models/.datasetsChangesNew name for final model in resmodBugfixesUse NaN in summary_individuals if tflite cannot be used0.61.1 (2022-03-31)BugfixesFix time after dose calculation for steady state dosingFix issue where create_joint_distribution could create matrices that are not positively definite (#649)Keep IIV from MAT in MDT when adding a transit (#654)0.61.0 (2022-03-29)New featuresAdd modeling.summarize_individualsChangesChange initial estimates for QP1/QP2 ratio to 0.1/0.9BugfixesHandle ADDL columns for add_time_after_dose0.59.0 (2022-03-25)New featuresAdd modeling.expand_additional_doses0.58.4 (2022-03-24)BugfixesFix issue with start model not being selected if no candidates are better in IIV- and modelsearch-toolFix issue with ranking models by dBIC in IIV-tool0.58.1 (2022-03-22)BugfixesFix ordering of TAD values for dose at some time as observationFix TAD values for datasets with reset time eventHandle models with no covariates for predict_outliers and predict_influential_individuals0.58.0 (2022-03-22)New featuresAdd modeling.add_pk_iiv to add iiv to all pk parameters of a modelChangesChange cutoff for zero protection in proportional error ModelSyntaxErrorChange to checking for positive semidefiniteness instead of only positive definiteness when validating omegasBugfixesFix BIC-mixed calculation to not count thetas related to non-random etas (0 FIX) towards random parametersRead 0 FIX diagonal etas as random variables0.57.0 (2022-03-21)BugfixesKeep thetas/etas when going across absorption transformations (#588, #625)Fix missing ALAG-parameter in non-linear elimination (#578)Fix issue with added VC1-parameter when adding transits to non-linear elimination (#577)Fix missing D1-parameter and RATE-column when adding zero order absorption to non-linear elimination (#578)Only do update_inits if start model was successful in IIV-tool (#632)Fix issue where etas where added to KA/K-parameters instead of MAT/MDT (#636)0.56.0 (2022-03-17)ChangesRemove ZO elimination from the default search space in model searchDo not apply resmod mode if no change on the full modelBugfixesFix bad calculation of number of observations for datasets with both EVID and MDVProperly handle observations and dose at same time for time after dose calculationHandle DATE column for time after dose calculationHandle NONMEM models with no ETAs0.55.0 (2022-03-16)New featuresOption in modeling.update_inits to move estimates that are close to boundaryChangesSet different initial estimates of clearance for peripherals (#590)BugfixesFix issue with duplicated features with IIV-options in modelsearch-toolFix issue where $MODEL was not added when setting ODE solver to GL or GL_REALFix issue where reduced_stepwise failed for certain search spaces (#616)Fix issue with reading in sampled_iofv in simevalUse the same time varying cutoff for resmod models and best model0.54.0 (2022-03-08)New featuresNew IIV version of BIC in calculate_bicUse IIV BIC in iiv toolAdd allometry step in amd toolReduced stepwise algorithm in modelsearchAdd cutoff option to predict_outliers etcBugfixesFix issue with failing to creating correct subblocks of fullblock of random variablesSet index name to id-name in predict_outliers0.53.0 (2022-03-04)New featuresAdd option to remove specific IOV random variablesSupport Python 3.10Add modeling.check_datasetChangesmodeling.calculate_bic: Count epsilons interacting with etas to random parametersUpdated tensorflow models for prediction of outliers and influential individualsOnly consider parameters with etas for covariate modelbuilding in amdInclude AIC/BIC in modeling.summarize_modelfit_resultsBugfixesUpdate solvers in estmethod-toolHandle Q-parameters when adding IIV on structural parameters in iiv-toolOnly add IIV on MDT-parameter with add_mdt_iiv-option in modelsearch-tool0.52.0 (2022-02-25)New featuresAdd covariate search to amd tool0.51.0 (2022-02-24)New featuresAdd option to add IIV to start model in iiv-toolAdd solver option in estmethod-toolAdd option to add IIV only on MDT in modelsearch-toolChangesmodeling.calculate_bic can Calculate three different versions of the BICdefault has switched to be a mixed effects versionRemove etas instead of setting to 0 fix in iiv-toolParse more errors and warnings in .lst-fileRename add_eta -> add_iivs, etas_as_fullblock -> iiv_as_fullblock, add_mdt_eta -> add_mdt_iiv in modelsearch0.50.1 (2022-02-16)BugfixesHandle long paths when fitting NONMEM model0.50.0 (2022-02-16)New featuresAdd modeling.write_resultsAdd modeling.print_fit_summaryAdd modeling.remove_loq_dataAdd first version of WIP scm wrapperChangesChange in mfl in modelsearch such that transits that don’t keep depot will have additional transitMake it possible to set $DATA directly for NONMEM models (via datainfo.path) (#130)0.49.0 (2022-02-10)New featuresAdd modeling.calculate_se_from_covAdd modeling.calculate_se_from_infAdd modeling.calculate_corr_from_covAdd modeling.calculate_cov_from_infAdd modeling.calculate_cov_from_corrseAdd modeling.calculate_inf_from_covAdd modeling.calculate_inf_from_corrseAdd modeling.calculate_corr_from_infAdd modeling.create_reportAdd modeling.check_high_correlationsAdd modeling.calculate_bicAdd modeling.check_parameters_near_boundsAdd option to choose search space in AMD-toolChangesUse p-value instead of OFV cutoff in resmodBugfixesFix issue with no conversion to $DES for some models (#528)0.48.0 (2022-02-04)New featuresParse estimation step runtime from NONMEM results fileChangesForce initial estimates when reading model file to be positive definiteBugfixesRandom block was not split properly in some cases when random variable was removedAdd $COV correctly in NM-TRAN models (#457)0.47.0 (2022-01-28)Add modeling.drop_columnsAdd modeling.drop_dropped_columnsAdd modeling.undrop_columnsAdd modeling.translate_nmtran_time0.46.0 (2022-01-27)Add modeling.calculate_aicAdd modeling.print_model_codeAdd modeling.has_michaelis_menten_eliminationAdd modeling.has_zero_order_eliminationAdd modeling.has_first_order_eliminationAdd modeling.has_mixed_mm_fo_eliminationAdd parent_model attribute to Model objectSupport non-linear elimination in search space in modelsearch toolRename summary -> summary_tool in IIV and modelsearch tool, add summary_modelsUpdate modelsearch algorithm to only run 2C if previous model is 1CFix bug in transformation order in features column of summary in modelsearch tool0.45.0 (2022-01-21)Add timevarying models to resmod0.44.0 (2022-01-20)Add modeling.create_symbolAdd modeling.remove_unused_parameters_and_rvsAdd modeling.mu_reference_modelAdd modeling.simplify_expressionAdd option keep_depot to modeling.set_transit_compartmentsAdd CLI for estmethod toolAdd attributes isample, niter, auto and keep_every_nth_iter to EstimationStepRemove stepwise algorithm in modelsearch tool0.43.0 (2022-01-12)Add modeling.bump_model_numberFix regression in detection of dv column when synonym was used0.42.0 (2022-01-11)Add modeling.get_doseidAdd modeling.get_unit_ofAdd modeling.get_concentration_parameters_from_dataAdd modeling.write_csvAdd modeling.resample_dataAdd modeling.omit_dataAdd modeling.get_observation_expressionAdd modeling.get_individual_prediction_expressionAdd modeling.get_population_prediction_expressionAdd modeling.evaluate_individual_predictionAdd modeling.evaluate_population_predictionAdd modeling.calculate_eta_gradient_expressionAdd modeling.calculate_epsilon_gradient_expressionAdd modeling.evaluate_eta_gradientAdd modeling.evaluate_epsilon_gradientAdd modeling.evaluate_weighted_residualsSupport for Python 3.7 dropped0.41.0 (2021-12-21)Add modeling.get_individualsAdd modeling.get_baselinesAdd modeling.get_covariate_baselinesAdd modeling.get_dosesAdd modeling.list_time_varying_covariatesAdd combined error model to resmodAdd option to zero_protect to set_proportional_error_modelAdd tool estmeth to find optimal estimation method for a modelFix bug causing resmod models to be incorrectNew model.datainfo object0.40.0 (2021-12-16)Add modeling.add_allometry0.39.0 (2021-12-15)Add AMD and IIV tool and respective functions run_amd and run_iivAdd function add_covariance_step and remove_covariance_stepAdd method insert_after to ModelStatementsAdd option to set limit or no limit for power_on_ruv thetaRename EstimationMethod to EstimationStep and add EstimationSteps classParse eta and epsilon derivatives from $TABLEFix bug where lag time is removed when changing to ZO or FO absorption0.38.0 (2021-12-08)Add function to get path to user configuration fileAdd function to get missing DVsAdd option to add IIV on structural parameters (as diagonal and block)Add guard for log(0) in proportional error for log dataAvoid crash if plots cannot be created in CDD resultsFix issue saving modelsearch resultsFix bipp issues with etas outside of FREM matrix0.37.1 (2021-11-26)Fix bug causing frem report to crash with #IDs > 5000Fix bug for shifted uncertainty in frem with bipp0.37.0 (2021-11-24)First version of IIV-toolRename set_lag_time to add_lag_timeInclude run type in summarize_modelfit_resultsFix bug with force option in write_modelFix bug in parsing .ext-files with tables without headerFix bug with nested update_source crashing due to incorrect handling of diagonal recordsFix bug with inserted IGNORE on comment lines0.36.0 (2021-11-11)Add option to set_dtbs_error_model to fix parameters to 0 (i.e. get data on log-scale)Create model file when fitting a model that has no model fileFix bug where files are missing during e.g. modelsearchFix crash when including a model with no results in summarize_modelfit_resultsFix bug in Pharmr where integers where interpreted as floatsFix issue with extra IPRED on power_on_ruv model0.35.0 (2021-11-02)Option to include all estimation steps in summarize_modelfit_resultsUse kwargs in set_estimation_step and add_estimation_stepFirst version of logger (via model.modelfit_results.log)0.34.3 (2021-10-28)Let parametrization of peripheral compartment rates be kept if volume parameter can be found in the expression for K.Fix bug causing crashes when parsing some lst-files due to mixed encodings.0.34.2 (2021-10-26)Fix broken parallelization for tools (workflows)Fix bug causing parsing of some NM-TRAN datasets to set a column index0.34.1 (2021-10-20)Fix issues with retrieving results after model runs0.34.0 (2021-10-14)Remove the need for update_source. Instead use model.model_code or modeling.generate_model_code(model)str(model) can no longer be used to get the model_codeFix crash in model database when using copies of models0.33.0 (2021-10-11)Add modeling.read_model_from_databaseAdd modeling.print_model_symbolsAdd modeling.append_estimation_step_optionsFix crash for $DES models with RATE in datasetFix estimation status for evaluation steps to use latest estimation0.32.0 (2021-09-28)Move plot_iofv_vs_iofv to modelingAdd modeling.get_observationsAdd modeling.plot_individual_predictions0.31.0 (2021-09-21)Move parameter_sampling-functions into modeling moduleAdd run_tool function to modelingAdd predict_outliers, predict_influential_individuals and predict_influential_outliers functions to modelingUpdate API documentation (e.g. add examples, and improved index)0.30.0 (2021-09-06)Add modeling.load_example_modelMove eta_shrinkage results method to modeling.calculate_eta_shrinkageAdd first version of resmod toolUpdate documentation (including API reference)Rename summarize_models to summarize_modelfit_resultsFix bug related in running NONMEM on Windows via Rstudio0.29.0 (2021-08-25)Rename zero_order_absorption to set_zero_order_absorptionRename first_order_absorption to set_first_order_absorptionRename bolus_absorption to set_bolus_absorptionRename seq_zo_fo_absorption to set_seq_zo_fo_absorptionRename have_zero_order_absorption to has_zero_order_absorptionRename power_on_ruv to set_power_on_ruvRename add_lag_time to set_lag_timeMove individual_shrinkage results method to modeling.calculate_individual_shrinkage0.28.0 (2021-08-24)Move method individual_parameter_statistics from Results to a function in modeling and rename to calculate_individual_parameter_statisticsMove method pk_parameters from Results to a function in modeling and rename to calculate_pk_parameters_statisticsRename create_rv_block to create_joint_distributionRename split_rv_block to split_joint_distributionNew default option force=True for write_modelRename ninds to get_number_of_individualsRename nobs to get_number_of_observationsRename nobsi to get_number_of_observations_per_individualRename remove_error to remove_error_modelRename additive_error to set_additive_error_modelRename proportional_error to set_proportional_error_modelRename combined_error to set_combined_error_modelRename has_additive_error to has_additive_error_modelRename has_proportional_error to has_proportional_error_modelRename has_combined_error to has_combined_error_modelRename theta_as_stdev to use_thetas_for_error_stdevRename set_dtbs_error to set_dtbs_error_modelRename boxcox to transform_etas_boxcoxRename tdist to transform_etas_tdistRename john_draper to transform_etas_john_draperRename iiv_on_ruv to set_iiv_on_ruvRename add_parameter to add_individual_parameterRename first_order_elimination to set_first_order_eliminationRename zero_order_elimination to set_zero_order_eliminationRename michaelis_menten_elimination to set_michaelis_menten_eliminationRename mixed_mm_fo_elimination to mixed_mm_fo_eliminationFunction summarize_models to create a summary of modelsParse total runtimeRevert to dask distributed0.27.0 (2021-08-09)Use dask threaded for Windows, allow configuration of dispatcher typeFilter out individuals without observations in .phi-file0.26.1 (2021-08-04)Correct residual calculation in simevalCorrect how laplace estimation method is written0.26.0 (2021-07-13)Add functions to set, add, and remove estimation stepAdd supported estimation methods (ITS, LAPLACE, IMPMAP, IMP, SAEM)When updating estimation step, old options are kept0.25.1 (2021-07-08)Read site path if user path doesn’t exist (previously read user path)Change return type of covariates to a list for easier handling in R0.25.0 (2021-06-24)Add modeling.ninds, nobs and nobsi to get number of individuals and observations of datasetAdd reading results for resmod and crossvalAdd structural bias, simeval and resmod results to qa resultsUpdate index of cdd case_results to plain numbersSupport line continuation (&) in NM-TRAN codeFix error in calculation of sdcorr form of parameter estimatesFix crash of cdd results retrievalVarious fixes for running NONMEM models0.24.0 (2021-05-25)Added theta_as_stdev, set_weighted_error_model and set_dtbs_errorError models can be added with log transformed DV usingdata_transoptionAdded model attributes data_transformation and observation_transformationProtected functions in NM-TRAN translated to Piecewise. Should now give the
same result as when evalutated by NONMEM.Bugfixes for frem, scm and bootstrap results generationRename model attribute dependent_variable_symbol to dependent_variableAdded simplify method on Parameter class to simplify expressions given parameter constraints0.23.4 (2021-05-03)10-100 times Speedup of modeling.evaluate_expression0.23.3 (2021-04-29)Documentation fix for pharmr releaseHandle implicit ELSE clauses for NM-TRAN IF0.23.2 (2021-04-28)Fix bug #1770.23.1 (2021-04-28)Bugfixes0.23.0 (2021-04-28)Add function modeling.evaluate_expressionSome documentation for modelfit_resultsReworked interface to RandomVariables and ParametersBugfixes0.22.0 (2021-03-29)Support COM(n) in NONMEM abbreviated codeFix stdin handling issue when running NONMEM from R0.21.0 (2021-03-22)New functionread_resultsin modelingAdd method to convert ExplicitODESystem to CompartmentalSystemSupport running NONMEM 7.3 and 7.5Bugfixes:Allow protected functions in NONMEM abbreviated codeFix bad rates when changing number of transit compartments (#123)0.20.1 (2021-03-11)Fix regression for calling NONMEM0.20.0 (2021-03-11)New function modeling.set_peripheral_compartmentsNew tool Model SearchNew model attributeestimation_stepsto read and change $ESTIMATIONBugfixes (#99, #118)0.19.0 (2021-03-02)Add create_result to create results from PsNAdd documentation for covariate effects0.18.0 (2021-03-01)Add functions to fix and unfix values to a specified valueAdd documentation for using Pharmpy with NONMEM modelsNew execution system for modelfitSupport for single string input for transformations of etas and epsilons (e.g. add_iov)Various bugfixes, including running NONMEM via Pharmpy on Windows0.17.0 (2021-02-15)Add function to split an eta from a block structureNew names for covariance between etas in create_rv_blockClearer error messages when adding IOVs (if only one level of occasion) and for parameter_names config0.16.0 (2021-02-08)Improve initial estimates for adding peripheral compartmentsParameter names are set according to priority in configAvoid duplication of e.g. median/mean when having multiple covariate effects with the same covariateChange assignments when multiple covariate effects are applied to the same parameter to be combined in one lineDo not change error model if it is the same error model transformation multiple timesAdd AggregatedModelfitResultsDocument scm results0.15.0 (2021-02-01)Change parameter_names config option to be a list of prioritized methodsOption to read names from $ABBR for NONMEM modelsAdd option to give parameter names to methods.add_iivAdd calculation of elimination half-life to one comp models in modelfit_results.pk_parametersDocument cdd resultsAdd set_initial_estimates, set_name and copy_model to modelingAllow single str as input to add_iiv and add_iov0.14.0 (2021-01-25)Support reading $DES-recordsAdd individual_parameter_statistics to ModelfitResultsAdd pk_parameters to ModelfitResultsAdd add_iov to modelingRename add_etas -> add_iiv0.13.0 (2021-01-18)Change names of covariate effect parameters for add_covariate_effectsImprove ordering of terms in created NONMEM expressionsAdd parameter_inits, base_parameter_change, parameter_variability and coefficients to frem_resultsAdd SimevalResults classAdd fit and read_model_from_string functions to modelingAdd solver attribute to ODESystem to be able to select ODE-system solver. Currently ADVANs for NONMEMNew method nonfixed_inits to ParameterSetAdd residuals attribute to ModelfitResultsVarious bug fixesMigrate to github actions for continuous integration0.12.0 (2020-12-18)Add modeling.update_inits, modeling.add_peripheral_compartment and modeling.remove_peripheral_compartmentUpdate FREM documentationSwitch to using modelled covariate values for baselines in FREMAdd methods for retrieving doses and Cmax, Tmax, Cmin and Tmin from datasetVarious bugfixes and support for more ADVAN/TRANS combinations0.11.0 (2020-11-20)Method df.pharmpy.observations to extract observations from dataframeAdd ColumnTypes EVENT and DOSEAdd model.to_base_model to convert model to its raw base model formNew functions in modeling: remove_iiv, zero_order_elimination,
comined_mm_fo_elimination and add_parameterSplit modeling.absorption_rate and error into multiple functionsAdd calculations of AIC and BIC to ModelfitResultsImproved pretty printing0.10.0 (2020-11-16)modeling.create_rv_blockmodeling.michaelis_menten_eliminationmodeling.set_transit_compartmentsFirst version of modelfit methodAdd first version of bootstrap methodAdd parameter estimates histograms to bootstrap reportAdd automatic update of $SIZES PD when writing/updating NONMEM modelAdditions to QAResultsNMTRanParseError replaced with ModelSyntaxErrorMultiple bugfixes to frem and scm result calculations0.9.0 (2020-10-26)Add error_model function to the modeling moduleAdded more standard models for modeling.add_etasImprove BootstrapResultsAdd plots to bootstrapAdd support for the PHARMPYCONFIGPATH environment variableAdd QAResults and LinearizeResults classesBugfixes for some Windows specific issues0.8.0 (2020-10-08)Add basic modeling functions to the modeling modulemodeling.add_etasImproved bootstrap results generation and additional plotsBugfix: Labelled OMEGAS could sometimes get wrong symbol names0.7.0 (2020-09-28)Add method reset_indices in Results to flatten multiindices. Useful from R.absorption_rate can also set sequential zero first absorptionNew functionsadd_lag_time and remove_lag_time in modelingAdd basic functions fix/unfix_parameter, update_source and read_model to modeling APIUpdated reading of NONMEM resultsBugfixes in add_covariate_effects and absorption_rateFix crash in FREM results if no log option could be found in meta.yaml0.6.0 (2020-09-18)Add eta transformations: boxcox, t-dist and John DraperAdd results cdd and scm to CLIAdd different views for scm resultsAdd support for taking parameter names from comment in NONMEM modelRemove assumptions for symbolsAdd modeling.absorption_rate to set 0th or first order absorptionAdd update of $TABLE numbers0.5.0 (2020-09-04)Many bugfixes and improvements to NONMEM code record parserAdd calculation of symbolic and numeric eta and eps gradients, population and individulal prediction and wres for PRED modelsAdd option to use comments in NONMEM parameter records as names for parametersReading of ODE systems from NONMEM non-$DES modelsCalculation of compartmental matrix and ODE systemNew module ‘modeling’Function in modeling and CLI to change ADVAN implicit compartmental models to explicit $DESFunction in modeling and CLI to add covariate effectsFunctions for reading cdd and scm results from PsN runsMany API updatesExtended CLI documentation0.4.0 (2020-07-24)Add categorical covariates to covariate effects plot in FREMBetter support for reading NONMEM code statements (PK and PRED)Support for updating NONMEM code statements (PK and PRED)Bugfixes for CLI0.3.0 (2020-06-16)New CLI command ‘data append’Parameter names is now the index in Parameters.summary()FREM postprocessingStandardized results.yaml and results.csv0.2.0 (2020-03-27)First release0.1.0 (2018-07-22)Initial library development/testing directory structure.