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

View source: R/PMXStanFit.R

rsd.vs.predR Documentation

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

## 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")

## End(Not run)

stanette documentation built on May 11, 2022, 5:11 p.m.