constructor_sparmodel: Constructor function for building "sparmodel" objects

View source: R/sparmodel_classes.R

constructor_sparmodelR Documentation

Constructor function for building 'sparmodel' objects

Description

The created function will return a object of class 'sparmodel' which constitutes of a list.

Usage

constructor_sparmodel(name, model_fun, update_fun = NULL)

Arguments

name

character

model_fun

function for estimating the marginal models which returns the function should have arguments and y (vector of responses – standardized for Gaussian family), z (the matrix of projected predictors) and a 'sparmodel' object.

update_fun

optional function for updating the 'sparmodel' object before the start of the algorithm.

Details

Creates an object of class 'sparmodel' using arguments passed by user.

Value

a function which in turn creates an object of class 'sparmodel'.


spareg documentation built on Aug. 8, 2025, 6:46 p.m.