Learn R Programming

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

nlme (version 3.1-53)

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

90,510

Version

3.1-53

License

GPL version 2 or later

Maintainer

Douglas Bates

Last Published

March 31st, 2025

Functions in nlme (3.1-53)

as.matrix.pdMat

Matrix of a pdMat Object
glsStruct

Generalized Least Squares Structure
fitted.lmList

Extract lmList Fitted Values
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
pdMatrix

Extract Matrix or Square-Root Factor from a pdMat Object
pdNatural

General Positive-Definite Matrix in Natural Parametrization
getResponse

Extract Response Variable from an Object
getGroups.lmList

Extract lmList Object Groups
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
gapply

Apply a Function by Groups
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
logLik.lme

Log-Likelihood of an lme Object
pdClasses

Positive-Definite Matrix Classes
[.pdMat

Subscript a pdMat Object
Covariate

Assign Covariate Values
Initialize.glsStruct

Initialize a glsStruct Object
coef.pdMat

pdMat Object Coefficients
lmeStruct

Linear Mixed-Effects Structure
collapse

Collapse According to Groups
varComb

Combination of Variance Functions
nlsList

List of nls Objects with a Common Model
Initialize.corStruct

Initialize corStruct Object
plot.Variogram

Plot a Variogram Object
Initialize

Initialize Object
getCovariate.corStruct

Extract corStruct Object Covariate
recalc

Recalculate Condensed Linear Model Object
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
phenoModel

Model function for the Phenobarb data
allCoef

Extract Coefficients from a Set of Objects
plot.nfnGroupedData

Plot an nfnGroupedData Object
varFunc

Variance Function Structure
quinModel

Model function for the Quinidine data
getGroups.lme

Extract lme Object Groups
predict.gls

Predictions from a gls Object
BIC.logLik

BIC of a logLik Object
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
summary.nlsList

Summarize an nlsList Object
print.varFunc

Print a varFunc Object
plot.nmGroupedData

Plot an nmGroupedData Object
logDet.corStruct

Extract corStruct Log-Determinant
glsControl

Control Values for gls Fit
logLik.reStruct

Calculate reStruct Log-Likelihood
lmeObject

Fitted lme Object
intervals.gls

Confidence Intervals on gls Parameters
getData.lmList

Extract lmList Object Data
lmList.groupedData

lmList Fit from a groupedData Object
residuals.glsStruct

Calculate glsStruct Residuals
gnls

Fit Nonlinear Model Using Generalized Least Squares
collapse.groupedData

Collapse a groupedData Object
plot.intervals.lmList

Plot lmList Confidence Intervals
pairs.compareFits

Pairs Plot of compareFits Object
fitted.lmeStruct

Calculate lmeStruct Fitted Values
logDet.pdMat

Extract Log-Determinant from a pdMat Object
glsObject

Fitted gls Object
qqnorm.gls

Normal Plot of Residuals from a gls Object
residuals.lmList

Extract lmList Residuals
corGaus

Gaussian Correlation Structure
residuals.gnlsStruct

Calculate gnlsStruct Residuals
plot.gls

Plot a gls Object
nlmeStruct

Nonlinear Mixed-Effects Structure
pdMatrix.reStruct

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

Exponential Variance Function
pdLogChol

General Positive-Definite Matrix
Dim

Extract Dimensions from an Object
gnlsStruct

Generalized Nonlinear Least Squares Structure
corCAR1

Continuous AR(1) Correlation Structure
pooledSD

Extract Pooled Standard Deviation
getGroups.corStruct

Extract corStruct Groups
summary.gls

Summarize a gls Object
Names.pdBlocked

Names of a pdBlocked Object
Initialize.lmeStruct

Initialize an lmeStruct Object
Dim.corStruct

Dimensions of a corStruct Object
fixed.effects

Extract Fixed Effects
getGroups.varFunc

Extract varFunc Groups
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
BIC

Bayesian Information Criterion
getData.lme

Extract lme Object Data
getData.gls

Extract gls Object Data
fitted.lme

Extract lme Fitted Values
getCovariate.data.frame

Extract Data Frame Covariate
getGroupsFormula

Extract Grouping Formula
Initialize.reStruct

Initialize reStruct Object
getCovariate

Extract Covariate from an Object
Covariate.varFunc

Assign varFunc Covariate
Initialize.varFunc

Initialize varFunc Object
Dim.corSpatial

Dimensions of a corSpatial Object
ACF.lme

Autocorrelation Function for lme Residuals
lme.groupedData

LME fit from groupedData Object
logLik.glsStruct

Log-Likelihood of a glsStruct Object
logDet.reStruct

Extract reStruct Log-Determinants
lme

Linear Mixed-Effects Models
isBalanced

Check a Design for Balance
nlmeObject

Fitted nlme Object
Coef

Assign Values to Coefficients
nlme.nlsList

NLME fit from nlsList Object
isInitialized

Check if Object is Initialized
getGroups.data.frame

Extract Groups from a Data Frame
gls

Fit Linear Model Using Generalized Least Squares
getCovariate.varFunc

Extract varFunc Covariate
nlmeControl

Control Values for nlme Fit
fixef.lmList

Extract lmList Fixed Effects
groupedData

Construct a groupedData Object
Variogram.gls

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

Autocorrelation Function for gls Residuals
getCovariateFormula

Extract Covariates Formula
intervals.lmList

Confidence Intervals on lmList Coefficients
formula.pdBlocked

Extract pdBlocked Formula
Matrix.reStruct

Assign reStruct Matrices
anova.lme

Compare Likelihoods of Fitted Objects
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
getGroups

Extract Grouping Factors from an Object
gsummary

Summarize by Groups
Variogram.corExp

Calculate Semi-variogram for a corExp Object
as.matrix.reStruct

Matrices of an reStruct Object
getVarCov

Extract variance-covariance matrix
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
intervals.lme

Confidence Intervals on lme Parameters
as.matrix.corStruct

Matrix of a corStruct Object
Variogram.corLin

Calculate Semi-variogram for a corLin Object
asTable

Convert groupedData to a matrix
balancedGrouped

Create a groupedData object from a matrix
augPred

Augmented Predictions
coef.varFunc

varFunc Object Coefficients
coef.reStruct

reStruct Object Coefficients
VarCorr

Extract variance and correlation components
Variogram.default

Calculate Semi-variogram
corSymm

General Correlation Structure
corMatrix.corStruct

Matrix of a corStruct Object
corFactor

Factor of a Correlation Matrix
coef.modelStruct

Extract modelStruct Object Coefficients
fdHess

Finite difference Hessian
fitted.glsStruct

Calculate glsStruct Fitted Values
gnlsControl

Control Values for gnls Fit
formula.pdMat

Extract pdMat Formula
compareFits

Compare Fitted Objects
contr.SAS

Contrast Matrices
asOneFormula

Combine Formulas of a Set of Objects
Variogram

Calculate Semi-variogram
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
anova.gls

Compare Likelihoods of Fitted Objects
getData

Extract Data from an Object
Matrix.pdMat

Assign Matrix to a pdMat Object
Matrix

Assign Matrix Values
Names

Names Associated with an Object
LDEsysMat

Generate system matrix for LDEs
ACF

Autocorrelation Function
corNatural

General correlation in natural parameterization
Names.reStruct

Names of an reStruct Object
corAR1

AR(1) Correlation Structure
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
corSpher

Spherical Correlation Structure
comparePred

Compare Predictions
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
corExp

Exponential Correlation Structure
corMatrix

Extract Correlation Matrix
corLin

Linear Correlation Structure
formula.reStruct

Extract reStruct Object Formula
corSpatial

Spatial Correlation Structure
getGroups.gls

Extract gls Object Groups
plot.ranef.lmList

Plot a ranef.lmList Object
gnlsObject

Fitted gnls Object
plot.ranef.lme

Plot a ranef.lme Object
corARMA

ARMA(p,q) Correlation Structure
predict.lmList

Predictions from an lmList Object
predict.gnls

Predictions from a gnls Object
predict.lme

Predictions from an lme Object
predict.nlme

Predictions from an nlme Object
print.summary.pdMat

Print a summary.pdMat Object
Names.formula

Extract Names from a formula
Names.pdMat

Names of a pdMat Object
corRatio

Rational Quadratic Correlation Structure
pdMat

Positive-Definite Matrix
coef.lme

Extract lme Coefficients
corClasses

Correlation Structure Classes
corFactor.corStruct

Factor of a corStruct Object Matrix
coef.lmList

Extract lmList Coefficients
getResponseFormula

Extract Formula Specifying Response Variable
coef.gnls

Extract gnls Coefficients
Dim.pdMat

Dimensions of a pdMat Object
lmList

List of lm Objects with a Common Model
coef.corStruct

Coefficients of a corStruct Object
needUpdate

Check if Update is Needed
intervals

Confidence Intervals on Coefficients
lme.lmList

LME fit from lmList Object
pairs.lmList

Pairs Plot of an lmList Object
logDet

Extract the Logarithm of the Determinant
nlme

Nonlinear Mixed-Effects Models
logLik.varFunc

Extract varFunc logLik
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
pdBlocked

Positive-Definite Block Diagonal Matrix
nlsList.selfStart

nlsList Fit from a selfStart Function
lmeControl

Control Values for lme Fit
pdConstruct.pdBlocked

Construct pdBlocked Objects
model.matrix.reStruct

reStruct Model Matrix
pairs.lme

Pairs Plot of an lme Object
lmeScale

Scale for lme Optimization
logLik.lmList

Log-Likelihood of an lmList Object
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
pdDiag

Diagonal Positive-Definite Matrix
pdConstruct

Construct pdMat Objects
logLik.corStruct

Extract corStruct Log-Likelihood
logLik.gnls

Log-Likelihood of a gnls Object
solve.reStruct

Apply Solve to an reStruct Object
splitFormula

Split a Formula
residuals.nlmeStruct

Calculate nlmeStruct Residuals
simulate.lme

simulate lme models
summary.modelStruct

Summarize a modelStruct Object
corCompSymm

Compound Symmetry Correlation Structure
summary.lmList

Summarize an lmList Object
summary.lme

Summarize an lme Object
summary.corStruct

Summarize a corStruct Object
update.varFunc

Update varFunc Object
residuals.lmeStruct

Calculate lmeStruct Residuals
varPower

Power Variance Function
varIdent

Constant Variance Function
varWeights.lmeStruct

Variance Weights for lmeStruct Object
recalc.corStruct

Recalculate for corStruct Object
ranef.lme

Extract lme Random Effects
qqnorm.lme

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

Extract lme Residuals
plot.lmList

Plot an lmList Object
random.effects

Extract Random Effects
pdSymm

General Positive-Definite Matrix
plot.compareFits

Plot a compareFits Object
plot.augPred

Plot an augPred Object
plot.ACF

Plot an ACF Object
plot.lme

Plot an lme or nls object
plot.nffGroupedData

Plot an nffGroupedData Object
recalc.varFunc

Recalculate for varFunc Object
residuals.gls

Extract gls Residuals
recalc.reStruct

Recalculate for an reStruct Object
ranef.lmList

Extract lmList Random Effects
reStruct

Random Effects Structure
recalc.modelStruct

Recalculate for a modelStruct Object
update.modelStruct

Update a modelStruct Object
varWeights.glsStruct

Variance Weights for glsStruct Object
varClasses

Variance Function Classes
varFixed

Fixed Variance Function
varConstPower

Constant Plus Power Variance Function
summary.varFunc

Summarize varFunc Object
summary.pdMat

Summarize a pdMat Object
varWeights

Extract Variance Function Weights
pdFactor

Square-Root Factor of a Positive-Definite Matrix
pdIdent

Multiple of the Identity Positive-Definite Matrix
pdFactor.reStruct

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

Variability in Semiconductor Manufacturing
Phenobarb

Phenobarbitol Kinetics
Oats

Split-plot Experiment on Varieties of Oats
Wheat2

Wheat Yield Trials
Rail

Evaluation of Stress in Railway Rails
Gun

Methods for firing naval guns
Remifentanil

Pharmacokinetics of remifentanil
MathAchSchool

School demographic data for MathAchieve
Orthodont

Growth curve data on an orthdontic measurement
Meat

Tenderness of meat
Gasoline

Refinery yield of gasoline
IGF

Radioimmunoassay of IGF-I Protein
Relaxin

Assay for Relaxin
bdf

Language scores
Fatigue

Cracks caused by metal fatigue
Machines

Productivity Scores for Machines and Workers
RatPupWeight

The weight of rat pups
Cefamandole

Pharmacokinetics of Cefamandole
Pixel

X-ray pixel intensities over time
Wheat

Yields by growing conditions
Nitrendipene

Assay of nitrendipene
Ovary

Counts of Ovarian Follicles
Milk

Protein content of cows' milk
Soybean

Growth of soybean plants
ergoStool

Ergometrics experiment with stool types
Wafer

Modeling of Analog MOS Circuits
Oxboys

Heights of Boys in Oxford
Tetracycline2

Pharmacokinetics of tetracycline
MathAchieve

Mathematics achievement scores
Glucose

Glucose levels over time
Dialyzer

High-Flux Hemodialyzer
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Tetracycline1

Pharmacokinetics of tetracycline
Earthquake

Earthquake Intensity
Glucose2

Glucose Levels Following Alcohol Ingestion
Quinidine

Quinidine Kinetics
Spruce

Growth of Spruce Trees
Assay

Bioassay on Cell Culture Plate
BodyWeight

Rat weight over time for different diets
Muscle

Contraction of heart muscle sections
PBG

Effect of Phenylbiguanide on Blood Pressure