Similar to other predict methods, this function predicts fitted values and computes coefficients
from a fitted "BT" object.
Usage
# S3 method for BT
predict(
object,
newx,
s = NULL,
iter = NULL,
type = c("response", "coefficients"),
...
)
# S3 method for BT
coef(object, s = NULL, iter = NULL, ...)
Value
Either a vector of predictions or, if either s or iter are NULL,
a three-dimensional array with last two dimensions indexing different lambda values and
iterations.
Arguments
object
fitted "BT" object.
newx
matrix of new values of design matrix at which predictions are to be made. Ignored
when type=="coefficients".
s
value of the penalty parameter at which predictions are required. If the value
is not one of the lambda values present in object the output will be
etermined by linear interpolation. Default is the entire sequence of lambda
values present in object.
iter
iteration at which predictions are required. Default is the entire sequence
of iterations in object.
type
of prediction required. Type "response" gives estimates of the response
whilst type "coefficients" gives coefficient estimates.