summaryrefslogtreecommitdiff
path: root/R/kinresplot.R
blob: be0a85de73d83b0c3ff9fac667d223b7c30b4be4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
kinresplot <- function(kinobject, kinmodel,
	xlab = "Time [days]", ylab = "Residual [% of applied radioactivity]",
	maxabs = "auto")
{
	m <- kinobject$fits[[kinmodel]]
	t <- m$model$t
	residuals <- residuals(m)
	if (maxabs == "auto") maxabs = max(abs(residuals))
	plot(t, residuals,
		xlab = xlab,
		ylab = ylab,
		ylim = c( -1.2 * maxabs, 1.2 * maxabs))
	title(paste("Residuals of", kinmodel, "fit"), font.main = 1)
}

Contact - Imprint