Learn R Programming

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

nlme (version 3.1-82)

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

62,596

Version

3.1-82

License

GPL version 2 or later

Maintainer

R-core R-core@R-project.org

Last Published

March 31st, 2025

Functions in nlme (3.1-82)

logDet

Extract the Logarithm of the Determinant
collapse

Collapse According to Groups
glsObject

Fitted gls Object
BIC.logLik

BIC of a logLik Object
ACF.lme

Autocorrelation Function for lme Residuals
Coef

Assign Values to Coefficients
Names

Names Associated with an Object
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
Names.pdMat

Names of a pdMat Object
LDEsysMat

Generate system matrix for LDEs
asOneFormula

Combine Formulas of a Set of Objects
as.matrix.reStruct

Matrices of an reStruct Object
coef.lme

Extract lme Coefficients
as.matrix.pdMat

Matrix of a pdMat Object
VarCorr

Extract variance and correlation components
balancedGrouped

Create a groupedData object from a matrix
Initialize.glsStruct

Initialize a glsStruct Object
coef.reStruct

reStruct Object Coefficients
[.pdMat

Subscript a pdMat Object
augPred

Augmented Predictions
allCoef

Extract Coefficients from a Set of Objects
as.matrix.corStruct

Matrix of a corStruct Object
pdFactor.reStruct

Extract Square-Root Factor from Components of an reStruct Object
plot.augPred

Plot an augPred Object
random.effects

Extract Random Effects
fitted.glsStruct

Calculate glsStruct Fitted Values
Covariate

Assign Covariate Values
corRatio

Rational Quadratic Correlation Structure
pdBlocked

Positive-Definite Block Diagonal Matrix
lmeObject

Fitted lme Object
Dim.pdMat

Dimensions of a pdMat Object
ACF

Autocorrelation Function
reStruct

Random Effects Structure
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
corMatrix

Extract Correlation Matrix
Initialize

Initialize Object
Matrix

Assign Matrix Values
plot.compareFits

Plot a compareFits Object
Covariate.varFunc

Assign varFunc Covariate
Matrix.pdMat

Assign Matrix to a pdMat Object
getGroupsFormula

Extract Grouping Formula
varComb

Combination of Variance Functions
Dim

Extract Dimensions from an Object
Initialize.varFunc

Initialize varFunc Object
plot.nffGroupedData

Plot an nffGroupedData Object
pdMatrix

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

Summarize a pdMat Object
Initialize.lmeStruct

Initialize an lmeStruct Object
getData.lmList

Extract lmList Object Data
corFactor.corStruct

Factor of a corStruct Object Matrix
pdConstruct

Construct pdMat Objects
corFactor

Factor of a Correlation Matrix
Initialize.reStruct

Initialize reStruct Object
coef.modelStruct

Extract modelStruct Object Coefficients
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
ACF.gls

Autocorrelation Function for gls Residuals
residuals.gls

Extract gls Residuals
varWeights.lmeStruct

Variance Weights for lmeStruct Object
collapse.groupedData

Collapse a groupedData Object
splitFormula

Split a Formula
Matrix.reStruct

Assign reStruct Matrices
corARMA

ARMA(p,q) Correlation Structure
summary.corStruct

Summarize a corStruct Object
getGroups

Extract Grouping Factors from an Object
getGroups.corStruct

Extract corStruct Groups
getGroups.varFunc

Extract varFunc Groups
coef.varFunc

varFunc Object Coefficients
Names.reStruct

Names of an reStruct Object
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
Dim.corSpatial

Dimensions of a corSpatial Object
BIC

Bayesian Information Criterion
residuals.lmeStruct

Calculate lmeStruct Residuals
logLik.reStruct

Calculate reStruct Log-Likelihood
corCompSymm

Compound Symmetry Correlation Structure
plot.ACF

Plot an ACF Object
Names.pdBlocked

Names of a pdBlocked Object
varPower

Power Variance Function
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
Variogram

Calculate Semi-variogram
Initialize.corStruct

Initialize corStruct Object
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
asTable

Convert groupedData to a matrix
comparePred

Compare Predictions
Names.formula

Extract Names from a formula
corMatrix.corStruct

Matrix of a corStruct Object
getData.gls

Extract gls Object Data
getCovariateFormula

Extract Covariates Formula
coef.pdMat

pdMat Object Coefficients
summary.gls

Summarize a gls Object
corClasses

Correlation Structure Classes
nlme

Nonlinear Mixed-Effects Models
plot.nfnGroupedData

Plot an nfnGroupedData Object
coef.corStruct

Coefficients of a corStruct Object
pdLogChol

General Positive-Definite Matrix
lmList

List of lm Objects with a Common Model
corCAR1

Continuous AR(1) Correlation Structure
summary.lmList

Summarize an lmList Object
varConstPower

Constant Plus Power Variance Function
gapply

Apply a Function by Groups
lmeScale

Scale for lme Optimization
isInitialized

Check if Object is Initialized
nlsList.selfStart

nlsList Fit from a selfStart Function
recalc

Recalculate Condensed Linear Model Object
formula.pdMat

Extract pdMat Formula
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
varIdent

Constant Variance Function
pdSymm

General Positive-Definite Matrix
needUpdate

Check if Update is Needed
getGroups.data.frame

Extract Groups from a Data Frame
gsummary

Summarize by Groups
plot.lmList

Plot an lmList Object
fitted.lme

Extract lme Fitted Values
anova.gls

Compare Likelihoods of Fitted Objects
varWeights.glsStruct

Variance Weights for glsStruct Object
logLik.varFunc

Extract varFunc logLik
nlmeStruct

Nonlinear Mixed-Effects Structure
model.matrix.reStruct

reStruct Model Matrix
corSpatial

Spatial Correlation Structure
predict.gnls

Predictions from a gnls Object
compareFits

Compare Fitted Objects
residuals.lme

Extract lme Residuals
pairs.lme

Pairs Plot of an lme Object
varClasses

Variance Function Classes
corNatural

General correlation in natural parameterization
getVarCov

Extract variance-covariance matrix
Variogram.corLin

Calculate Semi-variogram for a corLin Object
pdNatural

General Positive-Definite Matrix in Natural Parametrization
simulate.lme

Simulate results from lme models
coef.lmList

Extract lmList Coefficients
Variogram.corExp

Calculate Semi-variogram for a corExp Object
intervals.lme

Confidence Intervals on lme Parameters
getData.lme

Extract lme Object Data
summary.modelStruct

Summarize a modelStruct Object
Dim.corStruct

Dimensions of a corStruct Object
getGroups.gls

Extract gls Object Groups
recalc.varFunc

Recalculate for varFunc Object
varFunc

Variance Function Structure
pdClasses

Positive-Definite Matrix Classes
pdConstruct.pdBlocked

Construct pdBlocked Objects
getCovariate.varFunc

Extract varFunc Covariate
corGaus

Gaussian Correlation Structure
varWeights

Extract Variance Function Weights
corAR1

AR(1) Correlation Structure
summary.lme

Summarize an lme Object
anova.lme

Compare Likelihoods of Fitted Objects
corSpher

Spherical Correlation Structure
coef.gnls

Extract gnls Coefficients
varExp

Exponential Variance Function
nlmeControl

Control Values for nlme Fit
phenoModel

Model function for the Phenobarb data
varFixed

Fixed Variance Function
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
recalc.corStruct

Recalculate for corStruct Object
nlme.nlsList

NLME fit from nlsList Object
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
getCovariate

Extract Covariate from an Object
pdIdent

Multiple of the Identity Positive-Definite Matrix
qqnorm.gls

Normal Plot of Residuals from a gls Object
nlsList

List of nls Objects with a Common Model
plot.intervals.lmList

Plot lmList Confidence Intervals
predict.lmList

Predictions from an lmList Object
predict.lme

Predictions from an lme Object
print.summary.pdMat

Print a summary.pdMat Object
residuals.gnlsStruct

Calculate gnlsStruct Residuals
summary.nlsList

Summarize an nlsList Object
lme.lmList

LME fit from lmList Object
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
getCovariate.corStruct

Extract corStruct Object Covariate
fitted.lmList

Extract lmList Fitted Values
Variogram.default

Calculate Semi-variogram
update.varFunc

Update varFunc Object
plot.nmGroupedData

Plot an nmGroupedData Object
plot.gls

Plot a gls Object
gnlsObject

Fitted gnls Object
fdHess

Finite difference Hessian
getData

Extract Data from an Object
corSymm

General Correlation Structure
qqnorm.lme

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

Positive-Definite Matrix
formula.pdBlocked

Extract pdBlocked Formula
intervals

Confidence Intervals on Coefficients
isBalanced

Check a Design for Balance
print.varFunc

Print a varFunc Object
residuals.lmList

Extract lmList Residuals
getCovariate.data.frame

Extract Data Frame Covariate
lmList.groupedData

lmList Fit from a groupedData Object
logDet.reStruct

Extract reStruct Log-Determinants
summary.varFunc

Summarize varFunc Object
getResponse

Extract Response Variable from an Object
lmeStruct

Linear Mixed-Effects Structure
intervals.lmList

Confidence Intervals on lmList Coefficients
logLik.gnls

Log-Likelihood of a gnls Object
plot.ranef.lme

Plot a ranef.lme Object
glsStruct

Generalized Least Squares Structure
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
getResponseFormula

Extract Formula Specifying Response Variable
recalc.reStruct

Recalculate for an reStruct Object
residuals.nlmeStruct

Calculate nlmeStruct Residuals
groupedData

Construct a groupedData Object
gnlsStruct

Generalized Nonlinear Least Squares Structure
logDet.corStruct

Extract corStruct Log-Determinant
logDet.pdMat

Extract Log-Determinant from a pdMat Object
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
logLik.corStruct

Extract corStruct Log-Likelihood
plot.ranef.lmList

Plot a ranef.lmList Object
predict.gls

Predictions from a gls Object
ranef.lme

Extract lme Random Effects
fixef.lmList

Extract lmList Fixed Effects
gnls

Fit Nonlinear Model Using Generalized Least Squares
gls

Fit Linear Model Using Generalized Least Squares
lme

Linear Mixed-Effects Models
solve.reStruct

Apply Solve to an reStruct Object
pdMatrix.reStruct

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

Diagonal Positive-Definite Matrix
lmeControl

Control Values for lme Fit
pairs.compareFits

Pairs Plot of compareFits Object
lme.groupedData

LME fit from groupedData Object
predict.nlme

Predictions from an nlme Object
corExp

Exponential Correlation Structure
nlmeObject

Fitted nlme Object
pdFactor

Square-Root Factor of a Positive-Definite Matrix
getGroups.lme

Extract lme Object Groups
logLik.glsStruct

Log-Likelihood of a glsStruct Object
recalc.modelStruct

Recalculate for a modelStruct Object
ranef.lmList

Extract lmList Random Effects
plot.lme

Plot an lme or nls object
quinModel

Model function for the Quinidine data
plot.Variogram

Plot a Variogram Object
pooledSD

Extract Pooled Standard Deviation
pairs.lmList

Pairs Plot of an lmList Object
intervals.gls

Confidence Intervals on gls Parameters
glsControl

Control Values for gls Fit
update.modelStruct

Update a modelStruct Object
fixed.effects

Extract Fixed Effects
corLin

Linear Correlation Structure
residuals.glsStruct

Calculate glsStruct Residuals
getGroups.lmList

Extract lmList Object Groups
logLik.lme

Log-Likelihood of an lme Object
gnlsControl

Control Values for gnls Fit
fitted.lmeStruct

Calculate lmeStruct Fitted Values
logLik.lmList

Log-Likelihood of an lmList Object
formula.reStruct

Extract reStruct Object Formula
Pixel

X-ray pixel intensities over time
RatPupWeight

The weight of rat pups
Assay

Bioassay on Cell Culture Plate
Tetracycline1

Pharmacokinetics of tetracycline
Glucose

Glucose levels over time
Soybean

Growth of soybean plants
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
IGF

Radioimmunoassay of IGF-I Protein
Cefamandole

Pharmacokinetics of Cefamandole
Dialyzer

High-Flux Hemodialyzer
BodyWeight

Rat weight over time for different diets
Tetracycline2

Pharmacokinetics of tetracycline
Quinidine

Quinidine Kinetics
Remifentanil

Pharmacokinetics of remifentanil
Rail

Evaluation of Stress in Railway Rails
PBG

Effect of Phenylbiguanide on Blood Pressure
Muscle

Contraction of heart muscle sections
bdf

Language scores
Machines

Productivity Scores for Machines and Workers
Spruce

Growth of Spruce Trees
Wheat

Yields by growing conditions
Gun

Methods for firing naval guns
Milk

Protein content of cows' milk
MathAchieve

Mathematics achievement scores
Glucose2

Glucose Levels Following Alcohol Ingestion
Oats

Split-plot Experiment on Varieties of Oats
Wheat2

Wheat Yield Trials
Orthodont

Growth curve data on an orthdontic measurement
Wafer

Modeling of Analog MOS Circuits
Relaxin

Assay for Relaxin
MathAchSchool

School demographic data for MathAchieve
Oxide

Variability in Semiconductor Manufacturing
Meat

Tenderness of meat
Ovary

Counts of Ovarian Follicles
Nitrendipene

Assay of nitrendipene
Phenobarb

Phenobarbitol Kinetics
Gasoline

Refinery yield of gasoline
Oxboys

Heights of Boys in Oxford
ergoStool

Ergometrics experiment with stool types
Earthquake

Earthquake Intensity
Fatigue

Cracks caused by metal fatigue