Description Usage Arguments Value Examples
Predict new outcome vector based on the new data and estimated model coefficients.
1 2 | gesso.predict(beta_0, beta_e, beta_g, beta_gxe, new_G, new_E,
beta_c=NULL, new_C=NULL, family = "gaussian")
|
beta_0 |
estimated intercept value |
beta_e |
estimated environmental coefficient value |
beta_g |
a vector of estimated main effect coefficients |
beta_gxe |
a vector of estimated interaction coefficients |
new_G |
matrix of main effects, variables organized by columns |
new_E |
vector of environmental measurments |
beta_c |
a vector of estimated confounders coefficients |
new_C |
matrix of confounders, variables organized by columns |
family |
set |
Returns a vector of predicted values
1 2 3 4 5 6 7 8 9 | data = data.gen()
tune_model = gesso.cv(data$G_train, data$E_train, data$Y_train)
coefficients = gesso.coef(tune_model$fit, tune_model$lambda_min)
beta_0 = coefficients$beta_0; beta_e = coefficients$beta_e
beta_g = coefficients$beta_g; beta_gxe = coefficients$beta_gxe
new_G = data$G_test; new_E = data$E_test
new_Y = gesso.predict(beta_0, beta_e, beta_g, beta_gxe, new_G, new_E)
cor(new_Y, data$Y_test)^2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.