Learn R Programming

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

nlme (version 3.1-50)

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

93,277

Version

3.1-50

License

GPL version 2 or later

Maintainer

Douglas Bates

Last Published

March 31st, 2025

Functions in nlme (3.1-50)

getResponse

Extract Response Variable from an Object
logLik.glsStruct

Log-Likelihood of a glsStruct Object
Covariate

Assign Covariate Values
summary.varFunc

Summarize varFunc Object
summary.lmList

Summarize an lmList Object
Initialize

Initialize Object
LDEsysMat

Generate system matrix for LDEs
fitted.glsStruct

Calculate glsStruct Fitted Values
Variogram.default

Calculate Semi-variogram
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
compareFits

Compare Fitted Objects
corARMA

ARMA(p,q) Correlation Structure
coef.pdMat

pdMat Object Coefficients
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
getCovariate.data.frame

Extract Data Frame Covariate
getData.lme

Extract lme Object Data
fitted.lmeStruct

Calculate lmeStruct Fitted Values
getGroupsFormula

Extract Grouping Formula
getResponseFormula

Extract Formula Specifying Response Variable
lmList

List of lm Objects with a Common Model
lme.groupedData

LME fit from groupedData Object
logDet.corStruct

Extract corStruct Log-Determinant
intervals.lme

Confidence Intervals on lme Parameters
logLik.lmList

Log-Likelihood of an lmList Object
needUpdate

Check if Update is Needed
pdMat

Positive-Definite Matrix
pdMatrix.reStruct

Extract Matrix or Square-Root Factor from Components of an reStruct Object
plot.compareFits

Plot a compareFits Object
plot.lmList

Plot an lmList Object
plot.nmGroupedData

Plot an nmGroupedData Object
residuals.glsStruct

Calculate glsStruct Residuals
residuals.lmList

Extract lmList Residuals
residuals.nlmeStruct

Calculate nlmeStruct Residuals
summary.corStruct

Summarize a corStruct Object
varClasses

Variance Function Classes
varFunc

Variance Function Structure
varConstPower

Constant Plus Power Variance Function
ranef.lmList

Extract lmList Random Effects
ACF

Autocorrelation Function
Dim.corSpatial

Dimensions of a corSpatial Object
Coef

Assign Values to Coefficients
Initialize.lmeStruct

Initialize an lmeStruct Object
Matrix.pdMat

Assign Matrix to a pdMat Object
ACF.lme

Autocorrelation Function for lme Residuals
Covariate.varFunc

Assign varFunc Covariate
Names.formula

Extract Names from a formula
Matrix

Assign Matrix Values
Dim

Extract Dimensions from an Object
BIC

Bayesian Information Criterion
Dim.pdMat

Dimensions of a pdMat Object
Matrix.reStruct

Assign reStruct Matrices
Names.pdMat

Names of a pdMat Object
coef.varFunc

varFunc Object Coefficients
corGaus

Gaussian Correlation Structure
VarCorr

Extract variance and correlation components
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
Variogram.corLin

Calculate Semi-variogram for a corLin Object
corMatrix.corStruct

Matrix of a corStruct Object
Initialize.varFunc

Initialize varFunc Object
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
balancedGrouped

Create a groupedData object from a matrix
gapply

Apply a Function by Groups
formula.reStruct

Extract reStruct Object Formula
Initialize.reStruct

Initialize reStruct Object
BIC.logLik

BIC of a logLik Object
ACF.gls

Autocorrelation Function for gls Residuals
corSpher

Spherical Correlation Structure
Initialize.corStruct

Initialize corStruct Object
getGroups.data.frame

Extract Groups from a Data Frame
isBalanced

Check a Design for Balance
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
[.pdMat

Subscript a pdMat Object
getGroups.gls

Extract gls Object Groups
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
Variogram

Calculate Semi-variogram
getCovariate

Extract Covariate from an Object
Names.pdBlocked

Names of a pdBlocked Object
anova.gls

Compare Likelihoods of Fitted Objects
Names

Names Associated with an Object
getGroups.varFunc

Extract varFunc Groups
getData.gls

Extract gls Object Data
Variogram.corExp

Calculate Semi-variogram for a corExp Object
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
contr.SAS

Contrast Matrices
gnlsObject

Fitted gnls Object
glsStruct

Generalized Least Squares Structure
getGroups.corStruct

Extract corStruct Groups
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
fixed.effects

Extract Fixed Effects
collapse.groupedData

Collapse a groupedData Object
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
model.matrix.reStruct

reStruct Model Matrix
pdConstruct.pdBlocked

Construct pdBlocked Objects
as.matrix.corStruct

Matrix of a corStruct Object
pdFactor.reStruct

Extract Square-Root Factor from Components of an reStruct Object
pairs.lmList

Pairs Plot of an lmList Object
coef.modelStruct

Extract modelStruct Object Coefficients
Initialize.glsStruct

Initialize a glsStruct Object
getCovariate.corStruct

Extract corStruct Object Covariate
corClasses

Correlation Structure Classes
pdNatural

General Positive-Definite Matrix in Natural Parametrization
Dim.corStruct

Dimensions of a corStruct Object
getGroups.lme

Extract lme Object Groups
asOneFormula

Combine Formulas of a Set of Objects
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
augPred

Augmented Predictions
corCAR1

Continuous AR(1) Correlation Structure
groupedData

Construct a groupedData Object
coef.reStruct

reStruct Object Coefficients
coef.lmList

Extract lmList Coefficients
Names.reStruct

Names of an reStruct Object
fdHess

Finite difference Hessian
getVarCov

Extract variance-covariance matrix
corCompSymm

Compound Symmetry Correlation Structure
splitFormula

Split a Formula
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
allCoef

Extract Coefficients from a Set of Objects
glsControl

Control Values for gls Fit
corNatural

General correlation in natural parameterization
lmList.groupedData

lmList Fit from a groupedData Object
corMatrix

Extract Correlation Matrix
predict.nlme

Predictions from an nlme Object
pdIdent

Multiple of the Identity Positive-Definite Matrix
formula.pdMat

Extract pdMat Formula
coef.corStruct

Coefficients of a corStruct Object
logDet

Extract the Logarithm of the Determinant
as.matrix.reStruct

Matrices of an reStruct Object
as.matrix.pdMat

Matrix of a pdMat Object
asTable

Convert groupedData to a matrix
qqnorm.lme

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

Fitted nlme Object
pdBlocked

Positive-Definite Block Diagonal Matrix
recalc

Recalculate Condensed Linear Model Object
fitted.lme

Extract lme Fitted Values
gnlsControl

Control Values for gnls Fit
getGroups

Extract Grouping Factors from an Object
corRatio

Rational Quadratic Correlation Structure
plot.intervals.lmList

Plot lmList Confidence Intervals
coef.gnls

Extract gnls Coefficients
corExp

Exponential Correlation Structure
getCovariateFormula

Extract Covariates Formula
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
coef.lme

Extract lme Coefficients
formula.pdBlocked

Extract pdBlocked Formula
isInitialized

Check if Object is Initialized
fitted.lmList

Extract lmList Fitted Values
nlsList.selfStart

nlsList Fit from a selfStart Function
anova.lme

Compare Likelihoods of Fitted Objects
corSymm

General Correlation Structure
nlsList

List of nls Objects with a Common Model
corAR1

AR(1) Correlation Structure
logLik.lme

Log-Likelihood of an lme Object
corFactor

Factor of a Correlation Matrix
collapse

Collapse According to Groups
gnlsStruct

Generalized Nonlinear Least Squares Structure
pdFactor

Square-Root Factor of a Positive-Definite Matrix
lmeStruct

Linear Mixed-Effects Structure
corFactor.corStruct

Factor of a corStruct Object Matrix
recalc.corStruct

Recalculate for corStruct Object
residuals.lme

Extract lme Residuals
logLik.varFunc

Extract varFunc logLik
summary.lme

Summarize an lme Object
nlme.nlsList

NLME fit from nlsList Object
nlmeStruct

Nonlinear Mixed-Effects Structure
pdLogChol

General Positive-Definite Matrix
intervals

Confidence Intervals on Coefficients
glsObject

Fitted gls Object
getData.lmList

Extract lmList Object Data
recalc.reStruct

Recalculate for an reStruct Object
comparePred

Compare Predictions
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
plot.gls

Plot a gls Object
nlmeControl

Control Values for nlme Fit
lmeScale

Scale for lme Optimization
gsummary

Summarize by Groups
residuals.lmeStruct

Calculate lmeStruct Residuals
print.varFunc

Print a varFunc Object
fixef.lmList

Extract lmList Fixed Effects
getData

Extract Data from an Object
recalc.varFunc

Recalculate for varFunc Object
corLin

Linear Correlation Structure
pairs.compareFits

Pairs Plot of compareFits Object
simulate.lme

simulate lme models
lme

Linear Mixed-Effects Models
summary.nlsList

Summarize an nlsList Object
pdClasses

Positive-Definite Matrix Classes
varIdent

Constant Variance Function
pdSymm

General Positive-Definite Matrix
getCovariate.varFunc

Extract varFunc Covariate
corSpatial

Spatial Correlation Structure
getGroups.lmList

Extract lmList Object Groups
gnls

Fit Nonlinear Model Using Generalized Least Squares
summary.gls

Summarize a gls Object
logLik.reStruct

Calculate reStruct Log-Likelihood
plot.Variogram

Plot a Variogram Object
plot.augPred

Plot an augPred Object
intervals.gls

Confidence Intervals on gls Parameters
intervals.lmList

Confidence Intervals on lmList Coefficients
lmeControl

Control Values for lme Fit
update.modelStruct

Update a modelStruct Object
varExp

Exponential Variance Function
predict.lmList

Predictions from an lmList Object
plot.ranef.lmList

Plot a ranef.lmList Object
plot.ACF

Plot an ACF Object
predict.gls

Predictions from a gls Object
varWeights.glsStruct

Variance Weights for glsStruct Object
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
summary.pdMat

Summarize a pdMat Object
varWeights.lmeStruct

Variance Weights for lmeStruct Object
plot.nffGroupedData

Plot an nffGroupedData Object
plot.ranef.lme

Plot a ranef.lme Object
varComb

Combination of Variance Functions
predict.gnls

Predictions from a gnls Object
plot.lme

Plot an lme or nls object
gls

Fit Linear Model Using Generalized Least Squares
logDet.reStruct

Extract reStruct Log-Determinants
residuals.gnlsStruct

Calculate gnlsStruct Residuals
lme.lmList

LME fit from lmList Object
lmeObject

Fitted lme Object
logDet.pdMat

Extract Log-Determinant from a pdMat Object
logLik.gnls

Log-Likelihood of a gnls Object
pairs.lme

Pairs Plot of an lme Object
ranef.lme

Extract lme Random Effects
update.varFunc

Update varFunc Object
pdDiag

Diagonal Positive-Definite Matrix
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
pdConstruct

Construct pdMat Objects
solve.reStruct

Apply Solve to an reStruct Object
varFixed

Fixed Variance Function
predict.lme

Predictions from an lme Object
logLik.corStruct

Extract corStruct Log-Likelihood
summary.modelStruct

Summarize a modelStruct Object
qqnorm.gls

Normal Plot of Residuals from a gls Object
pdMatrix

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

Nonlinear Mixed-Effects Models
phenoModel

Model function for the Phenobarb data
plot.nfnGroupedData

Plot an nfnGroupedData Object
reStruct

Random Effects Structure
random.effects

Extract Random Effects
pooledSD

Extract Pooled Standard Deviation
quinModel

Model function for the Quinidine data
residuals.gls

Extract gls Residuals
varPower

Power Variance Function
varWeights

Extract Variance Function Weights
print.summary.pdMat

Print a summary.pdMat Object
recalc.modelStruct

Recalculate for a modelStruct Object
Earthquake

Earthquake Intensity
Glucose

Glucose levels over time
BodyWeight

Rat weight over time for different diets
Dialyzer

High-Flux Hemodialyzer
MathAchSchool

School demographic data for MathAchieve
Quinidine

Quinidine Kinetics
Oats

Split-plot Experiment on Varieties of Oats
Pixel

X-ray pixel intensities over time
Tetracycline2

Pharmacokinetics of tetracycline
Wafer

Modeling of Analog MOS Circuits
Glucose2

Glucose Levels Following Alcohol Ingestion
Nitrendipene

Assay of nitrendipene
Muscle

Contraction of heart muscle sections
Remifentanil

Pharmacokinetics of remifentanil
Milk

Protein content of cows' milk
Oxboys

Heights of Boys in Oxford
RatPupWeight

The weight of rat pups
MathAchieve

Mathematics achievement scores
Orthodont

Growth curve data on an orthdontic measurement
Ovary

Counts of Ovarian Follicles
Wheat

Yields by growing conditions
Tetracycline1

Pharmacokinetics of tetracycline
Assay

Bioassay on Cell Culture Plate
Rail

Evaluation of Stress in Railway Rails
PBG

Effect of Phenylbiguanide on Blood Pressure
Gun

Methods for firing naval guns
Meat

Tenderness of meat
Soybean

Growth of soybean plants
IGF

Radioimmunoassay of IGF-I Protein
Oxide

Variability in Semiconductor Manufacturing
Cefamandole

Pharmacokinetics of Cefamandole
Wheat2

Wheat Yield Trials
bdf

Language scores
Gasoline

Refinery yield of gasoline
Phenobarb

Phenobarbitol Kinetics
ergoStool

Ergometrics experiment with stool types
Relaxin

Assay for Relaxin
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Fatigue

Cracks caused by metal fatigue
Spruce

Growth of Spruce Trees
Machines

Productivity Scores for Machines and Workers