np_calibrate: Nonparametric calibration step for predicting

Description Usage Arguments Details Value

View source: R/simulation.R

Description

Nonparametric calibration step for predicting the mean

Usage

1
np_calibrate(new_xs, xs, ys, glmnet_obj, bandwidth)

Arguments

new_xs

Matrix of new predictors

xs

Matrix of old predictors

ys

Vector of old observed values

glmnet_obj

A glmnet object for which there is a predict method

Details

The formula in the assignment does not include intercepts, but we do include the intercepts here by using the predict function. However, because the intercepts will be the same, after subtraction they cancel out.

Value

Nonparametrically calibrated predicted means.


shiandy/bst235project documentation built on May 14, 2019, 2:01 a.m.