
Last chance! 50% off unlimited learning
Sale ends in
abs.error.pred(fit, lp=NULL, y=NULL)## S3 method for class 'abs.error.pred':
print(x, \dots)
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
.fit
is not givenfit
(with y=TRUE
in effect)
is not givenabs.error.pred
abs.error.pred
(used by print.abs.error.pred
)
containing two matrices: differences
and ratios
.lm
, ols
, cor
, validate.ols
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)
Run the code above in your browser using DataLab