Learn R Programming

bqtl (version 1.0-29)

predict.linear.bayes: Residuals or Predicted Values for linear.bayes objects

Description

The linear.bayes object returns fitted coefficients. These are used to construct predicted values. Since the fitting process for linear.bayes objects is based on moments of centered variables, the 'intercept' is lost; see `Details' below.

Usage

## S3 method for class 'linear.bayes':
residuals(object, \dots)
## S3 method for class 'linear.bayes':
predict(object, newdata = lb.call$ana.obj, return.resids =
                 FALSE, ...)
## S3 method for class 'linear.bayes':
fitted(\dots)

Arguments

object
An object returned by linear.bayes
...
possibly the following
newdata
Optional data.frame in which to do the calculations
return.resids
Not usually set by the user.

Value

  • A vector of predicted values or residuals

Details

Since the linear.bayes object is based on a moment matrix, some information is lost thsat must be reconstructed or assumed. The intercept and possibly the coefficients for control variates are aong these. Also, when the call to linear.bayes supplied the moment matrix rather than formulae with which to create one, then it is unclear what variable was used as the regressand and hence which variable to use in ofrming residuals. So, in that case, residuals will report an error

See Also

linear.bayes