newresponse {topmodels} | R Documentation |
Generic function and methods for computing (randomized) quantile residuals.
newresponse(object, ...) ## Default S3 method: newresponse(object, newdata, na.action = na.pass, ...)
object |
a fitted model object. For the |
newdata |
optionally, a data frame in which to look for variables with which to predict. If omitted, the original observations are used. |
na.action |
function determining what should be done with missing
values in |
... |
further parameters passed to methods. |
This is a convenience function to accompany procast
, e.g.,
for computing predicted probabilities at the observed responses
(also known as the probability integral transform, PIT).
A vector of new responses.
## linear regression models (homoscedastic Gaussian response) m <- lm(dist ~ speed, data = cars) newresponse(m) newresponse(m, newdata = cars[1:3, ])