fridge: Fridge

Description Usage Arguments Details Value Examples

View source: R/fridge_function.R View source: R/fridge_functions.R

Description

Function for calculating the fridge-ridge tuning parameter and prediction, with plot of MSE curve

Usage

1
fridge(X, y, x0, plug.in = c("OLS", "RLOOCV"), plot.curve = TRUE)

Arguments

X

Matrix with covariates of dimension n x p

y

Vector of outcomes of length n

x0

Vector of focus covariate of length p

plug.in

Character specifying the plug.in estimate, possibly 'OLS' (ordinary least squares) and 'RLO0CV' (ridge with leave-one-out cross-validation). The OLS option can only be used for p smaller than n.

plot.curve

Logical. Should the MSE curve and minimum value be ploted?

Details

The minimization routine is carried out with several different start values ranging from 1 to 10^7. If plot.curve = TRUE, the global minimum is ploted.

Value

Result, a list with the following

fridge.tuning

Numerical, the fridge tuning parameter

loocv.tuning

Numerical, the leave-one-out cross-validation tuning parameter

fridge.pred

Numerical, the fridge prediction

loocv.pred

Numerical, the leave-one-out cross-validation prediction

Examples

1

khellton/fridge documentation built on May 20, 2019, 2:26 p.m.