OptimBase: A Class for the GLM Optimization Method.

OptimBaseR Documentation

A Class for the GLM Optimization Method.

Description

A class for the optimization methods to use ´optim()´ in the R base.

Value

No return.

Super classes

fmmr6::AbstractMethod -> fmmr6::OptimMethod -> OptimBase

Methods

Public methods

Inherited methods

Method fit()

Run the optimization for the model.

Usage
OptimBase$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
OptimBase$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.