# ============================================================================= # nlmx configuration reference (save as a .covar file; TOML syntax) # # Unknown tables and keys are rejected. Tables that belong to the engine you # did not select are accepted and ignored, so one file can drive both engines. # Relative paths (input.model_dir, [input.files], output.directory) resolve # against the directory of this configuration file. # ============================================================================= config_version = 2 # 2 (version 1 files without [data]/[model]/[[parameters]] are accepted) analysis_name = "run101_covariate_screen" method = "frozen" # frozen | posterior | both (--method overrides) # NOTE: there is no [data], [model] or [[parameters]] table. nlmx reads the # model from the control stream: $INPUT (columns, synonyms, DROP), $DATA # (file, IGNORE/ACCEPT), $SUBROUTINES (ADVAN/TRANS/TOL), $MODEL, $PK, $DES, # $ERROR or $PRED (interpreted abbreviated code), $THETA/$OMEGA/$SIGMA # (bounds, blocks, FIX, SAME) and $ESTIMATION (likelihood approximation). # The data delimiter is detected from the file. Run `nlmx inspect` to see # what was detected; override the approximation with --approximation. [execution] # threads = 8 # default: all cores; results never depend on it [input] model_dir = "./models" # scanned for one run family (common file stem) recursive = false # recursive scan still rejects ambiguity run_stem = "run101" # required when several runs share a directory [input.files] # optional explicit overrides (relative to this file) # control_stream = "models/run101.ctl" # ext = "models/run101.ext" # cov = "models/run101.cov" # cor = "models/run101.cor" # phi = "models/run101.phi" # lst = "models/run101.lst" # table = "models/sdtab101.tab" # ID + ETA columns; used when no .phi exists # data = "data/analysis.csv" # default: $DATA, relative to the control stream # ----------------------------------------------------------------------------- # covariates: what to test (the only section most analyses need) # ----------------------------------------------------------------------------- # One line per parameter: the covariates to test on it. `CL` is any variable # of $PK/$PRED (CL, V2, KA, MTT, ...). Each covariate's type is detected from # the data: continuous, binary (2 levels) or categorical (3-5 integer levels). # The typical equation of that type is tried (power for continuous, # proportional for binary and categorical covariates); with # equations = "all" every equation of the type is tried and the best one per # pair is kept (by AIC after a refit of each). Stepwise selection decides # which covariates are retained. The command-line equivalent needs no file: # nlmx cov --ctl run101.ctl --covariates CL=WT,AGE,SEX --covariates V=WT [covariates] CL = ["WT", "AGE", "SEX", "EGFR", "CRCL"] V = ["WT", "SEX"] # Optional. Equations (factor on the typical value; ref = median, or the most # frequent level of a categorical covariate): # continuous power (X/ref)**THETA # exponential EXP(THETA*(X-ref)) # linear 1 + THETA*(X-ref) # also: standardized_linear, spline (restricted cubic spline) # binary proportional 1 + THETA for the other level # categorical proportional 1 + THETA_k for each non-reference level # grouped 1 + THETA for every non-reference level # ordinal EXP(THETA*(rank(X)-rank(ref))) [covariate_options] equations = "typical" # typical: power; proportional | all: every equation of the type (--all-equations) # continuous = ["power", "exponential"] # --continuous-forms (default: power, or all with equations = "all") # categorical = ["proportional", "grouped"] # --categorical-forms (default: proportional; binary: proportional) forms = { WT = ["power", "linear"] } # per covariate (--covariate-forms WT=power,linear) reference = { WT = 70 } # number, "median" or "mean" (--covariate-reference) type = { SEX = "binary" } # continuous | binary | categorical | ordinal (--covariate-type) missing = "error" # error | median | drop_subject, or { EGFR = "median" } (--missing-covariates) missing_codes = [-99] # data values meaning "missing" ("." is always missing) compare = "auto" # auto: refit each equation when a pair has several | refit | score (--compare-forms) # Detailed form, instead of [covariates] (accepted for full control; the # options above apply to it too): # [[covariates]] # name = "WT" # type = "continuous" # continuous | categorical | binary | ordinal (omit to detect) # reference = 70.0 # number, "median" or "mean" # positive = true # missing = "error" # error | drop_subject | median # missing_codes = [-99] # time_varying = "record" # record | baseline | mean (when WT changes within subjects) # forms = ["power", "linear"] # range = [20.0, 250.0] # min_level_subjects = 10 # categorical: smallest level size # levels = [0, 1] # categorical: declared levels # reference_level = 0 # # [[relationships]] # parameter = "CL" # covariate = "WT" # forms = ["power"] # status = "test" # test | always_include | always_exclude # # Parameters with an ETA get the effect as an ETA shift (for exponential ETAs # this is the usual multiplicative covariate model); parameters without an # ETA get it inserted after their last assignment (frozen engine only). # ----------------------------------------------------------------------------- # frozen engine: efficient score tests at the frozen base solution # ----------------------------------------------------------------------------- [score] information = "efficient" # efficient | candidate_only information_estimator = "opg" # opg (outer product of subject scores) | observed (FD Hessian) nuisance_information = "observed" # observed | from_cov finite_difference_step_relative = 1e-4 finite_difference_step_absolute = 1e-7 calibration = "none" # none | permutation | parametric_bootstrap calibration_replicates = 1000 # permutations (bootstrap: use ~200) calibration_seed = 1729 [selection] mode = "hierarchical_conditional" # univariate | hierarchical_conditional | all_joint | refit_scm (= method "scm") forward_alpha = 0.05 retention_alpha = 0.01 multiple_testing = "bh" # none | bonferroni | holm | bh | by | westfall_young max_candidates = 500 refine = 0 # virtually refit the N most significant candidates (all parameters re-estimated) refit_max_iterations = 60 scm_candidates_per_step = 3 # refit_scm: candidates refitted per forward step, best by score first (0 = all, as PsN does) scm_direction = "both" # refit_scm (method = "scm"): forward | backward | both final_refit = true # joint refit of the retained effects: final model and its OFV (--no-final-refit) [uncertainty] enabled = true # disabled automatically when no .cov is available draws = 200 seed = 20260925 recompute_scores = "linearized" # linearized | exact # ----------------------------------------------------------------------------- # posterior engine: posterior-stability selection # ----------------------------------------------------------------------------- [posterior] source = "prefer_phi" # require_phi | prefer_phi | reconstruct approximation = "laplace" # laplace | conditional_gaussian allow_point_ebe_mode = false # true labels ALL output EXPLORATORY response = "posterior_draws" # posterior_draws | posterior_mean draw_method = "antithetic_normal" # normal | antithetic_normal | sobol_normal center_draws = true antithetic = true # with draw_method = normal: mirror pairs hessian_eigen_tolerance = 1e-10 max_repair_relative = 1e-6 # larger posterior repairs abort failed_subject_policy = "error" # error | exclude | mark_uncertain [variance_consistency] enabled = true method = "penalized_matching" # penalized_matching | moment_correction | none tolerance_relative = 0.25 [resampling] method = "complementary_pairs" # complementary_pairs | subsample | bootstrap | repeated_kfold (always SUBJECT level) replicates = 200 subject_fraction = 0.5 seed = 4262026 stratify_by = [] # e.g. ["STUDY"] minimum_subjects_per_stratum = 10 checkpoint_every = 25 max_failed_fraction = 0.02 [posterior_sampling] draws_per_resample = 2 include_base_parameter_uncertainty = false base_parameter_draws = 20 [features] standardize_continuous = true robust_scale = true screen_zero_variance = true correlation_cluster_threshold = 0.85 max_features = 500 spline_df = 4 time_varying_summary = "first" # first | mean: subject summary of time-varying covariates [learners] required = ["adaptive_elastic_net", "group_elastic_net", "weighted_gls"] # also available: gam (penalised-spline GAM), boosting (gradient-boosted trees), # multivariate (sparse-group lasso across ETAs, OMEGA-whitened) primary = "adaptive_elastic_net" cross_validation_folds = 5 [learners.adaptive_elastic_net] alpha_grid = [0.5, 0.75, 0.9, 1.0] lambda_count = 40 lambda_min_ratio = 1e-3 max_iterations = 5000 tolerance = 1e-8 adaptive_gamma = 1.0 selection_rule = "one_se" # one_se | min [learners.group_elastic_net] l1_ratio = 0.8 lambda_count = 40 selection_rule = "min" # one_se | min [learners.weighted_gls] selection = "bic" # bic | aic max_active = 25 ridge = 1e-8 [learners.gam] basis_size = 8 # B-spline basis per continuous covariate penalty_order = 2 # difference penalty order edf_threshold = 0.5 # a term is selected when its effective df exceeds this lambda_count = 25 [learners.boosting] trees = 150 depth = 2 learning_rate = 0.1 min_importance = 0.02 # held-out conditional permutation importance (share of MSE) min_leaf = 10 [learners.multivariate] l1_ratio = 0.5 lambda_count = 30 selection_rule = "min" [stability] selection_probability_threshold = 0.80 sign_stability_threshold = 0.90 form_stability_threshold = 0.70 algorithm_agreement_threshold = 0.67 uncertain_lower = 0.55 false_discovery_control = "pfer" # pfer (report) | pfer_enforce | calibrated_fdr | none pfer_target = 1.0 average_selected_limit = 15 pfer_bound = "shah_samworth" # shah_samworth | meinshausen_buhlmann target_fdr = 0.10 # calibrated_fdr: permutation-calibrated threshold calibration_permutations = 10 # ----------------------------------------------------------------------------- # shared # ----------------------------------------------------------------------------- [numerics] # [score] ridge_* keys are accepted as aliases ridge_initial = 1e-10 ridge_multiplier = 10.0 ridge_max = 1e-3 # exceeding this is a failure, never a repair svd_relative_tolerance = 1e-10 max_condition_number = 1e12 # covariance conditioning gate mode_tolerance = 1e-6 # conditional-mode gradient tolerance (both engines) mode_max_iterations = 100 ofv_tolerance = 2.0 # validate: largest |OFV difference| to .ext that counts as reproduced stationarity_alpha = 0.001 # validate: the base solution is stationary unless p < this [output] directory = "./nlmx_out" overwrite = false write_json = true write_csv = true write_markdown = true write_posterior_summary = true redact_subject_ids = true write_html = true # report.html with inline plots write_draft_model = true # draft_model.ctl with retained effects inserted # carry_columns = ["STUDY", "DOSE"] # fit: dataset columns also written to # predictions.csv (DVID is always carried when present) # posterior engine: correlated covariates that substitute for one another are # reported as a cluster rather than naming a unique winner. [[competition_groups]] name = "renal_markers" members = ["CL~EGFR:*", "CL~CRCL:*"] policy = "report_switching_cluster"