EstimMethod: An Abstract Class for Estimation Methods

EstimMethodR Documentation

An Abstract Class for Estimation Methods

Description

An abstract class for estimation methods which cannot be initialized.

Value

No return.

Super class

fmmr6::AbstractMethod -> EstimMethod

Public fields

data_model

(DataModel())
The DataModel Object that stores the data using in the fmmr6.

constraint

(matrix())
The constraint matrix.

latent

(integer(1))
The number of latent classes

optim_method

(character(1))
The optimization method to use to fit the model.

Methods

Public methods

Inherited methods

Method new()

Create a new instance of this R6 R6::R6Class class.

Usage
EstimMethod$new(
  latent,
  data_model,
  start = NULL,
  optim_method = "base",
  use_llc = T,
  constraint = matrix(1),
  concomitant = NULL
)
Arguments
latent

(numeric(1))
The number of latent classes.

data_model

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

start

(matrix())
The matrix of start values for the EM algorithm.

optim_method

(character(1))
The optimization method to use to fit the model. The default is base.

use_llc

(boolean(1))
Whether to use the complete log-likelihood or the normal log-likelihood. The default is TRUE.

constraint

(matrix())
The matrix of constraint values for the EM algorithm

concomitant

(formula(1))
The formula for the concomitant model. E.g. ~ z1 + z2 + z3.

Returns

Return a R6 object of class em.


Method partial()

Generate the partial function by filling in some parameters.

Usage
EstimMethod$partial(f, ...)
Arguments
f

(function())
The function to be filled in.

...

(list())
The list of the parameters to filled in to the functions.


Method gen_start()

Generate the start values of parameters.

Usage
EstimMethod$gen_start()

Method gen_constraint()

Generate the constraint of parameters.

Usage
EstimMethod$gen_constraint()

Method clone()

The objects of this class are cloneable with this method.

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