Learn R Programming

saemix (version 3.5)

Stochastic Approximation Expectation Maximization (SAEM) Algorithm

Description

The 'saemix' package implements the Stochastic Approximation EM algorithm for parameter estimation in (non)linear mixed effects models. It (i) computes the maximum likelihood estimator of the population parameters, without any approximation of the model (linearisation, quadrature approximation,...), using the Stochastic Approximation Expectation Maximization (SAEM) algorithm, (ii) provides standard errors for the maximum likelihood estimator (iii) estimates the conditional modes, the conditional means and the conditional standard deviations of the individual parameters, using the Hastings-Metropolis algorithm (see Comets et al. (2017) ). Many applications of SAEM in agronomy, animal breeding and PKPD analysis have been published by members of the Monolix group. The full PDF documentation for the package including references about the algorithm and examples can be downloaded on the github of the IAME research institute for 'saemix': .

Copy Link

Version

Install

install.packages('saemix')

Monthly Downloads

848

Version

3.5

License

GPL (>= 2)

Maintainer

Emmanuelle Comets

Last Published

February 25th, 2026

Functions in saemix (3.5)

fim.saemix

Computes the Fisher Information Matrix by linearisation
fitted.saemix

Extract Model Predictions
discreteVPC

VPC for non Gaussian data models
default.saemix.plots

Wrapper functions to produce certain sets of default plots
cow.saemix

Evolution of the weight of 560 cows, in SAEM format
discreteVPCTTE

VPC for time-to-event models
epilepsy.saemix

Epilepsy count data
conddist.saemix

Estimate conditional mean and variance of individual parameters using the MCMC algorithm
createSaemixObject

Create saemix objects with only data filled in
[

Get/set methods for SaemixData object
lung.saemix

NCCTG Lung Cancer Data, in SAEM format
llis.saemix

Log-likelihood using Importance Sampling
logLik

Extract likelihood from an SaemixObject resulting from a call to saemix
knee.saemix

Knee pain data
map.saemix

Estimates of the individual parameters (conditional mode)
llgq.saemix

Log-likelihood using Gaussian Quadrature
mydiag

Matrix diagonal
npdeSaemix

Create an npdeObject from an saemixObject
initialize-methods

Methods for Function initialize
forward.procedure

Backward procedure for joint selection of covariates and random effects
plot,SaemixObject,ANY-method

General plot function from SAEM
predict.SaemixModel

Predictions for a new dataset
plot,SaemixModel,SaemixData-method

Plot model predictions for a new dataset. If the dataset is large, only the first 20 subjects (id's) will be shown.
plot-methods

Methods for Function plot
print-methods

Methods for Function print
predict-methods

Methods for Function predict
plot.SaemixData

Plot of longitudinal data
plotDiscreteData

Plot non Gaussian data
plot,SaemixModel,ANY-method

Plot model predictions using an SaemixModel object
oxboys.saemix

Heights of Boys in Oxford
replaceData

Replace the data element in an SaemixObject object
readSaemix,SaemixData-method

Create a longitudinal data structure from a file or a dataframe Helper function not intended to be called by the user
saemix.bootstrap

Bootstrap for saemix fits
saemix

Stochastic Approximation Expectation Maximization (SAEM) algorithm
resid.saemix

Extract Model Residuals
psi-methods

Functions to extract the individual estimates of the parameters and random effects
rapi.saemix

Rutgers Alcohol Problem Index
saemix.internal

Internal saemix objects
readSaemix-methods

Methods for Function read
saemix.plot.data

Functions implementing each type of plot in SAEM
saemixPredictNewdata

Predictions for a new dataset
saemixData

Function to create an SaemixData object
showall-methods

Methods for Function showall
saemix.plot.select

Plots of the results obtained by SAEM
saemix.predict

Compute model predictions after an saemix fit
show-methods

Methods for Function show
saemixControl

List of options for running the algorithm SAEM
simulate.SaemixObject

Perform simulations under the model for an saemixObject object
saemix.plot.setoptions

Function setting the default options for the plots in SAEM
saemixModel

Function to create an SaemixModel object
theo.saemix

Pharmacokinetics of theophylline
subset

Data subsetting
summary-methods

Methods for Function summary
testnpde

Tests for normalised prediction distribution errors
simulateDiscreteSaemix

Perform simulations under the model for an saemixObject object defined by its log-likelihood
[,SaemixRes-method

Get/set methods for SaemixRes object
[,SaemixObject-method

Get/set methods for SaemixObject object
step.saemix

Stepwise procedure for joint selection of covariates and random effects
yield.saemix

Wheat yield in crops treated with fertiliser, in SAEM format
[,SaemixModel-method

Get/set methods for SaemixModel object
validate.covariance.model

Validate the structure of the covariance model
stepwise.procedure

Stepwise procedure for joint selection of covariates and random effects
transformContCov

Transform continuous covariates
transformCatCov

Transform categorical covariates
toenail.saemix

Toenail data
transform

Transform covariates
vcov

Extracts the Variance-Covariance Matrix for a Fitted Model Object
xbinning

Internal functions used to produce prediction intervals (from the npde package)
validate.names

Name validation (## )Helper function not intended to be called by the user)
dataGen.case

Bootstrap datasets
coef.saemix

Extract coefficients from an saemix fit
compare.saemix

Model comparison with information criteria (AIC, BIC).
checkInitialFixedEffects

Check initial fixed effects for an SaemixModel object applied to an SaemixData object
SaemixModel-class

Class "SaemixModel"
SaemixRes-class

Class "SaemixRes"
SaemixObject-class

Class "SaemixObject"
PD1.saemix

Data simulated according to an Emax response model, in SAEM format
SaemixData-class

Class "SaemixData"
backward.procedure

Backward procedure for joint selection of covariates and random effects