Learn R Programming

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

nlme (version 3.1-10)

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-10

License

GPL version 2 or later

Maintainer

Douglas Bates

Last Published

March 31st, 2025

Functions in nlme (3.1-10)

formula.reStruct

Extract reStruct Object Formula
getCovariate

Extract Covariate from an Object
intervals

Confidence Intervals on Coefficients
pairs.compareFits

Pairs Plot of compareFits Object
MEdims

Calculate dimensions in mixed-effects
Matrix

Assign Matrix Values
MEEM

EM iterations for mixed-effects
formula.pdMat

Extract pdMat Formula
fixed.effects.lmList

Extract lmList Fixed Effects
logLik.varFunc

Extract varFunc logLik
allCoef

Extract Coefficients from a Set of Objects
solve.reStruct

Apply Solve to an reStruct Object
getGroups.varFunc

Extract varFunc Groups
formula.lme

Extract lme Object Formula
logLik.reStruct

Calculate reStruct Log-Likelihood
varFunc

Variance Function Structure
formula.modelStruct

Extract modelStruct Object Formula
varWeights.lmeStruct

Variance Weights for lmeStruct Object
varIdent

Constant Variance Function
getData.gls

Extract gls Object Data
Variogram.corExp

Calculate Semi-variogram for a corExp Object
plot.nffGroupedData

Plot an nffGroupedData Object
coef.lmList

Extract lmList Coefficients
as.matrix.reStruct

Matrices of an reStruct Object
asTable

Convert groupedData to a matrix
getGroups.lmList

Extract lmList Object Groups
Covariate

Assign Covariate Values
ACF.gls

Autocorrelation Function for gls Residuals
plot.intervals.lmList

Plot lmList Confidence Intervals
getCovariateFormula

Extract Covariates Formula
varPower

Power Variance Function
Gun

Methods for firing naval guns
varWeights.glsStruct

Variance Weights for glsStruct Object
Dialyzer

High-Flux Hemodialyzer
Coef

Assign Values to Coefficients
Dim.corStruct

Dimensions of a corStruct Object
Dim.pdMat

Dimensions of a pdMat Object
update.varFunc

Update varFunc Object
Dim.corSpatial

Dimensions of a corSpatial Object
Matrix.pdMat

Assign Matrix to a pdMat Object
Names.pdBlocked

Names of a pdBlocked Object
Names.formula

Extract Names from a formula
pdMatrix

Extract Matrix or Square-Root Factor from a pdMat Object
Matrix.reStruct

Assign reStruct Matrices
Ovary

Counts of Ovarian Follicles
MathAchSchool

School demographic data for MathAchieve
Machines

Productivity Scores for Machines and Workers
IGF

Radioimmunoassay of IGF-I Protein
Pixel

X-ray pixel intensities over time
MathAchieve

Mathematics achievement scores
as.matrix.corStruct

Matrix of a corStruct Object
getGroups

Extract Grouping Factors from an Object
coef.pdMat

pdMat Object Coefficients
fdHess

Finite difference Hessian
pairs.lmList

Pairs Plot of an lmList Object
bdf

Language scores
getResponse.data.frame

Extract Response from a Data Frame
pairs.lme

Pairs Plot of an lme Object
glsObject

Fitted gls Object
formula.nlsList

Extract nlsList Object Formula
formula.gls

Extract gls Object Formula
getGroups.lme

Extract lme Object Groups
Cefamandole

Pharmacokinetics of Cefamandole
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
getGroupsFormula.gls

Extract gls Object Grouping Formula
varConstPower

Constant Plus Power Variance Function
getData.lmList

Extract lmList Object Data
corAR1

AR(1) Correlation Structure
initialize.glsStruct

Initialize a glsStruct Object
getGroupsFormula.reStruct

Extract reStruct Grouping Formula
getGroups.corStruct

Extract corStruct Groups
formula.gnls

Extract gnls Object Formula
getResponse.lme

Extract lme Object Response
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
varClasses

Variance Function Classes
logLik.lmList

Log-Likelihood of an lmList Object
corRatio

Rational Quadratic Correlation Structure
logLik.glsStruct

Log-Likelihood of a glsStruct Object
ACF

Autocorrelation Function
getData

Extract Data from an Object
pdClasses

Positive-Definite Matrix Classes
getGroups.gls

Extract gls Object Groups
Covariate.varFunc

Assign varFunc Covariate
asOneFormula

Combine Formulas of a Set of Objects
corCAR1

Continuous AR(1) Correlation Structure
[.pdMat

Subscript a pdMat Object
Names.reStruct

Names of an reStruct Object
corSpher

Spherical Correlation Structure
ACF.lme

Autocorrelation Function for lme Residuals
formula.groupedData

Extract groupedData Formula
coef.pdIdent

pdIdent Object Coefficients
BIC.logLik

BIC of a logLik Object
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
fitted.gls

Extract gls Fitted Values
Dim

Extract Dimensions from an Object
BIC

Bayesian Information Criterion
coef.reStruct

reStruct Object Coefficients
corSymm

General Correlation Structure
coef.lme

Extract lme Coefficients
initialize.corStruct

Initialize corStruct Object
AIC.logLik

AIC of a logLik Object
update.modelStruct

Update a modelStruct Object
contr.SAS

Contrast Matrices
model.matrix.reStruct

reStruct Model Matrix
fitted.glsStruct

Calculate glsStruct Fitted Values
corClasses

Correlation Structure Classes
getGroups.data.frame

Extract Groups from a Data Frame
pdConstruct.pdBlocked

Construct pdBlocked Objects
gnls

Fit Nonlinear Model Using Generalized Least Squares
nlmeControl

Control Values for nlme Fit
nlme.nlsList

NLME fit from nlsList Object
pdLogChol

General Positive-Definite Matrix
collapse.groupedData

Collapse a groupedData Object
fitted.lmList

Extract lmList Fitted Values
getGroupsFormula

Extract Grouping Formula
pdMat

Positive-Definite Matrix
plot.compareFits

Plot a compareFits Object
nlmeStruct

Nonlinear Mixed-Effects Structure
summary.gls

Summarize a gls Object
balancedGrouped

Create a groupedData object from a matrix
predict.gnls

Predictions from a gnls Object
plot.ACF

Plot an ACF Object
Variogram.corLin

Calculate Semi-variogram for a corLin Object
corMatrix

Extract Correlation Matrix
Remifentanil

Pharmacokinetics of remifentanil
Initialize.lmeStruct

Initialize an lmeStruct Object
plot.nmGroupedData

Plot an nmGroupedData Object
pdFactor.reStruct

Extract Square-Root Factor from Components of an reStruct Object
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
intervals.gls

Confidence Intervals on gls Parameters
glsStruct

Generalized Least Squares Structure
summary.pdMat

Summarize a pdMat Object
Oats

Split-plot Experiment on Varieties of Oats
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
plot.ranef.lmList

Plot a ranef.lmList Object
summary.corStruct

Summarize a corStruct Object
ranef.lme

Extract lme Random Effects
getData.lme

Extract lme Object Data
residuals.lmList

Extract lmList Residuals
intervals.lmList

Confidence Intervals on lmList Coefficients
summary.lme

Summarize an lme Object
phenoModel

Model function for the Phenobarb data
recalc.reStruct

Recalculate for an reStruct Object
recalc.modelStruct

Recalculate for a modelStruct Object
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
quinModel

Model function for the Quinidine data
Glucose2

Glucose Levels Following Alcohol Ingestion
residuals.nlmeStruct

Calculate nlmeStruct Residuals
augPred

Augmented Predictions
Rail

Evaluation of Stress in Railway Rails
corLin

Linear Correlation Structure
gnlsStruct

Generalized Nonlinear Least Squares Structure
coef.modelStruct

Extract modelStruct Object Coefficients
MEestimate

Estimate mixed-effects parameters
isBalanced

Check a Design for Balance
logLik.gls

Log-Likelihood of a gls Object
logDet

Extract the Logarithm of the Determinant
lmeControl

Control Values for lme Fit
VarCorr

Extract variance and correlation components
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
logLik.lme

Log-Likelihood of an lme Object
pdConstruct

Construct pdMat Objects
coef.corStruct

Coefficients of a corStruct Object
logLik.gnls

Log-Likelihood of a gnls Object
anova.gls

Compare Likelihoods of Fitted Objects
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
getResponseFormula

Extract Formula Specifying Response Variable
fitted.lmeStruct

Calculate lmeStruct Fitted Values
fitted.gnls

Extract gnls Fitted Values
coef.pdDiag

pdDiag Object Coefficients
formula.nlme

Extract nlme Object Formula
pdMatrix.reStruct

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

Confidence Intervals on lme Parameters
corFactor.corStruct

Factor of a corStruct Object Matrix
getCovariate.corStruct

Extract corStruct Object Covariate
Relaxin

Assay for Relaxin
print.summary.pdMat

Print a summary.pdMat Object
needUpdate

Check if Update is Needed
formula.nls

Extract Model Formula from nls Object
collapse

Collapse According to Groups
varComb

Combination of Variance Functions
Names.pdMat

Names of a pdMat Object
getCovariate.data.frame

Extract Data Frame Covariate
Milk

Protein content of cows' milk
logDet.corStruct

Extract corStruct Log-Determinant
corCompSymm

Compound Symmetry Correlation Structure
plot.Variogram

Plot a Variogram Object
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
gnlsObject

Fitted gnls Object
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
logDet.pdMat

Extract Log-Determinant from a pdMat Object
varFixed

Fixed Variance Function
gnlsControl

Control Values for gnls Fit
initialize.varFunc

Initialize varFunc Object
gls

Fit Linear Model Using Generalized Least Squares
summary.lmList

Summarize an lmList Object
gsummary

Summarize by Groups
lme.lmList

LME fit from lmList Object
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
groupedData

Construct a groupedData Object
pdFactor

Square-Root Factor of a Positive-Definite Matrix
recalc.corStruct

Recalculate for corStruct Object
Initialize

Initialize Object
pdBlocked

Positive-Definite Block Diagonal Matrix
Oxboys

Heights of Boys in Oxford
Quinidine

Quinidine Kinetics
varExp

Exponential Variance Function
plot.lmList

Plot an lmList Object
coef.pdCompSymm

pdCompSymm Object Coefficients
Oxide

Variability in Semiconductor Manufacturing
pdSymm

General Positive-Definite Matrix
lme

Linear Mixed-Effects Models
lmeScale

Scale for lme Optimization
Wheat2

Wheat Yield Trials
Wheat

Yields by growing conditions
pdIdent

Multiple of the Identity Positive-Definite Matrix
corARMA

ARMA(p,q) Correlation Structure
getVarCov

Extract variance-covariance matrix
lmeObject

Fitted lme Object
qqnorm.gls

Normal Plot of Residuals from a gls Object
splitFormula

Split a Formula
Glucose

Glucose levels over time
gapply

Apply a Function by Groups
Soybean

Growth of soybean plants
comparePred

Compare Predictions
LDEsysMat

Generate system matrix for LDEs
varWeights

Extract Variance Function Weights
nlsList

List of nls Objects with a Common Model
Variogram.default

Calculate Semi-variogram
corGaus

Gaussian Correlation Structure
reStruct

Random Effects Structure
Initialize.reStruct

Initialize reStruct Object
residuals.lmeStruct

Calculate lmeStruct Residuals
Names

Names Associated with an Object
compareFits

Compare Fitted Objects
MEdecomp

Decompose a mixed-effects model
coef.gls

Extract gls Coefficients
pdDiag

Diagonal Positive-Definite Matrix
getCovariate.varFunc

Extract varFunc Covariate
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
nlmeObject

Fitted nlme Object
recalc.varFunc

Recalculate for varFunc Object
logLik.corStruct

Extract corStruct Log-Likelihood
plot.lme

Plot an lme or nls object
recalc

Recalculate Condensed Linear Model Object
formula.lmList

Extract lmList Object Formula
getResponse

Extract Response Variable from an Object
corFactor

Factor of a Correlation Matrix
lmList.groupedData

lmList Fit from a groupedData Object
Nitrendipene

Assay of nitrendipene
nlsList.selfStart

nlsList Fit from a selfStart Function
PBG

Effect of Phenylbiguanide on Blood Pressure
logLik.lm

Extract Log-Likelihood from an lm Object
summary.modelStruct

Summarize a modelStruct Object
summary.varFunc

Summarize varFunc Object
Fatigue

Cracks caused by metal fatigue
predict.lmList

Predictions from an lmList Object
BodyWeight

Rat weight over time for different diets
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
lme.groupedData

LME fit from groupedData Object
glsControl

Control Values for gls Fit
fixef.lmList

Extract lmList Fixed Effects
corMatrix.corStruct

Matrix of a corStruct Object
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
formula.pdBlocked

Extract pdBlocked Formula
predict.gls

Predictions from a gls Object
as.matrix.pdMat

Matrix of a pdMat Object
corNatural

General correlation in natural parameterization
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
Gasoline

Refinery yield of gasoline
print.varFunc

Print a varFunc Object
Wafer

Modeling of Analog MOS Circuits
coef.varFunc

varFunc Object Coefficients
plot.nfnGroupedData

Plot an nfnGroupedData Object
plot.gls

Plot a gls Object
isInitialized

Check if Object is Initialized
residuals.gnlsStruct

Calculate gnlsStruct Residuals
fitted.lme

Extract lme Fitted Values
random.effects

Extract Random Effects
Muscle

Contraction of heart muscle sections
plot.ranef.lme

Plot a ranef.lme Object
lmList

List of lm Objects with a Common Model
residuals.gls

Extract gls Residuals
corSpatial

Spatial Correlation Structure
Variogram

Calculate Semi-variogram
anova.lme

Compare Likelihoods of Fitted Objects
corExp

Exponential Correlation Structure
predict.nlme

Predictions from an nlme Object
summary.nlsList

Summarize an nlsList Object
formula.corStruct

Extract corStruct Object Formula
Phenobarb

Phenobarbitol Kinetics
lmeStruct

Linear Mixed-Effects Structure
plot.augPred

Plot an augPred Object
residuals.lme

Extract lme Residuals
residuals.glsStruct

Calculate glsStruct Residuals
Spruce

Growth of Spruce Trees
getResponse.lmList

Extract lmList Object Response
Meat

Tenderness of meat
RatPupWeight

The weight of rat pups
qqnorm.lme

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

Growth curve data on an orthdontic measurement
fixed.effects.lme

Extract lme Fixed Effects
Earthquake

Earthquake Intensity
Assay

Bioassay on Cell Culture Plate
Tetracycline2

Pharmacokinetics of tetracycline
fixed.effects

Extract Fixed Effects
Tetracycline1

Pharmacokinetics of tetracycline
coef.gnls

Extract gnls Coefficients
getResponse.gls

Extract gls Object Response
pooledSD

Extract Pooled Standard Deviation
ranef.lmList

Extract lmList Random Effects
nlme

Nonlinear Mixed-Effects Models
predict.lme

Predictions from an lme Object
pdNatural

General Positive-Definite Matrix in Natural Parametrization
simulate.lme

Simulate results from lme models
print.anova.lme

Print an anova.lme Object
print.summary.varFunc

Print a summary.varFunc Object
isInitialized.reStruct

Check if an reStruct Object is Initialized
print.groupedData

Print a groupedData Object
print.summary.modelStruct

Print a summary.modelStruct Object
print.lme

Print an lme Object
print.intervals.gls

Print an intervals.gls Object
update.lme

Update an lme Object
print.modelStruct

Print a modelStruct Object
print.corStruct

Print a corStruct Object
logDet.reStruct

Extract reStruct Log-Determinants
random.effects.lmList

Extract lmList Random Effects
print.lmList

Print an lmList Object
update.nlsList

Update an nlsList Object
print.summary.gls

Print a summary.gls Object
print.gls

Print a gls Object
ergoStool

Ergometrics experiment with stool types
AIC

Akaike Information Criterion
update.gls

Update a gls Object
update.gnls

Update a gnls Object
random.effects.lme

Extract lme Random Effects
print.summary.lmList

Print a summary.lmList Object
update.lmList

Update an lmList Object
print.intervals.lme

Print an intervals.lme Object
print.reStruct

Print an reStruct Object
update.groupedData

Update a groupedData Object
print.pdMat

Print a pdMat Object
pruneLevels

Prune Factor Levels
residuals.gnls

Extract gnls Residuals
print.summary.lme

Print a summary.lme Object
formula.varFunc

Extract varFunc Formula
update.nlme

Update an nlme Object
print.summary.corStruct

Print a summary.corStruct Object
getGroupsFormula.lmList

Extract lmList Object Grouping Formula
getGroupsFormula.lme

Extract lme Object Grouping Formula