emfit: Estimate SRM parameters.

View source: R/emfit.R

emfitR Documentation

Estimate SRM parameters.

Description

This function provides the maximum likelihood (ML) estiamtes for a given SRM with a given data.bThe ML estimates are computed with the EM algorithm. The initial parameters for the EM algorithm are automatically decided if the flag initialize is TRUE.

Usage

emfit(
  srm,
  data,
  initialize = TRUE,
  maxiter = 2000,
  reltol = 1e-06,
  abstol = 0.001,
  trace = FALSE,
  printsteps = 50,
  ...
)

Arguments

srm

A model.

data

A faultdata.

initialize

Either TRUE or FALSE. If TRUE, the model parameters are initilized with a given data before executing the fitting algorithm.

maxiter

An integer for the maximum number of iterations in the fitting algorithm.

reltol

A numeric value. The algorithm stops if the relative error is less than reltol and the absolute error is less than abstol.

abstol

A numeric value. The algorithm stops if the relative error is less than reltol and the absolute error is less than abstol.

trace

A logical. If TRUE, the intermediate parameters are printed.

printsteps

An integer for print.

...

A list for other parameters which are sent to the em method of srm.

Value

A list with components;

initial

A vector for initial parameters.

srm

A class of NHPP. The SRM with the estiamted parameters.

llf

A numeric value for the maximum log-likelihood function.

df

An integer for degrees of freedom.

convergence

A boolean meaning the alorigthm is converged or not.

iter

An integer for the number of iterations.

aerror

A numeric value for absolute error.

rerror

A numeric value for relative error.

Examples

data(dacs)
data <- faultdata(fault=sys1g)
emfit(srm("exp"), data)

okamumu/Rsrat documentation built on Feb. 10, 2024, 11:07 p.m.