constructor_sparmodel {spareg}R 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'.


[Package spareg version 1.0.0 Index]