pharmpy / pharmr

R wrapper to Pharmpy
GNU Lesser General Public License v3.0
19 stars 4 forks source link

checking model results #63

Open joaoabr opened 2 years ago

joaoabr commented 2 years ago

1) Is there currently a function that combines these 3 pieces of information so that the user can quickly check the results: input_model$modelfit_results$ofv input_model$modelfit_results$parameter_estimates input_model$modelfit_results$relative_standard_errors this would be equivalent to a PsN sumo

2) Is there a way to visualize the *.lst file, namel the end of the iterations, e.g. in the same way as for the model file selected_model %>% print_model_code()

stellabelin commented 2 years ago

Hi!

  1. You can use the function summarize_modelfit_results, which will contain those metrics (as well as runtime, AIC, and BIC)
  2. Do you mean printing the .lst-file in full? If so, there is no way currently, would that be useful?
joaoabr commented 2 years ago

Hi.

  1. exacty what I was looking for, thanks!
  2. I think it is useful but it may be quite large to display it entirely in the R console. An alternative could be to display only the iterations part, including the status of the minimization.
emiliesg commented 2 years ago

Hi ! I would like to report a related issue regarding the modelfit results. One of my model failed, with the following error reported in the lst file: 0PROGRAM TERMINATED BY OBJ ERROR IN CELS WITH INDIVIDUAL 1 ID= 1.00000000000000E+00 SUM OF "SQUARED" WEIGHTED INDIVIDUAL RESIDUALS IS INFINITE MESSAGE ISSUED FROM ESTIMATION STEP AT INITIAL OBJ. FUNCTION EVALUATION I tried to retrieve the error message using input_model$modelfit_results$termination_cause, but only got "NULL" as an output.

stellabelin commented 2 years ago

Hi! The errors can be accessed in the results object via res$summary_errors, and this error should be currently parsed! Regarding display of iterations, is this still something of interest?