Learn R Programming

em (version 1.0.0)

Generic EM Algorithm

Description

A generic function for running the Expectation-Maximization (EM) algorithm within a maximum likelihood framework, based on Dempster, Laird, and Rubin (1977) is implemented. It can be applied after a model fitting using R's existing functions and packages.

Copy Link

Version

Install

install.packages('em')

Monthly Downloads

45

Version

1.0.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Dongjie Wu

Last Published

January 11th, 2023

Functions in em (1.0.0)

fit.den.multinom

Fit the density function for a multinomial regression model.
fit.den.glmerMod

Fit the density function for a generalized linear mixed effect model.
fit.den.lm

Fit the density function for a linear regression model.
fit.den.gnm

Fit the density function for a generalized non-linear regression model.
fit.den.fitdist

Fitting the density function using in `fitdistrplus::fitdist()`
multi.em

Multiple run of EM algorithm
mstep.concomitant.refit

The refit of for the concomitant model. This section was inspired by Flexmix.
print.summary.em

Print the `summary.em` object
init.em.kmeans

K-mean initialization
init.em.hc

model-based agglomerative hierarchical clustering
simbinom

Simulated Data from a logistic regression
fit.den.glm

Fit the density function for a generalized linear regression model.
predict.em

Predict the fitted finite mixture models
mstep

M-Step of EM algorithm
mstep.concomitant

The mstep for the concomitant model.
init.em.random

Random initialization
fit.den.nnet

Fit the density function for a `nnet` model.
init.em.random.weights

Random initialization with weights
fit.den.plm

Fit the density function for a panel regression model.
sstep

S-step of EM algorithm
print.em

Print the `em` object
init.em.sample5

Initialization using sampling 5 times.
simreg

Simulated Regression Data
plot.em

Plot the fitted results of EM algorithm
simclogit

Simulated Data from a conditional logistic regression
summary.em

Summaries of fitted finite mixture models using EM algorithm
multi.em.default

Default generic for multi.em
logLik.em

This function computes logLik of EM Algorithm.
vdummy

Transform a factor variable to a matrix of dummy variables
fit.den

Fit the density function for a fitted model.
em.glmerMod

The em function for glmerMod
estep

This function performs an E-Step of EM Algorithm.
fit.den.coxph

Fit the density for the survival::clogit
cstep

C-Step of EM algorithm
em.fitdist

The default em function
em.panelmodel

The em function for `panelmodel` such as `plm`.
em.clogit

The em function for `survival::clogit`.
em.default

The default em function
em

A Generic EM Algorithm
init.em

Initialization of EM algorithm
flatten

Flatten a data.frame or matrix by column or row with its name. The name will be transformed into the number of row/column plus the name of column/row separated by `.`.