Learn R Programming

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

nlme (version 3.1-35)

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

149,202

Version

3.1-35

License

GPL version 2 or later

Maintainer

Douglas Bates

Last Published

March 31st, 2025

Functions in nlme (3.1-35)

Dim

Extract Dimensions from an Object
Names.pdMat

Names of a pdMat Object
MEestimate

Estimate mixed-effects parameters
BIC.logLik

BIC of a logLik Object
MEdecomp

Decompose a mixed-effects model
Covariate

Assign Covariate Values
anova.lme

Compare Likelihoods of Fitted Objects
MEdims

Calculate dimensions in mixed-effects
collapse

Collapse According to Groups
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
Variogram.default

Calculate Semi-variogram
Matrix.pdMat

Assign Matrix to a pdMat Object
formula.modelStruct

Extract modelStruct Object Formula
[.pdMat

Subscript a pdMat Object
asTable

Convert groupedData to a matrix
Matrix.reStruct

Assign reStruct Matrices
corSpher

Spherical Correlation Structure
as.matrix.pdMat

Matrix of a pdMat Object
as.matrix.reStruct

Matrices of an reStruct Object
asOneFormula

Combine Formulas of a Set of Objects
fixef.lme

Extract lme Fixed Effects
corExp

Exponential Correlation Structure
fitted.gls

Extract gls Fitted Values
coef.reStruct

reStruct Object Coefficients
fitted.lmeStruct

Calculate lmeStruct Fitted Values
corLin

Linear Correlation Structure
comparePred

Compare Predictions
fixed.effects

Extract Fixed Effects
corNatural

General correlation in natural parameterization
corCAR1

Continuous AR(1) Correlation Structure
corCompSymm

Compound Symmetry Correlation Structure
fitted.gnls

Extract gnls Fitted Values
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
getCovariateFormula

Extract Covariates Formula
getResponse.gls

Extract gls Object Response
corMatrix.corStruct

Matrix of a corStruct Object
intervals.lmList

Confidence Intervals on lmList Coefficients
gnlsObject

Fitted gnls Object
formula.corStruct

Extract corStruct Object Formula
corClasses

Correlation Structure Classes
getVarCov

Extract variance-covariance matrix
formula.lmList

Extract lmList Object Formula
getGroups.varFunc

Extract varFunc Groups
getGroups.gls

Extract gls Object Groups
lme.lmList

LME fit from lmList Object
needUpdate

Check if Update is Needed
pdMatrix

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

Extract Data Frame Covariate
summary.gls

Summarize a gls Object
groupedData

Construct a groupedData Object
nlsList

List of nls Objects with a Common Model
formula.varFunc

Extract varFunc Formula
formula.reStruct

Extract reStruct Object Formula
getData.lmList

Extract lmList Object Data
intervals

Confidence Intervals on Coefficients
gnlsControl

Control Values for gnls Fit
nlme

Nonlinear Mixed-Effects Models
logDet.pdMat

Extract Log-Determinant from a pdMat Object
fitted.lme

Extract lme Fitted Values
pdIdent

Multiple of the Identity Positive-Definite Matrix
pdClasses

Positive-Definite Matrix Classes
lmeControl

Control Values for lme Fit
nlmeObject

Fitted nlme Object
residuals.lme

Extract lme Residuals
Initialize.varFunc

Initialize varFunc Object
phenoModel

Model function for the Phenobarb data
pdDiag

Diagonal Positive-Definite Matrix
coef.corStruct

Coefficients of a corStruct Object
nlmeControl

Control Values for nlme Fit
getGroups.data.frame

Extract Groups from a Data Frame
logLik.glsStruct

Log-Likelihood of a glsStruct Object
formula.lme

Extract lme Object Formula
pdFactor.reStruct

Extract Square-Root Factor from Components of an reStruct Object
pdBlocked

Positive-Definite Block Diagonal Matrix
print.groupedData

Print a groupedData Object
print.modelStruct

Print a modelStruct Object
nlsList.selfStart

nlsList Fit from a selfStart Function
pairs.lme

Pairs Plot of an lme Object
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
print.summary.lme

Print a summary.lme Object
plot.nfnGroupedData

Plot an nfnGroupedData Object
pdFactor

Square-Root Factor of a Positive-Definite Matrix
print.summary.pdMat

Print a summary.pdMat Object
simulate.lme

simulate lme models
summary.lme

Summarize an lme Object
plot.ranef.lmList

Plot a ranef.lmList Object
predict.lmList

Predictions from an lmList Object
fitted.lmList

Extract lmList Fitted Values
predict.lme

Predictions from an lme Object
pruneLevels

Prune Factor Levels
plot.augPred

Plot an augPred Object
Names.pdBlocked

Names of a pdBlocked Object
varClasses

Variance Function Classes
summary.varFunc

Summarize varFunc Object
print.summary.modelStruct

Print a summary.modelStruct Object
varWeights.glsStruct

Variance Weights for glsStruct Object
varExp

Exponential Variance Function
lme

Linear Mixed-Effects Models
print.summary.gls

Print a summary.gls Object
logDet

Extract the Logarithm of the Determinant
varWeights.lmeStruct

Variance Weights for lmeStruct Object
quinModel

Model function for the Quinidine data
plot.gls

Plot a gls Object
print.summary.lmList

Print a summary.lmList Object
varFixed

Fixed Variance Function
print.anova.lme

Print an anova.lme Object
varPower

Power Variance Function
summary.corStruct

Summarize a corStruct Object
residuals.gnlsStruct

Calculate gnlsStruct Residuals
print.corStruct

Print a corStruct Object
AIC

Akaike Information Criterion
solve.reStruct

Apply Solve to an reStruct Object
ACF

Autocorrelation Function
recalc.varFunc

Recalculate for varFunc Object
summary.lmList

Summarize an lmList Object
Coef

Assign Values to Coefficients
varIdent

Constant Variance Function
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
summary.nlsList

Summarize an nlsList Object
coef.varFunc

varFunc Object Coefficients
varComb

Combination of Variance Functions
glsStruct

Generalized Least Squares Structure
gnlsStruct

Generalized Nonlinear Least Squares Structure
fdHess

Finite difference Hessian
intervals.lme

Confidence Intervals on lme Parameters
formula.nlme

Extract nlme Object Formula
isBalanced

Check a Design for Balance
recalc

Recalculate Condensed Linear Model Object
getGroups.corStruct

Extract corStruct Groups
isInitialized

Check if Object is Initialized
getGroupsFormula

Extract Grouping Formula
gls

Fit Linear Model Using Generalized Least Squares
lme.groupedData

LME fit from groupedData Object
lmeObject

Fitted lme Object
logDet.corStruct

Extract corStruct Log-Determinant
AIC.lme

Akaike Information Criterion
logLik.corStruct

Extract corStruct Log-Likelihood
ACF.lme

Autocorrelation Function for lme Residuals
model.matrix.reStruct

reStruct Model Matrix
pairs.compareFits

Pairs Plot of compareFits Object
Initialize.lmeStruct

Initialize an lmeStruct Object
print.lmList

Print an lmList Object
pairs.lmList

Pairs Plot of an lmList Object
LDEsysMat

Generate system matrix for LDEs
Initialize.corStruct

Initialize corStruct Object
pdConstruct.pdBlocked

Construct pdBlocked Objects
allCoef

Extract Coefficients from a Set of Objects
MEEM

EM iterations for mixed-effects
print.gls

Print a gls Object
coef.modelStruct

Extract modelStruct Object Coefficients
coef.pdIdent

pdIdent Object Coefficients
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
nlme.nlsList

NLME fit from nlsList Object
as.matrix.corStruct

Matrix of a corStruct Object
corMatrix

Extract Correlation Matrix
Matrix

Assign Matrix Values
augPred

Augmented Predictions
compareFits

Compare Fitted Objects
plot.compareFits

Plot a compareFits Object
Names.formula

Extract Names from a formula
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
predict.nlme

Predictions from an nlme Object
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
print.summary.corStruct

Print a summary.corStruct Object
corFactor

Factor of a Correlation Matrix
getGroups.lme

Extract lme Object Groups
getResponse

Extract Response Variable from an Object
glsControl

Control Values for gls Fit
logLik.gnls

Log-Likelihood of a gnls Object
lmeStruct

Linear Mixed-Effects Structure
logDet.reStruct

Extract reStruct Log-Determinants
logLik.gls

Log-Likelihood of a gls Object
logLik.varFunc

Extract varFunc logLik
pdNatural

General Positive-Definite Matrix in Natural Parametrization
getGroups

Extract Grouping Factors from an Object
plot.lme

Plot an lme or nls object
ranef.lme

Extract lme Random Effects
plot.intervals.lmList

Plot lmList Confidence Intervals
recalc.corStruct

Recalculate for corStruct Object
pdConstruct

Construct pdMat Objects
pooledSD

Extract Pooled Standard Deviation
Dim.corStruct

Dimensions of a corStruct Object
ranef.lmList

Extract lmList Random Effects
Covariate.varFunc

Assign varFunc Covariate
Variogram.corLin

Calculate Semi-variogram for a corLin Object
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
Names

Names Associated with an Object
anova.gls

Compare Likelihoods of Fitted Objects
print.varFunc

Print a varFunc Object
summary.modelStruct

Summarize a modelStruct Object
Initialize

Initialize Object
Initialize.reStruct

Initialize reStruct Object
coef.lme

Extract lme Coefficients
coef.gnls

Extract gnls Coefficients
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
balancedGrouped

Create a groupedData object from a matrix
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
corRatio

Rational Quadratic Correlation Structure
formula.gls

Extract gls Object Formula
coef.lmList

Extract lmList Coefficients
collapse.groupedData

Collapse a groupedData Object
coef.pdCompSymm

pdCompSymm Object Coefficients
formula.gnls

Extract gnls Object Formula
fitted.glsStruct

Calculate glsStruct Fitted Values
glsObject

Fitted gls Object
corSpatial

Spatial Correlation Structure
formula.groupedData

Extract groupedData Formula
residuals.glsStruct

Calculate glsStruct Residuals
formula.pdMat

Extract pdMat Formula
predict.gls

Predictions from a gls Object
plot.ACF

Plot an ACF Object
getCovariate

Extract Covariate from an Object
getResponse.lmList

Extract lmList Object Response
getCovariate.varFunc

Extract varFunc Covariate
getResponseFormula

Extract Formula Specifying Response Variable
gnls

Fit Nonlinear Model Using Generalized Least Squares
lmList

List of lm Objects with a Common Model
pdMat

Positive-Definite Matrix
getData.gls

Extract gls Object Data
recalc.modelStruct

Recalculate for a modelStruct Object
formula.pdBlocked

Extract pdBlocked Formula
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
pdMatrix.reStruct

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

Calculate reStruct Log-Likelihood
residuals.gls

Extract gls Residuals
print.reStruct

Print an reStruct Object
plot.lmList

Plot an lmList Object
print.lme

Print an lme Object
residuals.lmList

Extract lmList Residuals
Variogram.corExp

Calculate Semi-variogram for a corExp Object
residuals.nlmeStruct

Calculate nlmeStruct Residuals
qqnorm.lme

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

Summarize a pdMat Object
varFunc

Variance Function Structure
Dim.pdMat

Dimensions of a pdMat Object
coef.gls

Extract gls Coefficients
Variogram

Calculate Semi-variogram
ACF.gls

Autocorrelation Function for gls Residuals
corFactor.corStruct

Factor of a corStruct Object Matrix
splitFormula

Split a Formula
fixef.lmList

Extract lmList Fixed Effects
formula.nlsList

Extract nlsList Object Formula
getData.lme

Extract lme Object Data
getResponse.data.frame

Extract Response from a Data Frame
isInitialized.reStruct

Check if an reStruct Object is Initialized
logLik.lme

Log-Likelihood of an lme Object
plot.nmGroupedData

Plot an nmGroupedData Object
Names.reStruct

Names of an reStruct Object
print.summary.varFunc

Print a summary.varFunc Object
random.effects

Extract Random Effects
corARMA

ARMA(p,q) Correlation Structure
corAR1

AR(1) Correlation Structure
getCovariate.corStruct

Extract corStruct Object Covariate
gsummary

Summarize by Groups
lmeScale

Scale for lme Optimization
Initialize.glsStruct

Initialize a glsStruct Object
contr.SAS

Contrast Matrices
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
nlmeStruct

Nonlinear Mixed-Effects Structure
coef.pdDiag

pdDiag Object Coefficients
pdSymm

General Positive-Definite Matrix
plot.Variogram

Plot a Variogram Object
print.pdMat

Print a pdMat Object
reStruct

Random Effects Structure
corGaus

Gaussian Correlation Structure
coef.pdMat

pdMat Object Coefficients
update.varFunc

Update varFunc Object
getData

Extract Data from an Object
lmList.groupedData

lmList Fit from a groupedData Object
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
gapply

Apply a Function by Groups
getResponse.lme

Extract lme Object Response
plot.ranef.lme

Plot a ranef.lme Object
intervals.gls

Confidence Intervals on gls Parameters
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
logLik.lmList

Log-Likelihood of an lmList Object
residuals.lmeStruct

Calculate lmeStruct Residuals
recalc.reStruct

Recalculate for an reStruct Object
nlme-internal

Internal nlme functions
update.modelStruct

Update a modelStruct Object
varConstPower

Constant Plus Power Variance Function
varWeights

Extract Variance Function Weights
corSymm

General Correlation Structure
BIC

Bayesian Information Criterion
Dim.corSpatial

Dimensions of a corSpatial Object
VarCorr

Extract variance and correlation components
getGroups.lmList

Extract lmList Object Groups
pdLogChol

General Positive-Definite Matrix
plot.nffGroupedData

Plot an nffGroupedData Object
predict.gnls

Predictions from a gnls Object
qqnorm.gls

Normal Plot of Residuals from a gls Object
RatPupWeight

The weight of rat pups
PBG

Effect of Phenylbiguanide on Blood Pressure
Glucose

Glucose levels over time
Oxide

Variability in Semiconductor Manufacturing
Milk

Protein content of cows' milk
Tetracycline1

Pharmacokinetics of tetracycline
Wafer

Modeling of Analog MOS Circuits
Soybean

Growth of soybean plants
Phenobarb

Phenobarbitol Kinetics
Oxboys

Heights of Boys in Oxford
Ovary

Counts of Ovarian Follicles
Muscle

Contraction of heart muscle sections
BodyWeight

Rat weight over time for different diets
Oats

Split-plot Experiment on Varieties of Oats
Orthodont

Growth curve data on an orthdontic measurement
Fatigue

Cracks caused by metal fatigue
MathAchieve

Mathematics achievement scores
Pixel

X-ray pixel intensities over time
IGF

Radioimmunoassay of IGF-I Protein
Nitrendipene

Assay of nitrendipene
ergoStool

Ergometrics experiment with stool types
Tetracycline2

Pharmacokinetics of tetracycline
Earthquake

Earthquake Intensity
Assay

Bioassay on Cell Culture Plate
MathAchSchool

School demographic data for MathAchieve
Dialyzer

High-Flux Hemodialyzer
Relaxin

Assay for Relaxin
Glucose2

Glucose Levels Following Alcohol Ingestion
Quinidine

Quinidine Kinetics
Meat

Tenderness of meat
Rail

Evaluation of Stress in Railway Rails
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Wheat2

Wheat Yield Trials
Remifentanil

Pharmacokinetics of remifentanil
Cefamandole

Pharmacokinetics of Cefamandole
Wheat

Yields by growing conditions
Spruce

Growth of Spruce Trees
Machines

Productivity Scores for Machines and Workers
Gasoline

Refinery yield of gasoline
Gun

Methods for firing naval guns
bdf

Language scores