Like fitted, but return the original "observed" data rather than the modelled data.

observed(object, ...)

# S3 method for default
observed(object, ...)

numericSummary(x)

Arguments

object

a model object for which to return the observed values.

...

other arguments.

x

Placeholder

Value

the result of fitted(object) + residuals(object).

Details

The default method should work for any object with methods for residuals and fitted.

See also

Author

Felix Andrews felix@nfrac.org

Examples


x <- 1:10
mymodel <- list(fitted.values = x + rnorm(10))
mymodel$residuals <- x - fitted(mymodel)
observed(mymodel)
#>  [1]  1  2  3  4  5  6  7  8  9 10