nadayara_regression | R Documentation |
Functional non-parametric Nadaraya-Watson regression with 2-Wasserstein distance, using as predictor the distributional representation and as response a scalar outcome.
nadayara_regression(data, response)
data |
A biosensor object. |
response |
The name of the scalar response. The response must be a column name in data$variables. |
An object of class bnadaraya:
prediction
The Nadaraya-Watson prediction for each point of the training data at each h=seq(0.8, 15, length=200).
r2
R2 estimation for the training data at each h=seq(0.8, 15, length=200).
error
Standard mean-squared error after applying leave-one-out cross-validation for the training data at each h=seq(0.8, 15, length=200).
data
A data frame with biosensor raw data.
response
The name of the scalar response.
# 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) nada = nadayara_regression(data, "BMI")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.