gesso.coef: Get model coefficients

Description Usage Arguments Value Examples

View source: R/gesso.R

Description

A function to obtain coefficients from the model fit object corresponding to the desired pair of tuning parameters lambda = (lambda_1, lambda_2).

Usage

1
gesso.coef(fit, lambda)

Arguments

fit

model fit object obtained either by using function gesso.fit or gesso.cv

lambda

a pair of tuning parameters organized in a tibble (ex: lambda = tibble(lambda_1=grid[1], lambda_2=grid[1]))

Value

A list of model coefficients corresponding to lambda values of tuning parameters

beta_0

estimated intercept value

beta_e

estimated environmental coefficient value

beta_g

a vector of estimated main effect coefficients

beta_c

a vector of estimated confounders coefficients

beta_gxe

a vector of estimated interaction coefficients

Examples

1
2
3
4
5
data = data.gen()
model = gesso.cv(data$G_train, data$E_train, data$Y_train, grid_size=20, 
        parallel=TRUE, nfolds=3)
gxe_coefficients = gesso.coef(model$fit, model$lambda_min)$beta_gxe                
g_coefficients = gesso.coef(model$fit, model$lambda_min)$beta_g     

gesso documentation built on Nov. 30, 2021, 9:09 a.m.