Changelog
irxforge (development version)
anonymize_dataset():model_fileis no longer passed to FeRx verbatim. The simulation runs on a temporary copy adapted to the anonymized dataset: the[data_selection]and deprecated[initial_values]blocks are removed,[data] pathis rewritten to the absolute path of the simulation dataset, and[data]column maps are kept only when they rename a surviving covariate (maps onto or from structural columns, e.g.AMT = DOSEorDV = lndv, are dropped because the anonymized data already uses the canonical names). Simultaneous renames such asHTCM = WTwithWT = HTare preserved, a relative[priors] from_fitpath is made absolute against the original model’s directory, and#and//comments are handled as FeRx handles them (#23).anonymize_dataset(): covariates are now checked up front for observed values, before any sampling or design matching. Every covariate needs at least one non-missing value overall and at least one on the baseline rows (each subject’s first record by time), which the samplers impute baselines from. All offending covariates are reported at once, and the error says “no observed values at baseline” when a covariate is observed only after baseline, instead of failing deep insidemice_impute()with “VariableHThas no observed values” (#25).anonymize_dataset():EVID == 0records flaggedMDV == 1(e.g. scheduled samples that were never taken) no longer cause “FeRx simulation row count does not match the number of observation records”. Observations are now counted the way FeRx counts them (EVID == 0 & (is.na(MDV) | MDV == 0)); those records keep a missingDVandMDV = 1in the output. If the counts still disagree, the error reports how many rows FeRx returned, how manyEVID == 0records there are, and how many of them are flaggedMDV == 1(#24).sample_covariates_mice_timevarying(): fixed a crash (“Can’t combine..1$.SEX_lagand ..2$.SEX_lag”) when categorical covariates are stored as integer codes and at least one covariate is time-varying. Observed and simulated rows are now coerced to factors with a shared level set before stacking (#18). anonymize_dataset(): the guard against time-reset records now tests what the time-varying samplers actually need — a non-decreasingTIMEwithin every subject — instead of rejecting any dataset containingEVID3 or 4. Reset records whose time scale keeps increasing are now accepted, and when the check fails the error names the offending subjects (#21).anonymize_dataset():covariatesmay now becharacter(0)for datasets without covariate columns. Covariate sampling is skipped; subjects are still renumbered1:n(with each observed design cloned onto a new subject in random order) andDVis still replaced by simulated concentrations (#20).check_nm_dataset(): fixed a crash whenTIMEis non-numeric (e.g. date/clock strings) andADDL/IIare present — the overlapping-dose check now also guards onis.numeric(TIME)so the whole check no longer aborts before returning results.check_nm_dataset(): theunique_recordscheck now skips (returnsNA) instead of emitting a falseFAILwhen the subjectIDdoes not resolve orTIMEis not numeric (a character clock-of-day TIME, or a key collapsed across subjects, produced spurious duplicates).check_nm_dataset(): failingchar_columns,reserved_names, andcovariate_missingchecks now name the offending column(s) in theirdescription.Initial CRAN submission.