abs.error.pred(fit, lp=NULL, y=NULL) ## S3 method for class 'abs.error.pred': print(x, ...)
lm or
ols that contains a
y vector
(i.e., you should have specified
y=TRUE to the fitting function) unless
the
y argument is given to
abs.error.pred. If you do not specify
the
lp argument,
fit must contain
fitted.values or
linear.predictors. You must specify
fit or both of
lp and
y.
fit is not given
fit (with
y=TRUE in effect)
is not given
abs.error.pred
abs.error.pred (used by
print.abs.error.pred)
containing two matrices:
differences and
ratios.
Frank Harrell
Department of Biostatistics
Vanderbilt University School of Medicine
f.harrell@vanderbilt.edu
Schemper M (2003): Stat in Med 22:2299-2308.
set.seed(1) # so can regenerate results x1 <- rnorm(100) x2 <- rnorm(100) y <- exp(x1+x2+rnorm(100)) f <- lm(log(y) ~ x1 + poly(x2,3), y=TRUE) abs.error.pred(lp=exp(fitted(f)), y=y) rm(x1,x2,y,f)