Learn R Programming

stanette (version 2.21.4)

rsd.vs.pred: Pointwise comparison between residuals vs. predicted medians.

Description

Plots lots residuals, calculated as the difference between medians of predictions and observations, vs. predictions. This function is a generic version of the method plot.gof.pred.rsd() for the PMXStanFit class.

Usage

rsd.vs.pred(fit, ...)

Arguments

fit

a PMXStanFit object.

...

additional arguments.

Value

No return value, called for side effects

See Also

PMXStanFit for the methods plot.gof.pred.rsd().

Examples

Run this code
# NOT RUN {
m1 <- PMXStanModel(path = tempfile("pk_m1"), pk.struct = "1-cmpt", compile=TRUE)

data("examples_data")
dat <- prepareInputData(data.source = d1_nm_poppk, model = m1)

fit <- PMXStanFit(m1, dat, iter=100, chains=1)

obs.vs.pred(fit, by.cov = "GENDER", type = "categorical", filename = "obs_pred_by_gender.pdf")
rsd.vs.pred(fit, by.cov = "GENDER", type = "categorical", filename = "gof_by_gender.pdf")
# }

Run the code above in your browser using DataLab