Learn R Programming

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

nlme (version 3.1-83)

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

License

GPL version 2 or later

Maintainer

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

Last Published

March 31st, 2025

Functions in nlme (3.1-83)

getGroupsFormula

Extract Grouping Formula
pdConstruct

Construct pdMat Objects
intervals.lmList

Confidence Intervals on lmList Coefficients
ACF.gls

Autocorrelation Function for gls Residuals
balancedGrouped

Create a groupedData object from a matrix
asTable

Convert groupedData to a matrix
plot.ACF

Plot an ACF Object
recalc.varFunc

Recalculate for varFunc Object
simulate.lme

Simulate results from lme models
residuals.nlmeStruct

Calculate nlmeStruct Residuals
varConstPower

Constant Plus Power Variance Function
pooledSD

Extract Pooled Standard Deviation
residuals.gnlsStruct

Calculate gnlsStruct Residuals
summary.pdMat

Summarize a pdMat Object
pdNatural

General Positive-Definite Matrix in Natural Parametrization
intervals.gls

Confidence Intervals on gls Parameters
ACF.lme

Autocorrelation Function for lme Residuals
Coef

Assign Values to Coefficients
coef.varFunc

varFunc Object Coefficients
coef.pdMat

pdMat Object Coefficients
corGaus

Gaussian Correlation Structure
fixed.effects

Extract Fixed Effects
collapse

Collapse According to Groups
ACF

Autocorrelation Function
coef.reStruct

reStruct Object Coefficients
glsObject

Fitted gls Object
needUpdate

Check if Update is Needed
varWeights

Extract Variance Function Weights
gapply

Apply a Function by Groups
varWeights.lmeStruct

Variance Weights for lmeStruct Object
varWeights.glsStruct

Variance Weights for glsStruct Object
getGroups.data.frame

Extract Groups from a Data Frame
getCovariate

Extract Covariate from an Object
Covariate

Assign Covariate Values
plot.gls

Plot a gls Object
residuals.gls

Extract gls Residuals
recalc.corStruct

Recalculate for corStruct Object
varExp

Exponential Variance Function
update.varFunc

Update varFunc Object
getResponseFormula

Extract Formula Specifying Response Variable
lmeScale

Scale for lme Optimization
glsControl

Control Values for gls Fit
compareFits

Compare Fitted Objects
corFactor

Factor of a Correlation Matrix
fixef.lmList

Extract lmList Fixed Effects
corNatural

General correlation in natural parameterization
isInitialized

Check if Object is Initialized
pdSymm

General Positive-Definite Matrix
summary.lmList

Summarize an lmList Object
getCovariate.varFunc

Extract varFunc Covariate
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
formula.reStruct

Extract reStruct Object Formula
getCovariate.corStruct

Extract corStruct Object Covariate
formula.pdMat

Extract pdMat Formula
recalc

Recalculate Condensed Linear Model Object
getCovariateFormula

Extract Covariates Formula
coef.gnls

Extract gnls Coefficients
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
getGroups

Extract Grouping Factors from an Object
coef.lmList

Extract lmList Coefficients
Dim.pdMat

Dimensions of a pdMat Object
splitFormula

Split a Formula
Initialize

Initialize Object
solve.reStruct

Apply Solve to an reStruct Object
pdDiag

Diagonal Positive-Definite Matrix
varComb

Combination of Variance Functions
pairs.compareFits

Pairs Plot of compareFits Object
getData.lmList

Extract lmList Object Data
qqnorm.lme

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

Variance Function Structure
pairs.lmList

Pairs Plot of an lmList Object
predict.nlme

Predictions from an nlme Object
corCompSymm

Compound Symmetry Correlation Structure
print.varFunc

Print a varFunc Object
getData

Extract Data from an Object
getData.gls

Extract gls Object Data
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
residuals.lmeStruct

Calculate lmeStruct Residuals
[.pdMat

Subscript a pdMat Object
coef.lme

Extract lme Coefficients
Dim.corStruct

Dimensions of a corStruct Object
residuals.lmList

Extract lmList Residuals
varIdent

Constant Variance Function
gnlsObject

Fitted gnls Object
predict.lmList

Predictions from an lmList Object
recalc.modelStruct

Recalculate for a modelStruct Object
summary.gls

Summarize a gls Object
BIC.logLik

BIC of a logLik Object
glsStruct

Generalized Least Squares Structure
getGroups.gls

Extract gls Object Groups
getData.lme

Extract lme Object Data
getGroups.lme

Extract lme Object Groups
getGroups.varFunc

Extract varFunc Groups
getVarCov

Extract variance-covariance matrix
intervals

Confidence Intervals on Coefficients
predict.lme

Predictions from an lme Object
predict.gls

Predictions from a gls Object
phenoModel

Model function for the Phenobarb data
Names.pdMat

Names of a pdMat Object
lme.groupedData

LME fit from groupedData Object
gls

Fit Linear Model Using Generalized Least Squares
isBalanced

Check a Design for Balance
residuals.glsStruct

Calculate glsStruct Residuals
predict.gnls

Predictions from a gnls Object
fitted.glsStruct

Calculate glsStruct Fitted Values
fitted.lmList

Extract lmList Fitted Values
corARMA

ARMA(p,q) Correlation Structure
lmList.groupedData

lmList Fit from a groupedData Object
corCAR1

Continuous AR(1) Correlation Structure
Initialize.varFunc

Initialize varFunc Object
quinModel

Model function for the Quinidine data
intervals.lme

Confidence Intervals on lme Parameters
LDEsysMat

Generate system matrix for LDEs
varClasses

Variance Function Classes
nlmeControl

Control Values for nlme Fit
residuals.lme

Extract lme Residuals
fitted.lmeStruct

Calculate lmeStruct Fitted Values
corAR1

AR(1) Correlation Structure
getCovariate.data.frame

Extract Data Frame Covariate
reStruct

Random Effects Structure
corSymm

General Correlation Structure
coef.corStruct

Coefficients of a corStruct Object
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
nlsList

List of nls Objects with a Common Model
BIC

Bayesian Information Criterion
logLik.varFunc

Extract varFunc logLik
gsummary

Summarize by Groups
gnls

Fit Nonlinear Model Using Generalized Least Squares
lmeControl

Control Values for lme Fit
gnlsStruct

Generalized Nonlinear Least Squares Structure
Matrix

Assign Matrix Values
pdFactor.reStruct

Extract Square-Root Factor from Components of an reStruct Object
Initialize.corStruct

Initialize corStruct Object
ranef.lme

Extract lme Random Effects
getGroups.lmList

Extract lmList Object Groups
Dim.corSpatial

Dimensions of a corSpatial Object
summary.corStruct

Summarize a corStruct Object
gnlsControl

Control Values for gnls Fit
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
varPower

Power Variance Function
random.effects

Extract Random Effects
summary.nlsList

Summarize an nlsList Object
corExp

Exponential Correlation Structure
formula.pdBlocked

Extract pdBlocked Formula
getGroups.corStruct

Extract corStruct Groups
corSpher

Spherical Correlation Structure
ranef.lmList

Extract lmList Random Effects
recalc.reStruct

Recalculate for an reStruct Object
Initialize.glsStruct

Initialize a glsStruct Object
coef.modelStruct

Extract modelStruct Object Coefficients
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
pdLogChol

General Positive-Definite Matrix
Names.reStruct

Names of an reStruct Object
logLik.lmList

Log-Likelihood of an lmList Object
corFactor.corStruct

Factor of a corStruct Object Matrix
comparePred

Compare Predictions
logDet.pdMat

Extract Log-Determinant from a pdMat Object
lmList

List of lm Objects with a Common Model
nlme

Nonlinear Mixed-Effects Models
nlmeObject

Fitted nlme Object
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
print.summary.pdMat

Print a summary.pdMat Object
collapse.groupedData

Collapse a groupedData Object
plot.intervals.lmList

Plot lmList Confidence Intervals
pdClasses

Positive-Definite Matrix Classes
plot.Variogram

Plot a Variogram Object
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
logLik.reStruct

Calculate reStruct Log-Likelihood
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
pdIdent

Multiple of the Identity Positive-Definite Matrix
qqnorm.gls

Normal Plot of Residuals from a gls Object
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
summary.modelStruct

Summarize a modelStruct Object
Initialize.reStruct

Initialize reStruct Object
corMatrix.corStruct

Matrix of a corStruct Object
plot.nffGroupedData

Plot an nffGroupedData Object
allCoef

Extract Coefficients from a Set of Objects
corLin

Linear Correlation Structure
logDet.reStruct

Extract reStruct Log-Determinants
Variogram.corLin

Calculate Semi-variogram for a corLin Object
corClasses

Correlation Structure Classes
Variogram.default

Calculate Semi-variogram
nlme.nlsList

NLME fit from nlsList Object
Initialize.lmeStruct

Initialize an lmeStruct Object
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
Dim

Extract Dimensions from an Object
plot.lmList

Plot an lmList Object
corRatio

Rational Quadratic Correlation Structure
summary.lme

Summarize an lme Object
plot.nmGroupedData

Plot an nmGroupedData Object
Matrix.reStruct

Assign reStruct Matrices
summary.varFunc

Summarize varFunc Object
lmeStruct

Linear Mixed-Effects Structure
Covariate.varFunc

Assign varFunc Covariate
corSpatial

Spatial Correlation Structure
pdConstruct.pdBlocked

Construct pdBlocked Objects
pdBlocked

Positive-Definite Block Diagonal Matrix
logLik.gnls

Log-Likelihood of a gnls Object
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
logDet

Extract the Logarithm of the Determinant
lmeObject

Fitted lme Object
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
as.matrix.pdMat

Matrix of a pdMat Object
augPred

Augmented Predictions
corMatrix

Extract Correlation Matrix
logDet.corStruct

Extract corStruct Log-Determinant
getResponse

Extract Response Variable from an Object
groupedData

Construct a groupedData Object
pdMat

Positive-Definite Matrix
asOneFormula

Combine Formulas of a Set of Objects
plot.nfnGroupedData

Plot an nfnGroupedData Object
nlmeStruct

Nonlinear Mixed-Effects Structure
as.matrix.corStruct

Matrix of a corStruct Object
plot.ranef.lmList

Plot a ranef.lmList Object
fdHess

Finite difference Hessian
logLik.glsStruct

Log-Likelihood of a glsStruct Object
anova.lme

Compare Likelihoods of Fitted Objects
lme

Linear Mixed-Effects Models
nlsList.selfStart

nlsList Fit from a selfStart Function
pdMatrix.reStruct

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

Pairs Plot of an lme Object
pdMatrix

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

Log-Likelihood of an lme Object
varFixed

Fixed Variance Function
update.modelStruct

Update a modelStruct Object
anova.gls

Compare Likelihoods of Fitted Objects
Variogram

Calculate Semi-variogram
pdFactor

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

Calculate Semi-variogram for Residuals from an lme Object
plot.compareFits

Plot a compareFits Object
fitted.lme

Extract lme Fitted Values
plot.ranef.lme

Plot a ranef.lme Object
model.matrix.reStruct

reStruct Model Matrix
plot.lme

Plot an lme or nls object
plot.augPred

Plot an augPred Object
Variogram.corExp

Calculate Semi-variogram for a corExp Object
Matrix.pdMat

Assign Matrix to a pdMat Object
VarCorr

Extract variance and correlation components
Names.pdBlocked

Names of a pdBlocked Object
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
lme.lmList

LME fit from lmList Object
Names

Names Associated with an Object
Names.formula

Extract Names from a formula
as.matrix.reStruct

Matrices of an reStruct Object
logLik.corStruct

Extract corStruct Log-Likelihood
BodyWeight

Rat weight over time for different diets
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Relaxin

Assay for Relaxin
MathAchieve

Mathematics achievement scores
Fatigue

Cracks caused by metal fatigue
Muscle

Contraction of heart muscle sections
Gasoline

Refinery yield of gasoline
Meat

Tenderness of meat
Oxboys

Heights of Boys in Oxford
MathAchSchool

School demographic data for MathAchieve
Milk

Protein content of cows' milk
Soybean

Growth of soybean plants
Remifentanil

Pharmacokinetics of remifentanil
Nitrendipene

Assay of nitrendipene
Quinidine

Quinidine Kinetics
Machines

Productivity Scores for Machines and Workers
bdf

Language scores
Earthquake

Earthquake Intensity
Dialyzer

High-Flux Hemodialyzer
Ovary

Counts of Ovarian Follicles
Gun

Methods for firing naval guns
RatPupWeight

The weight of rat pups
Wheat2

Wheat Yield Trials
IGF

Radioimmunoassay of IGF-I Protein
Glucose2

Glucose Levels Following Alcohol Ingestion
Oats

Split-plot Experiment on Varieties of Oats
Cefamandole

Pharmacokinetics of Cefamandole
Phenobarb

Phenobarbitol Kinetics
Glucose

Glucose levels over time
Rail

Evaluation of Stress in Railway Rails
PBG

Effect of Phenylbiguanide on Blood Pressure
Tetracycline1

Pharmacokinetics of tetracycline
Tetracycline2

Pharmacokinetics of tetracycline
ergoStool

Ergometrics experiment with stool types
Assay

Bioassay on Cell Culture Plate
Spruce

Growth of Spruce Trees
Oxide

Variability in Semiconductor Manufacturing
Orthodont

Growth curve data on an orthdontic measurement
Wafer

Modeling of Analog MOS Circuits
Pixel

X-ray pixel intensities over time
Wheat

Yields by growing conditions