Learn R Programming

⚠️There's a newer version (3.1-168) of this package.Take me there.

nlme (version 3.1-34)

Linear and nonlinear mixed effects models

Description

Fit and compare Gaussian linear and nonlinear mixed-effects models.

Copy Link

Version

Install

install.packages('nlme')

Monthly Downloads

84,769

Version

3.1-34

License

GPL version 2 or later

Maintainer

Douglas Bates

Last Published

March 31st, 2025

Functions in nlme (3.1-34)

AIC

Akaike Information Criterion
corAR1

AR(1) Correlation Structure
ACF

Autocorrelation Function
coef.pdMat

pdMat Object Coefficients
Dim.corSpatial

Dimensions of a corSpatial Object
ACF.gls

Autocorrelation Function for gls Residuals
allCoef

Extract Coefficients from a Set of Objects
collapse

Collapse According to Groups
corClasses

Correlation Structure Classes
comparePred

Compare Predictions
Initialize.lmeStruct

Initialize an lmeStruct Object
contr.SAS

Contrast Matrices
coef.lmList

Extract lmList Coefficients
logLik.gls

Log-Likelihood of a gls Object
formula.gnls

Extract gnls Object Formula
corMatrix

Extract Correlation Matrix
print.reStruct

Print an reStruct Object
random.effects

Extract Random Effects
varPower

Power Variance Function
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
ranef.lmList

Extract lmList Random Effects
Matrix

Assign Matrix Values
Initialize.varFunc

Initialize varFunc Object
BIC

Bayesian Information Criterion
Variogram.corLin

Calculate Semi-variogram for a corLin Object
Variogram.corExp

Calculate Semi-variogram for a corExp Object
coef.gnls

Extract gnls Coefficients
Dim.corStruct

Dimensions of a corStruct Object
asOneFormula

Combine Formulas of a Set of Objects
Dim.pdMat

Dimensions of a pdMat Object
fitted.gls

Extract gls Fitted Values
varComb

Combination of Variance Functions
MEdims

Calculate dimensions in mixed-effects
plot.nmGroupedData

Plot an nmGroupedData Object
as.matrix.corStruct

Matrix of a corStruct Object
formula.varFunc

Extract varFunc Formula
Names.formula

Extract Names from a formula
compareFits

Compare Fitted Objects
recalc.varFunc

Recalculate for varFunc Object
print.summary.modelStruct

Print a summary.modelStruct Object
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
print.summary.pdMat

Print a summary.pdMat Object
print.summary.lmList

Print a summary.lmList Object
as.matrix.pdMat

Matrix of a pdMat Object
residuals.lmList

Extract lmList Residuals
varFixed

Fixed Variance Function
splitFormula

Split a Formula
varWeights.glsStruct

Variance Weights for glsStruct Object
pdIdent

Multiple of the Identity Positive-Definite Matrix
formula.corStruct

Extract corStruct Object Formula
formula.reStruct

Extract reStruct Object Formula
summary.varFunc

Summarize varFunc Object
MEestimate

Estimate mixed-effects parameters
print.corStruct

Print a corStruct Object
print.pdMat

Print a pdMat Object
corFactor.corStruct

Factor of a corStruct Object Matrix
varWeights

Extract Variance Function Weights
formula.modelStruct

Extract modelStruct Object Formula
Covariate.varFunc

Assign varFunc Covariate
getGroups.lmList

Extract lmList Object Groups
isInitialized

Check if Object is Initialized
pruneLevels

Prune Factor Levels
intervals

Confidence Intervals on Coefficients
logLik.gnls

Log-Likelihood of a gnls Object
corFactor

Factor of a Correlation Matrix
summary.pdMat

Summarize a pdMat Object
collapse.groupedData

Collapse a groupedData Object
predict.gnls

Predictions from a gnls Object
varWeights.lmeStruct

Variance Weights for lmeStruct Object
BIC.logLik

BIC of a logLik Object
corLin

Linear Correlation Structure
MEEM

EM iterations for mixed-effects
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
coef.modelStruct

Extract modelStruct Object Coefficients
pdSymm

General Positive-Definite Matrix
residuals.lme

Extract lme Residuals
gnlsControl

Control Values for gnls Fit
corCAR1

Continuous AR(1) Correlation Structure
qqnorm.lme

Normal Plot of Residuals or Random Effects from an lme Object
summary.nlsList

Summarize an nlsList Object
fitted.lmList

Extract lmList Fitted Values
Variogram

Calculate Semi-variogram
corCompSymm

Compound Symmetry Correlation Structure
corARMA

ARMA(p,q) Correlation Structure
Names.reStruct

Names of an reStruct Object
predict.lme

Predictions from an lme Object
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
getData.gls

Extract gls Object Data
as.matrix.reStruct

Matrices of an reStruct Object
Variogram.default

Calculate Semi-variogram
getGroups.corStruct

Extract corStruct Groups
formula.nlsList

Extract nlsList Object Formula
residuals.gls

Extract gls Residuals
coef.reStruct

reStruct Object Coefficients
fitted.glsStruct

Calculate glsStruct Fitted Values
summary.modelStruct

Summarize a modelStruct Object
logDet

Extract the Logarithm of the Determinant
plot.augPred

Plot an augPred Object
summary.lmList

Summarize an lmList Object
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
qqnorm.gls

Normal Plot of Residuals from a gls Object
gapply

Apply a Function by Groups
corNatural

General correlation in natural parameterization
coef.varFunc

varFunc Object Coefficients
print.summary.corStruct

Print a summary.corStruct Object
logDet.pdMat

Extract Log-Determinant from a pdMat Object
update.modelStruct

Update a modelStruct Object
lmeControl

Control Values for lme Fit
[.pdMat

Subscript a pdMat Object
Names.pdBlocked

Names of a pdBlocked Object
lmeStruct

Linear Mixed-Effects Structure
pdMat

Positive-Definite Matrix
Names

Names Associated with an Object
pairs.lmList

Pairs Plot of an lmList Object
pdFactor

Square-Root Factor of a Positive-Definite Matrix
plot.intervals.lmList

Plot lmList Confidence Intervals
print.lmList

Print an lmList Object
quinModel

Model function for the Quinidine data
print.summary.varFunc

Print a summary.varFunc Object
summary.lme

Summarize an lme Object
VarCorr

Extract variance and correlation components
print.varFunc

Print a varFunc Object
summary.corStruct

Summarize a corStruct Object
print.summary.lme

Print a summary.lme Object
getResponseFormula

Extract Formula Specifying Response Variable
predict.lmList

Predictions from an lmList Object
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
coef.pdIdent

pdIdent Object Coefficients
Names.pdMat

Names of a pdMat Object
residuals.nlmeStruct

Calculate nlmeStruct Residuals
varFunc

Variance Function Structure
print.gls

Print a gls Object
pdBlocked

Positive-Definite Block Diagonal Matrix
nlmeStruct

Nonlinear Mixed-Effects Structure
coef.corStruct

Coefficients of a corStruct Object
anova.lme

Compare Likelihoods of Fitted Objects
getData.lmList

Extract lmList Object Data
getResponse.lme

Extract lme Object Response
coef.lme

Extract lme Coefficients
varExp

Exponential Variance Function
logDet.corStruct

Extract corStruct Log-Determinant
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
Initialize.reStruct

Initialize reStruct Object
augPred

Augmented Predictions
gnlsStruct

Generalized Nonlinear Least Squares Structure
coef.pdCompSymm

pdCompSymm Object Coefficients
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
Covariate

Assign Covariate Values
predict.nlme

Predictions from an nlme Object
ranef.lme

Extract lme Random Effects
Initialize

Initialize Object
getResponse.data.frame

Extract Response from a Data Frame
corSpatial

Spatial Correlation Structure
Coef

Assign Values to Coefficients
anova.gls

Compare Likelihoods of Fitted Objects
logLik.lme

Log-Likelihood of an lme Object
plot.Variogram

Plot a Variogram Object
varIdent

Constant Variance Function
getResponse

Extract Response Variable from an Object
coef.gls

Extract gls Coefficients
formula.pdMat

Extract pdMat Formula
AIC.lme

Akaike Information Criterion
corSpher

Spherical Correlation Structure
pooledSD

Extract Pooled Standard Deviation
recalc.corStruct

Recalculate for corStruct Object
corMatrix.corStruct

Matrix of a corStruct Object
intervals.lme

Confidence Intervals on lme Parameters
nlme-internal

Internal nlme functions
pdLogChol

General Positive-Definite Matrix
Dim

Extract Dimensions from an Object
Matrix.reStruct

Assign reStruct Matrices
pairs.lme

Pairs Plot of an lme Object
plot.ranef.lmList

Plot a ranef.lmList Object
Initialize.corStruct

Initialize corStruct Object
pdConstruct.pdBlocked

Construct pdBlocked Objects
residuals.gnlsStruct

Calculate gnlsStruct Residuals
intervals.gls

Confidence Intervals on gls Parameters
pdNatural

General Positive-Definite Matrix in Natural Parametrization
pdConstruct

Construct pdMat Objects
ACF.lme

Autocorrelation Function for lme Residuals
balancedGrouped

Create a groupedData object from a matrix
phenoModel

Model function for the Phenobarb data
nlme

Nonlinear Mixed-Effects Models
getResponse.gls

Extract gls Object Response
plot.compareFits

Plot a compareFits Object
logLik.lmList

Log-Likelihood of an lmList Object
isInitialized.reStruct

Check if an reStruct Object is Initialized
varConstPower

Constant Plus Power Variance Function
nlmeObject

Fitted nlme Object
pdMatrix.reStruct

Extract Matrix or Square-Root Factor from Components of an reStruct Object
formula.pdBlocked

Extract pdBlocked Formula
getData

Extract Data from an Object
nlsList.selfStart

nlsList Fit from a selfStart Function
formula.lme

Extract lme Object Formula
formula.gls

Extract gls Object Formula
fixef.lmList

Extract lmList Fixed Effects
getGroups.gls

Extract gls Object Groups
Matrix.pdMat

Assign Matrix to a pdMat Object
isBalanced

Check a Design for Balance
fixed.effects

Extract Fixed Effects
logLik.varFunc

Extract varFunc logLik
getGroups.data.frame

Extract Groups from a Data Frame
logLik.reStruct

Calculate reStruct Log-Likelihood
recalc.modelStruct

Recalculate for a modelStruct Object
gsummary

Summarize by Groups
MEdecomp

Decompose a mixed-effects model
formula.lmList

Extract lmList Object Formula
corGaus

Gaussian Correlation Structure
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
getCovariate.corStruct

Extract corStruct Object Covariate
lme.groupedData

LME fit from groupedData Object
Initialize.glsStruct

Initialize a glsStruct Object
gnls

Fit Nonlinear Model Using Generalized Least Squares
LDEsysMat

Generate system matrix for LDEs
solve.reStruct

Apply Solve to an reStruct Object
getGroups.varFunc

Extract varFunc Groups
plot.lme

Plot an lme or nls object
formula.groupedData

Extract groupedData Formula
pdMatrix

Extract Matrix or Square-Root Factor from a pdMat Object
glsStruct

Generalized Least Squares Structure
getCovariateFormula

Extract Covariates Formula
varClasses

Variance Function Classes
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
gls

Fit Linear Model Using Generalized Least Squares
print.groupedData

Print a groupedData Object
model.matrix.reStruct

reStruct Model Matrix
logDet.reStruct

Extract reStruct Log-Determinants
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
plot.gls

Plot a gls Object
residuals.lmeStruct

Calculate lmeStruct Residuals
fdHess

Finite difference Hessian
getGroupsFormula

Extract Grouping Formula
corExp

Exponential Correlation Structure
getData.lme

Extract lme Object Data
corSymm

General Correlation Structure
nlsList

List of nls Objects with a Common Model
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
asTable

Convert groupedData to a matrix
getGroups

Extract Grouping Factors from an Object
nlmeControl

Control Values for nlme Fit
nlme.nlsList

NLME fit from nlsList Object
summary.gls

Summarize a gls Object
residuals.glsStruct

Calculate glsStruct Residuals
logLik.corStruct

Extract corStruct Log-Likelihood
glsObject

Fitted gls Object
recalc.reStruct

Recalculate for an reStruct Object
logLik.glsStruct

Log-Likelihood of a glsStruct Object
print.summary.gls

Print a summary.gls Object
lme

Linear Mixed-Effects Models
print.anova.lme

Print an anova.lme Object
coef.pdDiag

pdDiag Object Coefficients
corRatio

Rational Quadratic Correlation Structure
lme.lmList

LME fit from lmList Object
reStruct

Random Effects Structure
fixef.lme

Extract lme Fixed Effects
simulate.lme

simulate lme models
groupedData

Construct a groupedData Object
getVarCov

Extract variance-covariance matrix
recalc

Recalculate Condensed Linear Model Object
plot.nfnGroupedData

Plot an nfnGroupedData Object
pairs.compareFits

Pairs Plot of compareFits Object
needUpdate

Check if Update is Needed
getResponse.lmList

Extract lmList Object Response
glsControl

Control Values for gls Fit
pdFactor.reStruct

Extract Square-Root Factor from Components of an reStruct Object
print.lme

Print an lme Object
intervals.lmList

Confidence Intervals on lmList Coefficients
plot.ranef.lme

Plot a ranef.lme Object
gnlsObject

Fitted gnls Object
getCovariate

Extract Covariate from an Object
predict.gls

Predictions from a gls Object
fitted.gnls

Extract gnls Fitted Values
getGroups.lme

Extract lme Object Groups
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
lmeScale

Scale for lme Optimization
getCovariate.varFunc

Extract varFunc Covariate
plot.ACF

Plot an ACF Object
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
plot.nffGroupedData

Plot an nffGroupedData Object
plot.lmList

Plot an lmList Object
pdDiag

Diagonal Positive-Definite Matrix
print.modelStruct

Print a modelStruct Object
formula.nlme

Extract nlme Object Formula
lmList.groupedData

lmList Fit from a groupedData Object
getCovariate.data.frame

Extract Data Frame Covariate
fitted.lme

Extract lme Fitted Values
pdClasses

Positive-Definite Matrix Classes
fitted.lmeStruct

Calculate lmeStruct Fitted Values
lmList

List of lm Objects with a Common Model
lmeObject

Fitted lme Object
update.varFunc

Update varFunc Object
Glucose

Glucose levels over time
Fatigue

Cracks caused by metal fatigue
Spruce

Growth of Spruce Trees
Tetracycline2

Pharmacokinetics of tetracycline
bdf

Language scores
Assay

Bioassay on Cell Culture Plate
Cefamandole

Pharmacokinetics of Cefamandole
Machines

Productivity Scores for Machines and Workers
Gasoline

Refinery yield of gasoline
Earthquake

Earthquake Intensity
RatPupWeight

The weight of rat pups
Meat

Tenderness of meat
Pixel

X-ray pixel intensities over time
Oxide

Variability in Semiconductor Manufacturing
Remifentanil

Pharmacokinetics of remifentanil
Soybean

Growth of soybean plants
Rail

Evaluation of Stress in Railway Rails
Ovary

Counts of Ovarian Follicles
Dialyzer

High-Flux Hemodialyzer
Wheat

Yields by growing conditions
IGF

Radioimmunoassay of IGF-I Protein
MathAchieve

Mathematics achievement scores
Oats

Split-plot Experiment on Varieties of Oats
BodyWeight

Rat weight over time for different diets
ergoStool

Ergometrics experiment with stool types
Wheat2

Wheat Yield Trials
Nitrendipene

Assay of nitrendipene
Muscle

Contraction of heart muscle sections
Tetracycline1

Pharmacokinetics of tetracycline
Glucose2

Glucose Levels Following Alcohol Ingestion
MathAchSchool

School demographic data for MathAchieve
Oxboys

Heights of Boys in Oxford
Relaxin

Assay for Relaxin
Wafer

Modeling of Analog MOS Circuits
Milk

Protein content of cows' milk
PBG

Effect of Phenylbiguanide on Blood Pressure
Orthodont

Growth curve data on an orthdontic measurement
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Gun

Methods for firing naval guns
Quinidine

Quinidine Kinetics
Phenobarb

Phenobarbitol Kinetics