# MFit Script

Fits a PK/PD model to multiple data sets. A multi population version of Fit Script.

A MFit Script can be created by a MTut Script in a similar fashion to how a Fit Script can be created by a Tut Script.

## Main Sections of a MFit Script

- METHOD_OPTIONS
- PARALLEL
- DESCRIPTION
- FILE_PATHS
- DATA_FIELDS
- PREPROCESS
- EFFECTS
- MODEL_PARAMS
- STATES
- DERIVATIVES
- PREDICTIONS
- ODE_SOLVER
- FIT_METHODS
- COVARIANCE

## Full Structure of a MFit Script

- METHOD_OPTIONS
  - py_module
  - rand_seed
  - float_format
- PARALLEL
  - SINGLE
  - MPI_WORKERS
    - n_workers
- DESCRIPTION
  - name
  - title
  - author
  - abstract
  - keywords
- FILE_PATHS
  - input_data_files_glob
  - output_folder
  - temp_folder
  - log_folder
  - output_file_ext
  - output_iteration_results
  - numerical_file_sort_flag
- DATA_FIELDS
  - type_field
  - id_field
  - time_field
- PREPROCESS
- EFFECTS
- MODEL_PARAMS
- STATES
- DERIVATIVES
- PREDICTIONS
- ODE_SOLVER
  - NO_SOLVER
  - ANALYTIC
  - SCIPY_ODEINT
    - atol
    - rtol
    - max_nsteps
    - use_sens
- FIT_METHODS
  - JOE
    - max_n_main_iterations
    - CONVERGER
      - NONE
      - OBJ_INC
      - OBJ_SIM
      - OBJ_LIN
    - recompute_jacobians_flag
    - use_chain
    - reset_re_flag
- COVARIANCE
  - NO_COVARIANCE
  - SANDWICH
    - var_covariance_flag
    - inv_hessian_flag