regmod_prediction {biosensors.usc}R Documentation

regmod_prediction

Description

Performs the Wasserstein regression using quantile functions.

Usage

regmod_prediction(data, xpred)

Arguments

data

A bregmod object.

xpred

A kxp matrix of input values for regressors for prediction, where k is the number of points we do the prediction and p is the dimension of the input variables.

Value

A kxm array. Qpred(l, :) is the regression prediction of Q given X = xpred(l, :)' where m is the dimension of the grid of quantile function.

Examples

# Data extracted from the paper: Hall, H., Perelman, D., Breschi, A., Limcaoco, P., Kellogg, R.,
# McLaughlin, T., Snyder, M., Glucotypes reveal new patterns of glucose dysregulation, PLoS
# biology 16(7), 2018.
file1 = system.file("extdata", "data_1.csv", package = "biosensors.usc")
file2 = system.file("extdata", "variables_1.csv", package = "biosensors.usc")
data = load_data(file1, file2)
regm = regmod_regression(data, "BMI")
# Example of prediction
xpred = as.matrix(25)
g1rmp = regmod_prediction(regm, xpred)

[Package biosensors.usc version 1.0 Index]