Learn R Programming

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

nlme (version 3.1-17)

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

85,005

Version

3.1-17

License

GPL version 2 or later

Maintainer

Douglas Bates

Last Published

March 31st, 2025

Functions in nlme (3.1-17)

asTable

Convert groupedData to a matrix
corMatrix

Extract Correlation Matrix
Names

Names Associated with an Object
residuals.lmList

Extract lmList Residuals
getData.lme

Extract lme Object Data
VarCorr

Extract variance and correlation components
BIC

Bayesian Information Criterion
Covariate

Assign Covariate Values
comparePred

Compare Predictions
Names.pdMat

Names of a pdMat Object
as.matrix.corStruct

Matrix of a corStruct Object
coef.pdCompSymm

pdCompSymm Object Coefficients
corCompSymm

Compound Symmetry Correlation Structure
coef.pdMat

pdMat Object Coefficients
fitted.lmeStruct

Calculate lmeStruct Fitted Values
allCoef

Extract Coefficients from a Set of Objects
corCAR1

Continuous AR(1) Correlation Structure
corClasses

Correlation Structure Classes
solve.reStruct

Apply Solve to an reStruct Object
AIC.lme

Akaike Information Criterion
corSpher

Spherical Correlation Structure
coef.modelStruct

Extract modelStruct Object Coefficients
contr.SAS

Contrast Matrices
corGaus

Gaussian Correlation Structure
update.nlme

Update an nlme Object
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
corSymm

General Correlation Structure
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
Coef

Assign Values to Coefficients
MEEM

EM iterations for mixed-effects
Dim

Extract Dimensions from an Object
Dim.pdMat

Dimensions of a pdMat Object
corFactor

Factor of a Correlation Matrix
Matrix

Assign Matrix Values
logLik.glsStruct

Log-Likelihood of a glsStruct Object
MEdims

Calculate dimensions in mixed-effects
Names.reStruct

Names of an reStruct Object
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
update.gnls

Update a gnls Object
random.effects.lmList

Extract lmList Random Effects
coef.gls

Extract gls Coefficients
coef.varFunc

varFunc Object Coefficients
update.varFunc

Update varFunc Object
update.nlsList

Update an nlsList Object
varComb

Combination of Variance Functions
corARMA

ARMA(p,q) Correlation Structure
getCovariate.data.frame

Extract Data Frame Covariate
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
fitted.gls

Extract gls Fitted Values
simulate.lme

simulate lme models
coef.corStruct

Coefficients of a corStruct Object
residuals.glsStruct

Calculate glsStruct Residuals
isInitialized

Check if Object is Initialized
update.groupedData

Update a groupedData Object
print.summary.lmList

Print a summary.lmList Object
as.matrix.reStruct

Matrices of an reStruct Object
Variogram.corLin

Calculate Semi-variogram for a corLin Object
asOneFormula

Combine Formulas of a Set of Objects
varFixed

Fixed Variance Function
MEdecomp

Decompose a mixed-effects model
summary.modelStruct

Summarize a modelStruct Object
print.lme

Print an lme Object
Covariate.varFunc

Assign varFunc Covariate
plot.augPred

Plot an augPred Object
Variogram

Calculate Semi-variogram
update.gls

Update a gls Object
lme.groupedData

LME fit from groupedData Object
corFactor.corStruct

Factor of a corStruct Object Matrix
fdHess

Finite difference Hessian
ACF.lme

Autocorrelation Function for lme Residuals
compareFits

Compare Fitted Objects
varExp

Exponential Variance Function
plot.compareFits

Plot a compareFits Object
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
Dim.corSpatial

Dimensions of a corSpatial Object
Names.formula

Extract Names from a formula
Matrix.pdMat

Assign Matrix to a pdMat Object
AIC.logLik

AIC of a logLik Object
summary.corStruct

Summarize a corStruct Object
corLin

Linear Correlation Structure
predict.nlme

Predictions from an nlme Object
Names.pdBlocked

Names of a pdBlocked Object
BIC.logLik

BIC of a logLik Object
ACF

Autocorrelation Function
Variogram.corExp

Calculate Semi-variogram for a corExp Object
residuals.lme

Extract lme Residuals
coef.lmList

Extract lmList Coefficients
pdMat

Positive-Definite Matrix
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
Matrix.reStruct

Assign reStruct Matrices
lme.lmList

LME fit from lmList Object
pdConstruct.pdBlocked

Construct pdBlocked Objects
AIC

Akaike Information Criterion
getGroups.corStruct

Extract corStruct Groups
summary.lme

Summarize an lme Object
residuals.gls

Extract gls Residuals
recalc.corStruct

Recalculate for corStruct Object
print.summary.modelStruct

Print a summary.modelStruct Object
ACF.gls

Autocorrelation Function for gls Residuals
[.pdMat

Subscript a pdMat Object
augPred

Augmented Predictions
varPower

Power Variance Function
random.effects

Extract Random Effects
formula.varFunc

Extract varFunc Formula
plot.ranef.lme

Plot a ranef.lme Object
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
fitted.glsStruct

Calculate glsStruct Fitted Values
print.summary.gls

Print a summary.gls Object
anova.gls

Compare Likelihoods of Fitted Objects
formula.nlme

Extract nlme Object Formula
MEestimate

Estimate mixed-effects parameters
fitted.lmList

Extract lmList Fitted Values
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
summary.pdMat

Summarize a pdMat Object
varConstPower

Constant Plus Power Variance Function
update.modelStruct

Update a modelStruct Object
anova.lme

Compare Likelihoods of Fitted Objects
pdMatrix

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

General correlation in natural parameterization
predict.lme

Predictions from an lme Object
corRatio

Rational Quadratic Correlation Structure
qqnorm.gls

Normal Plot of Residuals from a gls Object
pdMatrix.reStruct

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

Print an reStruct Object
predict.gnls

Predictions from a gnls Object
plot.ranef.lmList

Plot a ranef.lmList Object
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
initialize.reStruct

Initialize reStruct Object
print.summary.varFunc

Print a summary.varFunc Object
getGroups.lmList

Extract lmList Object Groups
logDet.reStruct

Extract reStruct Log-Determinants
Dim.corStruct

Dimensions of a corStruct Object
logLik.lmList

Log-Likelihood of an lmList Object
coef.pdIdent

pdIdent Object Coefficients
glsObject

Fitted gls Object
print.corStruct

Print a corStruct Object
logLik.lme

Log-Likelihood of an lme Object
getCovariate.varFunc

Extract varFunc Covariate
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
fitted.gnls

Extract gnls Fitted Values
print.pdMat

Print a pdMat Object
corMatrix.corStruct

Matrix of a corStruct Object
glsStruct

Generalized Least Squares Structure
print.modelStruct

Print a modelStruct Object
collapse.groupedData

Collapse a groupedData Object
formula.lmList

Extract lmList Object Formula
pdFactor.reStruct

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

Print a groupedData Object
print.lmList

Print an lmList Object
varWeights.glsStruct

Variance Weights for glsStruct Object
residuals.gnlsStruct

Calculate gnlsStruct Residuals
pooledSD

Extract Pooled Standard Deviation
reStruct

Random Effects Structure
residuals.lmeStruct

Calculate lmeStruct Residuals
coef.reStruct

reStruct Object Coefficients
initialize.varFunc

Initialize varFunc Object
balancedGrouped

Create a groupedData object from a matrix
summary.varFunc

Summarize varFunc Object
pdFactor

Square-Root Factor of a Positive-Definite Matrix
varClasses

Variance Function Classes
corAR1

AR(1) Correlation Structure
splitFormula

Split a Formula
summary.gls

Summarize a gls Object
recalc.modelStruct

Recalculate for a modelStruct Object
as.matrix.pdMat

Matrix of a pdMat Object
coef.gnls

Extract gnls Coefficients
getGroups.gls

Extract gls Object Groups
corExp

Exponential Correlation Structure
residuals.nlmeStruct

Calculate nlmeStruct Residuals
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
initialize

Initialize Object
plot.ACF

Plot an ACF Object
print.summary.lme

Print a summary.lme Object
random.effects.lme

Extract lme Random Effects
getData

Extract Data from an Object
Variogram.default

Calculate Semi-variogram
fixed.effects.lme

Extract lme Fixed Effects
pdConstruct

Construct pdMat Objects
predict.lmList

Predictions from an lmList Object
intervals.lme

Confidence Intervals on lme Parameters
formula.pdBlocked

Extract pdBlocked Formula
formula.pdMat

Extract pdMat Formula
pdSymm

General Positive-Definite Matrix
print.summary.pdMat

Print a summary.pdMat Object
fixed.effects

Extract Fixed Effects
getCovariate

Extract Covariate from an Object
nlsList.selfStart

nlsList Fit from a selfStart Function
plot.nffGroupedData

Plot an nffGroupedData Object
formula.nlsList

Extract nlsList Object Formula
plot.nmGroupedData

Plot an nmGroupedData Object
varFunc

Variance Function Structure
collapse

Collapse According to Groups
summary.lmList

Summarize an lmList Object
intervals

Confidence Intervals on Coefficients
recalc.reStruct

Recalculate for an reStruct Object
coef.pdDiag

pdDiag Object Coefficients
nlmeObject

Fitted nlme Object
update.lmList

Update an lmList Object
nlmeControl

Control Values for nlme Fit
varIdent

Constant Variance Function
qqnorm.lme

Normal Plot of Residuals or Random Effects from an lme Object
recalc

Recalculate Condensed Linear Model Object
pairs.compareFits

Pairs Plot of compareFits Object
nlme.nlsList

NLME fit from nlsList Object
residuals.gnls

Extract gnls Residuals
pdDiag

Diagonal Positive-Definite Matrix
summary.nlsList

Summarize an nlsList Object
corSpatial

Spatial Correlation Structure
varWeights

Extract Variance Function Weights
logDet.pdMat

Extract Log-Determinant from a pdMat Object
coef.lme

Extract lme Coefficients
logLik.varFunc

Extract varFunc logLik
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
fixed.effects.lmList

Extract lmList Fixed Effects
needUpdate

Check if Update is Needed
formula.modelStruct

Extract modelStruct Object Formula
logLik.reStruct

Calculate reStruct Log-Likelihood
getCovariate.corStruct

Extract corStruct Object Covariate
model.matrix.reStruct

reStruct Model Matrix
formula.corStruct

Extract corStruct Object Formula
pairs.lme

Pairs Plot of an lme Object
print.summary.corStruct

Print a summary.corStruct Object
formula.groupedData

Extract groupedData Formula
pdClasses

Positive-Definite Matrix Classes
initialize.lmeStruct

Initialize an lmeStruct Object
nlsList

List of nls Objects with a Common Model
formula.gnls

Extract gnls Object Formula
formula.nls

Extract Model Formula from nls Object
logLik.gnls

Log-Likelihood of a gnls Object
lmeScale

Scale for lme Optimization
print.varFunc

Print a varFunc Object
getResponse.lmList

Extract lmList Object Response
plot.lmList

Plot an lmList Object
gapply

Apply a Function by Groups
predict.gls

Predictions from a gls Object
initialize.glsStruct

Initialize a glsStruct Object
plot.Variogram

Plot a Variogram Object
update.lme

Update an lme Object
recalc.varFunc

Recalculate for varFunc Object
gsummary

Summarize by Groups
getResponse.data.frame

Extract Response from a Data Frame
print.gls

Print a gls Object
fitted.lme

Extract lme Fitted Values
lmeStruct

Linear Mixed-Effects Structure
getResponse.gls

Extract gls Object Response
getResponseFormula

Extract Formula Specifying Response Variable
logLik.gls

Log-Likelihood of a gls Object
logDet.corStruct

Extract corStruct Log-Determinant
getData.gls

Extract gls Object Data
print.anova.lme

Print an anova.lme Object
initialize.corStruct

Initialize corStruct Object
gnlsStruct

Generalized Nonlinear Least Squares Structure
logDet

Extract the Logarithm of the Determinant
getData.lmList

Extract lmList Object Data
gnlsControl

Control Values for gnls Fit
formula.gls

Extract gls Object Formula
intervals.lmList

Confidence Intervals on lmList Coefficients
pdBlocked

Positive-Definite Block Diagonal Matrix
groupedData

Construct a groupedData Object
logLik.lm

Extract Log-Likelihood from an lm Object
plot.nfnGroupedData

Plot an nfnGroupedData Object
intervals.gls

Confidence Intervals on gls Parameters
plot.intervals.lmList

Plot lmList Confidence Intervals
getGroups.lme

Extract lme Object Groups
pdNatural

General Positive-Definite Matrix in Natural Parametrization
pdIdent

Multiple of the Identity Positive-Definite Matrix
nlme

Nonlinear Mixed-Effects Models
gnls

Fit Nonlinear Model Using Generalized Least Squares
logLik.corStruct

Extract corStruct Log-Likelihood
lmeControl

Control Values for lme Fit
isInitialized.reStruct

Check if an reStruct Object is Initialized
lmeObject

Fitted lme Object
getResponse

Extract Response Variable from an Object
pruneLevels

Prune Factor Levels
varWeights.lmeStruct

Variance Weights for lmeStruct Object
pdLogChol

General Positive-Definite Matrix
isBalanced

Check a Design for Balance
getGroupsFormula

Extract Grouping Formula
glsControl

Control Values for gls Fit
getGroups.varFunc

Extract varFunc Groups
lmList

List of lm Objects with a Common Model
lmList.groupedData

lmList Fit from a groupedData Object
getCovariateFormula

Extract Covariates Formula
getGroups

Extract Grouping Factors from an Object
getResponse.lme

Extract lme Object Response
gls

Fit Linear Model Using Generalized Least Squares
gnlsObject

Fitted gnls Object
lme

Linear Mixed-Effects Models
getGroups.data.frame

Extract Groups from a Data Frame
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
formula.reStruct

Extract reStruct Object Formula
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
pairs.lmList

Pairs Plot of an lmList Object
formula.lme

Extract lme Object Formula
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
nlmeStruct

Nonlinear Mixed-Effects Structure
plot.lme

Plot an lme Object
plot.gls

Plot a gls Object
Assay

Bioassay on Cell Culture Plate
Soybean

Growth of soybean plants
Oats

Split-plot Experiment on Varieties of Oats
Machines

Productivity Scores for Machines and Workers
Tetracycline2

Pharmacokinetics of tetracycline
Quinidine

Quinidine Kinetics
IGF

Radioimmunoassay of IGF-I Protein
Nitrendipene

Assay of nitrendipene
Oxide

Variability in Semiconductor Manufacturing
Wafer

Modeling of Analog MOS Circuits
Milk

Protein content of cows' milk
Pixel

X-ray pixel intensities over time
Phenobarb

Phenobarbitol Kinetics
Meat

Tenderness of meat
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Tetracycline1

Pharmacokinetics of tetracycline
Spruce

Growth of Spruce Trees
Glucose2

Glucose Levels Following Alcohol Ingestion
PBG

Effect of Phenylbiguanide on Blood Pressure
Rail

Evaluation of Stress in Railway Rails
Oxboys

Heights of Boys in Oxford
Gun

Methods for firing naval guns
RatPupWeight

The weight of rat pups
Glucose

Glucose levels over time
Earthquake

Earthquake Intensity
Remifentanil

Pharmacokinetics of remifentanil
Muscle

Contraction of heart muscle sections
Wheat

Yields by growing conditions
Gasoline

Refinery yield of gasoline
Dialyzer

High-Flux Hemodialyzer
MathAchSchool

School demographic data for MathAchieve
MathAchieve

Mathematics achievement scores
Ovary

Counts of Ovarian Follicles
Cefamandole

Pharmacokinetics of Cefamandole
BodyWeight

Rat weight over time for different diets
Fatigue

Cracks caused by metal fatigue
Relaxin

Assay for Relaxin
Wheat2

Wheat Yield Trials
Orthodont

Growth curve data on an orthdontic measurement
ergoStool

Ergometrics experiment with stool types