Population predictions from a NLME model
Description
Computes population-level predictions (eta = 0) for all subjects.
Usage
ferx_predict(model, data = NULL, fit = NULL)Arguments
model: Path to a .ferx model filedata: Path to a NONMEM-format CSV. When omitted, the model file’s[data]block (path = ...) is used. TheDVcolumn may be left empty (./NA) on the sampling rows -PREDis what this function produces and the DV is never read, so an empty cell means “predict here”. Rows markedMDV = 1are excluded, as always.fit: Optionalferx_fitresult. When provided, predictions usefit$thetainstead of the model file’s initial estimate for theta.
Seealso
Other simulation: [ferx_calc_npde](ferx_calc_npde.qmd), [ferx_predict_survival](ferx_predict_survival.qmd), [ferx_simulate](ferx_simulate.qmd), [ferx_simulate_adaptive](ferx_simulate_adaptive.qmd), [ferx_simulate_with_uncertainty](ferx_simulate_with_uncertainty.qmd)
Concept
simulation
Value
A data.frame with columns: ID, TIME, PRED
Examples
ex <- ferx_example("warfarin")
fit <- ferx_fit(ex$model, ex$data, method = "gn", covariance = FALSE)
preds <- ferx_predict(ex$model, ex$data, fit = fit)
head(preds)