Learn R Programming

saemix (version 3.4)

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

586

Version

3.4

License

GPL (>= 2)

Maintainer

Emmanuelle Comets

Last Published

July 31st, 2025

Functions in saemix (3.4)

fitted.saemix

Extract Model Predictions
default.saemix.plots

Wrapper functions to produce certain sets of default plots
discreteVPCTTE

VPC for time-to-event models
createSaemixObject

Create saemix objects with only data filled in
fim.saemix

Computes the Fisher Information Matrix by linearisation
cow.saemix

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

VPC for non Gaussian data models
npdeSaemix

Create an npdeObject from an saemixObject
knee.saemix

Knee pain data
map.saemix

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

Epilepsy count data
logLik

Extract likelihood from an SaemixObject resulting from a call to saemix
[

Get/set methods for SaemixData object
conddist.saemix

Estimate conditional mean and variance of individual parameters using the MCMC algorithm
forward.procedure

Backward procedure for joint selection of covariates and random effects
mydiag

Matrix diagonal
llgq.saemix

Log-likelihood using Gaussian Quadrature
initialize-methods

Methods for Function initialize
llis.saemix

Log-likelihood using Importance Sampling
lung.saemix

NCCTG Lung Cancer Data, in SAEM format
oxboys.saemix

Heights of Boys in Oxford
plotDiscreteData

Plot non Gaussian data
plot,SaemixObject,ANY-method

General plot function from SAEM
predict.SaemixModel

Predictions for a new dataset
print-methods

Methods for Function print
plot.SaemixData

Plot of longitudinal data
plot-methods

Methods for Function plot
predict-methods

Methods for Function predict
replaceData

Replace the data element in an SaemixObject object
resid.saemix

Extract Model Residuals
readSaemix,SaemixData-method

Create a longitudinal data structure from a file or a dataframe Helper function not intended to be called by the user
readSaemix-methods

Methods for Function read
saemix.internal

Internal saemix objects
saemix.plot.data

Functions implementing each type of plot in SAEM
saemix

Stochastic Approximation Expectation Maximization (SAEM) algorithm
saemix.bootstrap

Bootstrap for saemix fits
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,SaemixModel,ANY-method

Plot model predictions using an SaemixModel object
psi-methods

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

Rutgers Alcohol Problem Index
saemixPredictNewdata

Predictions for a new dataset
saemixData

Function to create an SaemixData object
saemix.predict

Compute model predictions after an saemix fit
saemix.plot.select

Plots of the results obtained by SAEM
simulate.SaemixObject

Perform simulations under the model for an saemixObject object
show-methods

Methods for Function show
simulateDiscreteSaemix

Perform simulations under the model for an saemixObject object defined by its log-likelihood
showall-methods

Methods for Function showall
saemixModel

Function to create an SaemixModel object
[,SaemixObject-method

Get/set methods for SaemixObject object
step.saemix

Stepwise procedure for joint selection of covariates and random effects
[,SaemixModel-method

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

Get/set methods for SaemixRes object
saemixControl

List of options for running the algorithm SAEM
saemix.plot.setoptions

Function setting the default options for the plots in SAEM
stepwise.procedure

Stepwise procedure for joint selection of covariates and random effects
testnpde

Tests for normalised prediction distribution errors
yield.saemix

Wheat yield in crops treated with fertiliser, in SAEM format
summary-methods

Methods for Function summary
subset

Data subsetting
vcov

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

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

Validate the structure of the covariance model
validate.names

Name validation (## )Helper function not intended to be called by the user)
transformCatCov

Transform categorical covariates
theo.saemix

Pharmacokinetics of theophylline
transformContCov

Transform continuous covariates
transform

Transform covariates
toenail.saemix

Toenail data
dataGen.case

Bootstrap datasets
compare.saemix

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

Check initial fixed effects for an SaemixModel object applied to an SaemixData object
coef.saemix

Extract coefficients from an saemix fit
SaemixModel-class

Class "SaemixModel"
SaemixRes-class

Class "SaemixRes"
PD1.saemix

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

Class "SaemixObject"
SaemixData-class

Class "SaemixData"
backward.procedure

Backward procedure for joint selection of covariates and random effects