Learn R Programming

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

nlme (version 3.1-80)

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

84,769

Version

3.1-80

License

GPL version 2 or later

Maintainer

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

Last Published

March 31st, 2025

Functions in nlme (3.1-80)

Covariate

Assign Covariate Values
Initialize.glsStruct

Initialize a glsStruct Object
Initialize.varFunc

Initialize varFunc Object
Covariate.varFunc

Assign varFunc Covariate
ACF.lme

Autocorrelation Function for lme Residuals
BIC

Bayesian Information Criterion
Coef

Assign Values to Coefficients
[.pdMat

Subscript a pdMat Object
Names

Names Associated with an Object
Variogram.default

Calculate Semi-variogram
Matrix.pdMat

Assign Matrix to a pdMat Object
Matrix.reStruct

Assign reStruct Matrices
corClasses

Correlation Structure Classes
LDEsysMat

Generate system matrix for LDEs
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
Matrix

Assign Matrix Values
formula.pdMat

Extract pdMat Formula
predict.gnls

Predictions from a gnls Object
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
collapse

Collapse According to Groups
varExp

Exponential Variance Function
update.varFunc

Update varFunc Object
varWeights.glsStruct

Variance Weights for glsStruct Object
residuals.gnlsStruct

Calculate gnlsStruct Residuals
intervals.lmList

Confidence Intervals on lmList Coefficients
summary.varFunc

Summarize varFunc Object
predict.lme

Predictions from an lme Object
intervals.gls

Confidence Intervals on gls Parameters
summary.nlsList

Summarize an nlsList Object
Dim.pdMat

Dimensions of a pdMat Object
asOneFormula

Combine Formulas of a Set of Objects
lme.lmList

LME fit from lmList Object
Variogram.corExp

Calculate Semi-variogram for a corExp Object
Dim

Extract Dimensions from an Object
ACF

Autocorrelation Function
corNatural

General correlation in natural parameterization
Dim.corSpatial

Dimensions of a corSpatial Object
coef.pdMat

pdMat Object Coefficients
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
Names.pdBlocked

Names of a pdBlocked Object
random.effects

Extract Random Effects
Names.reStruct

Names of an reStruct Object
asTable

Convert groupedData to a matrix
compareFits

Compare Fitted Objects
as.matrix.pdMat

Matrix of a pdMat Object
coef.gnls

Extract gnls Coefficients
corAR1

AR(1) Correlation Structure
varWeights.lmeStruct

Variance Weights for lmeStruct Object
fixef.lmList

Extract lmList Fixed Effects
splitFormula

Split a Formula
fitted.lmList

Extract lmList Fitted Values
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
Names.pdMat

Names of a pdMat Object
corExp

Exponential Correlation Structure
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
fitted.lme

Extract lme Fitted Values
fdHess

Finite difference Hessian
corCAR1

Continuous AR(1) Correlation Structure
fitted.lmeStruct

Calculate lmeStruct Fitted Values
fixed.effects

Extract Fixed Effects
getGroupsFormula

Extract Grouping Formula
getResponse

Extract Response Variable from an Object
Names.formula

Extract Names from a formula
getGroups.lmList

Extract lmList Object Groups
predict.nlme

Predictions from an nlme Object
Variogram.corLin

Calculate Semi-variogram for a corLin Object
Variogram

Calculate Semi-variogram
summary.pdMat

Summarize a pdMat Object
getData.gls

Extract gls Object Data
varPower

Power Variance Function
getGroups.data.frame

Extract Groups from a Data Frame
getGroups.gls

Extract gls Object Groups
corSymm

General Correlation Structure
Initialize.corStruct

Initialize corStruct Object
plot.nfnGroupedData

Plot an nfnGroupedData Object
residuals.glsStruct

Calculate glsStruct Residuals
getCovariate.data.frame

Extract Data Frame Covariate
varFixed

Fixed Variance Function
as.matrix.corStruct

Matrix of a corStruct Object
Initialize.reStruct

Initialize reStruct Object
residuals.lmList

Extract lmList Residuals
formula.reStruct

Extract reStruct Object Formula
intervals

Confidence Intervals on Coefficients
ACF.gls

Autocorrelation Function for gls Residuals
getGroups.lme

Extract lme Object Groups
pooledSD

Extract Pooled Standard Deviation
ranef.lmList

Extract lmList Random Effects
plot.ranef.lme

Plot a ranef.lme Object
corFactor.corStruct

Factor of a corStruct Object Matrix
pdSymm

General Positive-Definite Matrix
gnlsStruct

Generalized Nonlinear Least Squares Structure
logLik.varFunc

Extract varFunc logLik
augPred

Augmented Predictions
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
logDet.pdMat

Extract Log-Determinant from a pdMat Object
coef.lmList

Extract lmList Coefficients
corFactor

Factor of a Correlation Matrix
logLik.lme

Log-Likelihood of an lme Object
recalc.varFunc

Recalculate for varFunc Object
residuals.lmeStruct

Calculate lmeStruct Residuals
varConstPower

Constant Plus Power Variance Function
reStruct

Random Effects Structure
lmList

List of lm Objects with a Common Model
gnls

Fit Nonlinear Model Using Generalized Least Squares
allCoef

Extract Coefficients from a Set of Objects
recalc.reStruct

Recalculate for an reStruct Object
solve.reStruct

Apply Solve to an reStruct Object
lmeControl

Control Values for lme Fit
update.modelStruct

Update a modelStruct Object
summary.corStruct

Summarize a corStruct Object
print.summary.pdMat

Print a summary.pdMat Object
VarCorr

Extract variance and correlation components
getCovariate

Extract Covariate from an Object
logLik.lmList

Log-Likelihood of an lmList Object
corLin

Linear Correlation Structure
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
getData

Extract Data from an Object
corARMA

ARMA(p,q) Correlation Structure
groupedData

Construct a groupedData Object
corMatrix.corStruct

Matrix of a corStruct Object
getData.lme

Extract lme Object Data
getCovariate.corStruct

Extract corStruct Object Covariate
summary.lmList

Summarize an lmList Object
residuals.gls

Extract gls Residuals
predict.lmList

Predictions from an lmList Object
summary.gls

Summarize a gls Object
ranef.lme

Extract lme Random Effects
Initialize.lmeStruct

Initialize an lmeStruct Object
qqnorm.lme

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

Recalculate Condensed Linear Model Object
varIdent

Constant Variance Function
coef.corStruct

Coefficients of a corStruct Object
comparePred

Compare Predictions
nlsList.selfStart

nlsList Fit from a selfStart Function
recalc.corStruct

Recalculate for corStruct Object
residuals.lme

Extract lme Residuals
glsControl

Control Values for gls Fit
plot.nffGroupedData

Plot an nffGroupedData Object
lme.groupedData

LME fit from groupedData Object
getData.lmList

Extract lmList Object Data
summary.modelStruct

Summarize a modelStruct Object
simulate.lme

Simulate results from lme models
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
balancedGrouped

Create a groupedData object from a matrix
getVarCov

Extract variance-covariance matrix
gapply

Apply a Function by Groups
fitted.glsStruct

Calculate glsStruct Fitted Values
getGroups.corStruct

Extract corStruct Groups
coef.reStruct

reStruct Object Coefficients
Dim.corStruct

Dimensions of a corStruct Object
coef.lme

Extract lme Coefficients
getResponseFormula

Extract Formula Specifying Response Variable
needUpdate

Check if Update is Needed
intervals.lme

Confidence Intervals on lme Parameters
collapse.groupedData

Collapse a groupedData Object
corSpatial

Spatial Correlation Structure
pdNatural

General Positive-Definite Matrix in Natural Parametrization
corGaus

Gaussian Correlation Structure
pdConstruct

Construct pdMat Objects
getGroups

Extract Grouping Factors from an Object
lmeScale

Scale for lme Optimization
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
print.varFunc

Print a varFunc Object
glsStruct

Generalized Least Squares Structure
Initialize

Initialize Object
gls

Fit Linear Model Using Generalized Least Squares
coef.modelStruct

Extract modelStruct Object Coefficients
pdDiag

Diagonal Positive-Definite Matrix
logLik.glsStruct

Log-Likelihood of a glsStruct Object
recalc.modelStruct

Recalculate for a modelStruct Object
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
corSpher

Spherical Correlation Structure
getGroups.varFunc

Extract varFunc Groups
plot.augPred

Plot an augPred Object
pdFactor.reStruct

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

Positive-Definite Matrix
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
logLik.reStruct

Calculate reStruct Log-Likelihood
nlmeStruct

Nonlinear Mixed-Effects Structure
phenoModel

Model function for the Phenobarb data
pdMatrix

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

varFunc Object Coefficients
pairs.lme

Pairs Plot of an lme Object
gsummary

Summarize by Groups
anova.gls

Compare Likelihoods of Fitted Objects
anova.lme

Compare Likelihoods of Fitted Objects
lme

Linear Mixed-Effects Models
summary.lme

Summarize an lme Object
nlmeControl

Control Values for nlme Fit
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
getCovariateFormula

Extract Covariates Formula
logLik.gnls

Log-Likelihood of a gnls Object
residuals.nlmeStruct

Calculate nlmeStruct Residuals
pdConstruct.pdBlocked

Construct pdBlocked Objects
plot.lme

Plot an lme or nls object
pdClasses

Positive-Definite Matrix Classes
varWeights

Extract Variance Function Weights
predict.gls

Predictions from a gls Object
glsObject

Fitted gls Object
qqnorm.gls

Normal Plot of Residuals from a gls Object
plot.intervals.lmList

Plot lmList Confidence Intervals
nlmeObject

Fitted nlme Object
logDet.reStruct

Extract reStruct Log-Determinants
corMatrix

Extract Correlation Matrix
plot.ranef.lmList

Plot a ranef.lmList Object
gnlsObject

Fitted gnls Object
varFunc

Variance Function Structure
corRatio

Rational Quadratic Correlation Structure
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
isBalanced

Check a Design for Balance
corCompSymm

Compound Symmetry Correlation Structure
nlme.nlsList

NLME fit from nlsList Object
logDet.corStruct

Extract corStruct Log-Determinant
varComb

Combination of Variance Functions
lmeObject

Fitted lme Object
nlme

Nonlinear Mixed-Effects Models
isInitialized

Check if Object is Initialized
plot.nmGroupedData

Plot an nmGroupedData Object
formula.pdBlocked

Extract pdBlocked Formula
BIC.logLik

BIC of a logLik Object
pdIdent

Multiple of the Identity Positive-Definite Matrix
lmeStruct

Linear Mixed-Effects Structure
varClasses

Variance Function Classes
getCovariate.varFunc

Extract varFunc Covariate
as.matrix.reStruct

Matrices of an reStruct Object
model.matrix.reStruct

reStruct Model Matrix
nlsList

List of nls Objects with a Common Model
quinModel

Model function for the Quinidine data
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
pdBlocked

Positive-Definite Block Diagonal Matrix
pairs.lmList

Pairs Plot of an lmList Object
logDet

Extract the Logarithm of the Determinant
gnlsControl

Control Values for gnls Fit
logLik.corStruct

Extract corStruct Log-Likelihood
lmList.groupedData

lmList Fit from a groupedData Object
pdMatrix.reStruct

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

General Positive-Definite Matrix
plot.lmList

Plot an lmList Object
pairs.compareFits

Pairs Plot of compareFits Object
plot.ACF

Plot an ACF Object
pdFactor

Square-Root Factor of a Positive-Definite Matrix
plot.compareFits

Plot a compareFits Object
plot.gls

Plot a gls Object
plot.Variogram

Plot a Variogram Object
BodyWeight

Rat weight over time for different diets
Gun

Methods for firing naval guns
Glucose

Glucose levels over time
Cefamandole

Pharmacokinetics of Cefamandole
Earthquake

Earthquake Intensity
Glucose2

Glucose Levels Following Alcohol Ingestion
Milk

Protein content of cows' milk
Dialyzer

High-Flux Hemodialyzer
Assay

Bioassay on Cell Culture Plate
Fatigue

Cracks caused by metal fatigue
Phenobarb

Phenobarbitol Kinetics
MathAchieve

Mathematics achievement scores
Tetracycline1

Pharmacokinetics of tetracycline
Tetracycline2

Pharmacokinetics of tetracycline
Spruce

Growth of Spruce Trees
Rail

Evaluation of Stress in Railway Rails
Machines

Productivity Scores for Machines and Workers
Wafer

Modeling of Analog MOS Circuits
Remifentanil

Pharmacokinetics of remifentanil
Relaxin

Assay for Relaxin
PBG

Effect of Phenylbiguanide on Blood Pressure
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Muscle

Contraction of heart muscle sections
Soybean

Growth of soybean plants
Pixel

X-ray pixel intensities over time
Orthodont

Growth curve data on an orthdontic measurement
Oxboys

Heights of Boys in Oxford
IGF

Radioimmunoassay of IGF-I Protein
Oxide

Variability in Semiconductor Manufacturing
Nitrendipene

Assay of nitrendipene
Quinidine

Quinidine Kinetics
bdf

Language scores
ergoStool

Ergometrics experiment with stool types
MathAchSchool

School demographic data for MathAchieve
Oats

Split-plot Experiment on Varieties of Oats
Wheat2

Wheat Yield Trials
Gasoline

Refinery yield of gasoline
Meat

Tenderness of meat
Wheat

Yields by growing conditions
RatPupWeight

The weight of rat pups
Ovary

Counts of Ovarian Follicles