a matrix of error estimates (with squared error loss). The rows correspond
to different lambda values whilst the columns correspond to different iterations
BT_fit
a "BT" object from a fit to the full data.
cv_opt
a two component vector giving the cross-validation optimal lambda index
and iteration
cv_opt_err
the minimal cross-validation error.
Arguments
x
input matrix of dimension nobs by nvars; each row is an observation
vector.
y
response variable; shoud be a numeric vector.
lambda
user supplied lambda sequence of decreasing penalty
parameters. Typical usage is to allow the function to compute its own
lambda sequence. Inappropriate sequences may cause convergence
problems.
nlambda
the number of lambda values. Must be at least 3.
lambda.min.ratio
smallest value in lambda as a fraction of the
largest value at which all main effects coefficients are 0.
nfolds
number of folds. Default is 5.
nperms
the number of permuted datasets to apply k-folds corss-validation to. Default is 1 so
we carry out vanilla cross-validation.
mc.cores
the number of cores to use. Only applicable when not in Windows as it uses
the parallel package to parallelise the computations.