OptimGLM: A Class for the GLM Optimization Method.

OptimGLMR Documentation

A Class for the GLM Optimization Method.

Description

A class for the optimization methods to use ´glm.fit´.

Value

No return.

Super classes

fmmr6::AbstractMethod -> fmmr6::OptimMethod -> OptimGLM

Public fields

fam_distrs

(list())
The list of the family distributions that can be used in glm.fit().

Methods

Public methods

Inherited methods

Method fit()

Run the optimization for the model.

Usage
OptimGLM$fit(
  data_model,
  theta,
  ll,
  gr,
  hidden,
  pi_vector,
  npar,
  latent,
  family
)
Arguments
data_model

(DataModel())
The DataModel object contains data used in the fmmr6.

theta

(numeric())
The coefficients to estimates.

ll

(function())
The loglikelihood function.

gr

(function())
The gradient function.

hidden

(matrix())
The matrix of the posterior probability.

pi_vector

(numeric())
A vector of the prior probability pi.

npar

(integer())
Number of the parameters.

latent

(integer(1))
The number of latent classes

family

(character(1)|character())
The distribution family which can be either a string like "gaussian" or a vector like c("gaussian", "gaussian").

Returns

Return the optimization result with the estimates, the Loglikelihood value and the information criteria.


Method clone()

The objects of this class are cloneable with this method.

Usage
OptimGLM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Dongjie Wu


wudongjie/fmmr6 documentation built on June 24, 2022, 2:48 p.m.