predict.pqrBayes {pqrBayes}R Documentation

make predictions from a pqrBayes object

Description

make predictions from a pqrBayes object

Usage

## S3 method for class 'pqrBayes'
predict(
  object,
  g.new,
  u.new,
  e.new = NULL,
  y.new = NULL,
  quant = 0.5,
  kn = 2,
  degree = 2,
  ...
)

Arguments

object

pqrBayes object.

g.new

a matrix of new predictors (e.g. genetic factors) at which predictions are to be made.

u.new

a vector of new environmental factor at which predictions are to be made.

e.new

a vector or matrix of new clinic covariates at which predictions are to be made.

y.new

a vector of the response of new observations. If provided, the prediction error will be computed based on Y.new.

quant

the quantile for the response variable. The default is 0.5.

kn

the number of interior knots for B-spline.

degree

the degree of B-spline basis.

...

other predict arguments

Details

g.new (u.new) must have the same number of columns as g (u) used for fitting the model. By default, the clinic covariates are NULL unless provided. The predictions are made based on the posterior estimates of coefficients in the pqrBayes object.

If y.new is provided, the prediction error will be computed based on the check loss.

Value

an object of class ‘pqrBayes.pred’ is returned, which is a list with components:

error

prediction error. error is NULL if y.new=NULL.

y.pred

predicted values of the new observations.

See Also

pqrBayes


[Package pqrBayes version 1.0.2 Index]