Learn R Programming

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

nlme (version 3.1-13)

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

90,510

Version

3.1-13

License

GPL version 2 or later

Maintainer

Douglas Bates

Last Published

March 31st, 2025

Functions in nlme (3.1-13)

ACF.gls

Autocorrelation Function for gls Residuals
ACF.lme

Autocorrelation Function for lme Residuals
Covariate

Assign Covariate Values
corRatio

Rational Quadratic Correlation Structure
Variogram.corExp

Calculate Semi-variogram for a corExp Object
formula.lmList

Extract lmList Object Formula
Names.reStruct

Names of an reStruct Object
intervals.lme

Confidence Intervals on lme Parameters
getResponse.lmList

Extract lmList Object Response
getGroupsFormula

Extract Grouping Formula
ACF

Autocorrelation Function
BIC.logLik

BIC of a logLik Object
formula.nls

Extract Model Formula from nls Object
Covariate.varFunc

Assign varFunc Covariate
as.matrix.reStruct

Matrices of an reStruct Object
coef.varFunc

varFunc Object Coefficients
fitted.lme

Extract lme Fitted Values
MEdecomp

Decompose a mixed-effects model
model.matrix.reStruct

reStruct Model Matrix
Dim.corSpatial

Dimensions of a corSpatial Object
VarCorr

Extract variance and correlation components
as.matrix.corStruct

Matrix of a corStruct Object
Dim.pdMat

Dimensions of a pdMat Object
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
AIC

Akaike Information Criterion
formula.nlsList

Extract nlsList Object Formula
pairs.lme

Pairs Plot of an lme Object
Dim

Extract Dimensions from an Object
lmeScale

Scale for lme Optimization
[.pdMat

Subscript a pdMat Object
corARMA

ARMA(p,q) Correlation Structure
AIC.logLik

AIC of a logLik Object
Matrix

Assign Matrix Values
anova.lme

Compare Likelihoods of Fitted Objects
plot.nffGroupedData

Plot an nffGroupedData Object
plot.compareFits

Plot a compareFits Object
Matrix.pdMat

Assign Matrix to a pdMat Object
contr.SAS

Contrast Matrices
corFactor

Factor of a Correlation Matrix
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
Dim.corStruct

Dimensions of a corStruct Object
MEdims

Calculate dimensions in mixed-effects
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
Matrix.reStruct

Assign reStruct Matrices
Names.pdBlocked

Names of a pdBlocked Object
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
getGroups.corStruct

Extract corStruct Groups
predict.lme

Predictions from an lme Object
corCompSymm

Compound Symmetry Correlation Structure
coef.corStruct

Coefficients of a corStruct Object
corExp

Exponential Correlation Structure
Variogram.default

Calculate Semi-variogram
formula.reStruct

Extract reStruct Object Formula
anova.gls

Compare Likelihoods of Fitted Objects
getData.lmList

Extract lmList Object Data
fitted.lmList

Extract lmList Fitted Values
print.intervals.gls

Print an intervals.gls Object
MEEM

EM iterations for mixed-effects
augPred

Augmented Predictions
coef.lme

Extract lme Coefficients
getResponse.lme

Extract lme Object Response
corMatrix.corStruct

Matrix of a corStruct Object
fixed.effects

Extract Fixed Effects
Names.formula

Extract Names from a formula
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
formula.nlme

Extract nlme Object Formula
print.lme

Print an lme Object
Names

Names Associated with an Object
asOneFormula

Combine Formulas of a Set of Objects
formula.modelStruct

Extract modelStruct Object Formula
glsControl

Control Values for gls Fit
asTable

Convert groupedData to a matrix
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
isBalanced

Check a Design for Balance
balancedGrouped

Create a groupedData object from a matrix
allCoef

Extract Coefficients from a Set of Objects
plot.ACF

Plot an ACF Object
coef.pdIdent

pdIdent Object Coefficients
pruneLevels

Prune Factor Levels
corCAR1

Continuous AR(1) Correlation Structure
compareFits

Compare Fitted Objects
formula.lme

Extract lme Object Formula
getGroups.lmList

Extract lmList Object Groups
initialize.lmeStruct

Initialize an lmeStruct Object
coef.pdMat

pdMat Object Coefficients
coef.gls

Extract gls Coefficients
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
collapse.groupedData

Collapse a groupedData Object
collapse

Collapse According to Groups
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
varExp

Exponential Variance Function
getCovariate

Extract Covariate from an Object
getResponseFormula

Extract Formula Specifying Response Variable
fdHess

Finite difference Hessian
logLik.lmList

Log-Likelihood of an lmList Object
fitted.lmeStruct

Calculate lmeStruct Fitted Values
lmList

List of lm Objects with a Common Model
coef.pdDiag

pdDiag Object Coefficients
logLik.reStruct

Calculate reStruct Log-Likelihood
isInitialized.reStruct

Check if an reStruct Object is Initialized
corAR1

AR(1) Correlation Structure
logDet.corStruct

Extract corStruct Log-Determinant
formula.varFunc

Extract varFunc Formula
update.lmList

Update an lmList Object
coef.lmList

Extract lmList Coefficients
corFactor.corStruct

Factor of a corStruct Object Matrix
coef.gnls

Extract gnls Coefficients
getResponse

Extract Response Variable from an Object
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
nlme.nlsList

NLME fit from nlsList Object
fixed.effects.lmList

Extract lmList Fixed Effects
getGroupsFormula.lmList

Extract lmList Object Grouping Formula
gapply

Apply a Function by Groups
getGroups

Extract Grouping Factors from an Object
logLik.gnls

Log-Likelihood of a gnls Object
logDet

Extract the Logarithm of the Determinant
formula.corStruct

Extract corStruct Object Formula
logDet.reStruct

Extract reStruct Log-Determinants
getCovariate.data.frame

Extract Data Frame Covariate
nlme

Nonlinear Mixed-Effects Models
fixed.effects.lme

Extract lme Fixed Effects
MEestimate

Estimate mixed-effects parameters
varPower

Power Variance Function
Variogram

Calculate Semi-variogram
lmeObject

Fitted lme Object
coef.reStruct

reStruct Object Coefficients
logLik.lme

Log-Likelihood of an lme Object
isInitialized

Check if Object is Initialized
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
plot.ranef.lmList

Plot a ranef.lmList Object
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
getCovariateFormula

Extract Covariates Formula
getCovariate.corStruct

Extract corStruct Object Covariate
Names.pdMat

Names of a pdMat Object
getData.lme

Extract lme Object Data
pdDiag

Diagonal Positive-Definite Matrix
lmeStruct

Linear Mixed-Effects Structure
comparePred

Compare Predictions
residuals.lme

Extract lme Residuals
print.summary.varFunc

Print a summary.varFunc Object
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
pdFactor.reStruct

Extract Square-Root Factor from Components of an reStruct Object
getGroups.gls

Extract gls Object Groups
pdFactor

Square-Root Factor of a Positive-Definite Matrix
predict.gnls

Predictions from a gnls Object
groupedData

Construct a groupedData Object
corClasses

Correlation Structure Classes
corLin

Linear Correlation Structure
corMatrix

Extract Correlation Matrix
gnlsControl

Control Values for gnls Fit
plot.Variogram

Plot a Variogram Object
qqnorm.gls

Normal Plot of Residuals from a gls Object
coef.modelStruct

Extract modelStruct Object Coefficients
Coef

Assign Values to Coefficients
Variogram.corLin

Calculate Semi-variogram for a corLin Object
recalc.corStruct

Recalculate for corStruct Object
BIC

Bayesian Information Criterion
gnlsStruct

Generalized Nonlinear Least Squares Structure
fitted.gnls

Extract gnls Fitted Values
solve.reStruct

Apply Solve to an reStruct Object
corSpatial

Spatial Correlation Structure
initialize.reStruct

Initialize reStruct Object
getGroupsFormula.gls

Extract gls Object Grouping Formula
lme.lmList

LME fit from lmList Object
print.pdMat

Print a pdMat Object
getResponse.gls

Extract gls Object Response
nlmeControl

Control Values for nlme Fit
nlmeObject

Fitted nlme Object
formula.pdBlocked

Extract pdBlocked Formula
formula.gnls

Extract gnls Object Formula
corSpher

Spherical Correlation Structure
getCovariate.varFunc

Extract varFunc Covariate
fitted.glsStruct

Calculate glsStruct Fitted Values
glsObject

Fitted gls Object
gls

Fit Linear Model Using Generalized Least Squares
initialize.corStruct

Initialize corStruct Object
gnlsObject

Fitted gnls Object
nlmeStruct

Nonlinear Mixed-Effects Structure
plot.nfnGroupedData

Plot an nfnGroupedData Object
qqnorm.lme

Normal Plot of Residuals or Random Effects from an lme Object
plot.lmList

Plot an lmList Object
pdClasses

Positive-Definite Matrix Classes
formula.gls

Extract gls Object Formula
getGroups.data.frame

Extract Groups from a Data Frame
plot.nmGroupedData

Plot an nmGroupedData Object
logLik.corStruct

Extract corStruct Log-Likelihood
corGaus

Gaussian Correlation Structure
lme

Linear Mixed-Effects Models
random.effects.lme

Extract lme Random Effects
random.effects.lmList

Extract lmList Random Effects
as.matrix.pdMat

Matrix of a pdMat Object
logLik.lm

Extract Log-Likelihood from an lm Object
corSymm

General Correlation Structure
update.gls

Update a gls Object
predict.nlme

Predictions from an nlme Object
print.summary.lmList

Print a summary.lmList Object
print.lmList

Print an lmList Object
residuals.lmList

Extract lmList Residuals
intervals.lmList

Confidence Intervals on lmList Coefficients
fitted.gls

Extract gls Fitted Values
gsummary

Summarize by Groups
logLik.gls

Log-Likelihood of a gls Object
print.corStruct

Print a corStruct Object
lme.groupedData

LME fit from groupedData Object
needUpdate

Check if Update is Needed
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
getGroupsFormula.reStruct

Extract reStruct Grouping Formula
logLik.varFunc

Extract varFunc logLik
getData.gls

Extract gls Object Data
gnls

Fit Nonlinear Model Using Generalized Least Squares
print.anova.lme

Print an anova.lme Object
initialize.varFunc

Initialize varFunc Object
nlsList.selfStart

nlsList Fit from a selfStart Function
summary.lme

Summarize an lme Object
logLik.glsStruct

Log-Likelihood of a glsStruct Object
coef.pdCompSymm

pdCompSymm Object Coefficients
print.reStruct

Print an reStruct Object
getGroups.varFunc

Extract varFunc Groups
pdBlocked

Positive-Definite Block Diagonal Matrix
intervals.gls

Confidence Intervals on gls Parameters
summary.varFunc

Summarize varFunc Object
formula.pdMat

Extract pdMat Formula
pdMatrix

Extract Matrix or Square-Root Factor from a pdMat Object
getResponse.data.frame

Extract Response from a Data Frame
varConstPower

Constant Plus Power Variance Function
summary.pdMat

Summarize a pdMat Object
logDet.pdMat

Extract Log-Determinant from a pdMat Object
plot.lme

Plot an lme Object
pdMat

Positive-Definite Matrix
glsStruct

Generalized Least Squares Structure
pairs.compareFits

Pairs Plot of compareFits Object
pairs.lmList

Pairs Plot of an lmList Object
getGroupsFormula.lme

Extract lme Object Grouping Formula
summary.modelStruct

Summarize a modelStruct Object
pdConstruct

Construct pdMat Objects
plot.augPred

Plot an augPred Object
pdMatrix.reStruct

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

Random Effects Structure
print.summary.corStruct

Print a summary.corStruct Object
varWeights.lmeStruct

Variance Weights for lmeStruct Object
getGroups.lme

Extract lme Object Groups
print.summary.modelStruct

Print a summary.modelStruct Object
nlsList

List of nls Objects with a Common Model
lmList.groupedData

lmList Fit from a groupedData Object
recalc

Recalculate Condensed Linear Model Object
initialize

Initialize Object
initialize.glsStruct

Initialize a glsStruct Object
intervals

Confidence Intervals on Coefficients
print.varFunc

Print a varFunc Object
recalc.modelStruct

Recalculate for a modelStruct Object
plot.intervals.lmList

Plot lmList Confidence Intervals
random.effects

Extract Random Effects
lmeControl

Control Values for lme Fit
pdSymm

General Positive-Definite Matrix
print.modelStruct

Print a modelStruct Object
varWeights.glsStruct

Variance Weights for glsStruct Object
print.summary.lme

Print a summary.lme Object
residuals.glsStruct

Calculate glsStruct Residuals
pooledSD

Extract Pooled Standard Deviation
plot.ranef.lme

Plot a ranef.lme Object
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
residuals.gls

Extract gls Residuals
varIdent

Constant Variance Function
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
plot.gls

Plot a gls Object
predict.lmList

Predictions from an lmList Object
summary.lmList

Summarize an lmList Object
print.gls

Print a gls Object
residuals.nlmeStruct

Calculate nlmeStruct Residuals
summary.gls

Summarize a gls Object
predict.gls

Predictions from a gls Object
recalc.reStruct

Recalculate for an reStruct Object
print.summary.pdMat

Print a summary.pdMat Object
print.groupedData

Print a groupedData Object
simulate.lme

simulate lme models
residuals.gnls

Extract gnls Residuals
varComb

Combination of Variance Functions
varFixed

Fixed Variance Function
residuals.lmeStruct

Calculate lmeStruct Residuals
update.modelStruct

Update a modelStruct Object
varFunc

Variance Function Structure
getData

Extract Data from an Object
pdNatural

General Positive-Definite Matrix in Natural Parametrization
summary.nlsList

Summarize an nlsList Object
print.intervals.lme

Print an intervals.lme Object
summary.corStruct

Summarize a corStruct Object
update.lme

Update an lme Object
recalc.varFunc

Recalculate for varFunc Object
splitFormula

Split a Formula
residuals.gnlsStruct

Calculate gnlsStruct Residuals
pdIdent

Multiple of the Identity Positive-Definite Matrix
update.nlme

Update an nlme Object
print.summary.gls

Print a summary.gls Object
pdConstruct.pdBlocked

Construct pdBlocked Objects
update.groupedData

Update a groupedData Object
update.varFunc

Update varFunc Object
update.nlsList

Update an nlsList Object
varClasses

Variance Function Classes
update.gnls

Update a gnls Object
varWeights

Extract Variance Function Weights
formula.groupedData

Extract groupedData Formula
Milk

Protein content of cows' milk
PBG

Effect of Phenylbiguanide on Blood Pressure
Ovary

Counts of Ovarian Follicles
Rail

Evaluation of Stress in Railway Rails
Glucose2

Glucose Levels Following Alcohol Ingestion
MathAchieve

Mathematics achievement scores
Assay

Bioassay on Cell Culture Plate
Phenobarb

Phenobarbitol Kinetics
MathAchSchool

School demographic data for MathAchieve
Muscle

Contraction of heart muscle sections
Relaxin

Assay for Relaxin
Machines

Productivity Scores for Machines and Workers
Tetracycline2

Pharmacokinetics of tetracycline
Pixel

X-ray pixel intensities over time
Spruce

Growth of Spruce Trees
Fatigue

Cracks caused by metal fatigue
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Cefamandole

Pharmacokinetics of Cefamandole
RatPupWeight

The weight of rat pups
ergoStool

Ergometrics experiment with stool types
Meat

Tenderness of meat
Earthquake

Earthquake Intensity
Tetracycline1

Pharmacokinetics of tetracycline
Gun

Methods for firing naval guns
Oats

Split-plot Experiment on Varieties of Oats
Oxide

Variability in Semiconductor Manufacturing
Wafer

Modeling of Analog MOS Circuits
Oxboys

Heights of Boys in Oxford
Gasoline

Refinery yield of gasoline
IGF

Radioimmunoassay of IGF-I Protein
Glucose

Glucose levels over time
Orthodont

Growth curve data on an orthdontic measurement
Remifentanil

Pharmacokinetics of remifentanil
Soybean

Growth of soybean plants
Nitrendipene

Assay of nitrendipene
Quinidine

Quinidine Kinetics
Wheat

Yields by growing conditions
Dialyzer

High-Flux Hemodialyzer
BodyWeight

Rat weight over time for different diets
Wheat2

Wheat Yield Trials