Learn R Programming

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

nlme (version 3.1-79)

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

License

GPL version 2 or later

Maintainer

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

Last Published

March 31st, 2025

Functions in nlme (3.1-79)

[.pdMat

Subscript a pdMat Object
Initialize

Initialize Object
ACF

Autocorrelation Function
ACF.gls

Autocorrelation Function for gls Residuals
BIC

Bayesian Information Criterion
Dim.corSpatial

Dimensions of a corSpatial Object
Initialize.lmeStruct

Initialize an lmeStruct Object
ACF.lme

Autocorrelation Function for lme Residuals
Matrix

Assign Matrix Values
BIC.logLik

BIC of a logLik Object
Initialize.corStruct

Initialize corStruct Object
Initialize.reStruct

Initialize reStruct Object
getCovariate.varFunc

Extract varFunc Covariate
getGroups.lmList

Extract lmList Object Groups
getGroups.gls

Extract gls Object Groups
getGroups.varFunc

Extract varFunc Groups
as.matrix.corStruct

Matrix of a corStruct Object
glsObject

Fitted gls Object
Variogram

Calculate Semi-variogram
coef.gnls

Extract gnls Coefficients
corFactor

Factor of a Correlation Matrix
gapply

Apply a Function by Groups
varFunc

Variance Function Structure
varClasses

Variance Function Classes
summary.varFunc

Summarize varFunc Object
summary.gls

Summarize a gls Object
Dim.pdMat

Dimensions of a pdMat Object
collapse.groupedData

Collapse a groupedData Object
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
varComb

Combination of Variance Functions
summary.modelStruct

Summarize a modelStruct Object
recalc.reStruct

Recalculate for an reStruct Object
Dim

Extract Dimensions from an Object
Matrix.reStruct

Assign reStruct Matrices
anova.gls

Compare Likelihoods of Fitted Objects
LDEsysMat

Generate system matrix for LDEs
Variogram.default

Calculate Semi-variogram
getGroups.data.frame

Extract Groups from a Data Frame
coef.pdMat

pdMat Object Coefficients
Names.pdMat

Names of a pdMat Object
as.matrix.reStruct

Matrices of an reStruct Object
residuals.gls

Extract gls Residuals
getGroups

Extract Grouping Factors from an Object
corARMA

ARMA(p,q) Correlation Structure
allCoef

Extract Coefficients from a Set of Objects
VarCorr

Extract variance and correlation components
phenoModel

Model function for the Phenobarb data
residuals.lmList

Extract lmList Residuals
coef.reStruct

reStruct Object Coefficients
asOneFormula

Combine Formulas of a Set of Objects
corClasses

Correlation Structure Classes
Names.pdBlocked

Names of a pdBlocked Object
collapse

Collapse According to Groups
residuals.lme

Extract lme Residuals
random.effects

Extract Random Effects
fitted.lmList

Extract lmList Fitted Values
recalc.modelStruct

Recalculate for a modelStruct Object
residuals.glsStruct

Calculate glsStruct Residuals
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
augPred

Augmented Predictions
logLik.lmList

Log-Likelihood of an lmList Object
Initialize.varFunc

Initialize varFunc Object
getCovariate.corStruct

Extract corStruct Object Covariate
recalc.varFunc

Recalculate for varFunc Object
corNatural

General correlation in natural parameterization
fitted.glsStruct

Calculate glsStruct Fitted Values
qqnorm.lme

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

Plot an augPred Object
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
recalc

Recalculate Condensed Linear Model Object
fitted.lmeStruct

Calculate lmeStruct Fitted Values
corCompSymm

Compound Symmetry Correlation Structure
predict.lmList

Predictions from an lmList Object
ranef.lme

Extract lme Random Effects
Names

Names Associated with an Object
corGaus

Gaussian Correlation Structure
coef.lme

Extract lme Coefficients
Dim.corStruct

Dimensions of a corStruct Object
Matrix.pdMat

Assign Matrix to a pdMat Object
getCovariateFormula

Extract Covariates Formula
varWeights.glsStruct

Variance Weights for glsStruct Object
summary.lmList

Summarize an lmList Object
getData

Extract Data from an Object
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
compareFits

Compare Fitted Objects
summary.pdMat

Summarize a pdMat Object
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
Covariate

Assign Covariate Values
splitFormula

Split a Formula
update.varFunc

Update varFunc Object
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
getGroups.corStruct

Extract corStruct Groups
solve.reStruct

Apply Solve to an reStruct Object
as.matrix.pdMat

Matrix of a pdMat Object
summary.corStruct

Summarize a corStruct Object
update.modelStruct

Update a modelStruct Object
gls

Fit Linear Model Using Generalized Least Squares
Variogram.corExp

Calculate Semi-variogram for a corExp Object
getData.gls

Extract gls Object Data
getCovariate.data.frame

Extract Data Frame Covariate
asTable

Convert groupedData to a matrix
Variogram.corLin

Calculate Semi-variogram for a corLin Object
varIdent

Constant Variance Function
coef.modelStruct

Extract modelStruct Object Coefficients
comparePred

Compare Predictions
residuals.nlmeStruct

Calculate nlmeStruct Residuals
nlmeObject

Fitted nlme Object
gnlsObject

Fitted gnls Object
corAR1

AR(1) Correlation Structure
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
pooledSD

Extract Pooled Standard Deviation
corCAR1

Continuous AR(1) Correlation Structure
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
corLin

Linear Correlation Structure
corFactor.corStruct

Factor of a corStruct Object Matrix
varExp

Exponential Variance Function
fdHess

Finite difference Hessian
formula.pdMat

Extract pdMat Formula
corMatrix.corStruct

Matrix of a corStruct Object
simulate.lme

Simulate results from lme models
quinModel

Model function for the Quinidine data
corRatio

Rational Quadratic Correlation Structure
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
corExp

Exponential Correlation Structure
glsStruct

Generalized Least Squares Structure
lmeScale

Scale for lme Optimization
getResponse

Extract Response Variable from an Object
logDet

Extract the Logarithm of the Determinant
nlmeStruct

Nonlinear Mixed-Effects Structure
logLik.corStruct

Extract corStruct Log-Likelihood
model.matrix.reStruct

reStruct Model Matrix
plot.ACF

Plot an ACF Object
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
pdFactor

Square-Root Factor of a Positive-Definite Matrix
logDet.reStruct

Extract reStruct Log-Determinants
logLik.reStruct

Calculate reStruct Log-Likelihood
print.summary.pdMat

Print a summary.pdMat Object
formula.pdBlocked

Extract pdBlocked Formula
needUpdate

Check if Update is Needed
lmeStruct

Linear Mixed-Effects Structure
pdFactor.reStruct

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

Assign Values to Coefficients
isBalanced

Check a Design for Balance
predict.gls

Predictions from a gls Object
logLik.varFunc

Extract varFunc logLik
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
ranef.lmList

Extract lmList Random Effects
logLik.lme

Log-Likelihood of an lme Object
isInitialized

Check if Object is Initialized
predict.lme

Predictions from an lme Object
intervals.lme

Confidence Intervals on lme Parameters
residuals.lmeStruct

Calculate lmeStruct Residuals
gnlsControl

Control Values for gnls Fit
lmeControl

Control Values for lme Fit
nlme.nlsList

NLME fit from nlsList Object
getData.lmList

Extract lmList Object Data
getVarCov

Extract variance-covariance matrix
gnls

Fit Nonlinear Model Using Generalized Least Squares
pdIdent

Multiple of the Identity Positive-Definite Matrix
plot.nmGroupedData

Plot an nmGroupedData Object
Names.formula

Extract Names from a formula
Initialize.glsStruct

Initialize a glsStruct Object
Names.reStruct

Names of an reStruct Object
Covariate.varFunc

Assign varFunc Covariate
varFixed

Fixed Variance Function
varPower

Power Variance Function
varWeights.lmeStruct

Variance Weights for lmeStruct Object
anova.lme

Compare Likelihoods of Fitted Objects
getGroups.lme

Extract lme Object Groups
corMatrix

Extract Correlation Matrix
coef.lmList

Extract lmList Coefficients
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
nlme

Nonlinear Mixed-Effects Models
fixed.effects

Extract Fixed Effects
reStruct

Random Effects Structure
formula.reStruct

Extract reStruct Object Formula
summary.nlsList

Summarize an nlsList Object
getGroupsFormula

Extract Grouping Formula
plot.ranef.lme

Plot a ranef.lme Object
groupedData

Construct a groupedData Object
plot.lmList

Plot an lmList Object
nlsList.selfStart

nlsList Fit from a selfStart Function
lme

Linear Mixed-Effects Models
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
glsControl

Control Values for gls Fit
summary.lme

Summarize an lme Object
gsummary

Summarize by Groups
corSymm

General Correlation Structure
logDet.pdMat

Extract Log-Determinant from a pdMat Object
print.varFunc

Print a varFunc Object
pdBlocked

Positive-Definite Block Diagonal Matrix
intervals.lmList

Confidence Intervals on lmList Coefficients
lmList

List of lm Objects with a Common Model
corSpher

Spherical Correlation Structure
recalc.corStruct

Recalculate for corStruct Object
getData.lme

Extract lme Object Data
varWeights

Extract Variance Function Weights
getCovariate

Extract Covariate from an Object
gnlsStruct

Generalized Nonlinear Least Squares Structure
fitted.lme

Extract lme Fitted Values
varConstPower

Constant Plus Power Variance Function
balancedGrouped

Create a groupedData object from a matrix
pairs.lmList

Pairs Plot of an lmList Object
coef.corStruct

Coefficients of a corStruct Object
coef.varFunc

varFunc Object Coefficients
residuals.gnlsStruct

Calculate gnlsStruct Residuals
lme.groupedData

LME fit from groupedData Object
fixef.lmList

Extract lmList Fixed Effects
pdMat

Positive-Definite Matrix
getResponseFormula

Extract Formula Specifying Response Variable
pdMatrix.reStruct

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

General Positive-Definite Matrix in Natural Parametrization
lmList.groupedData

lmList Fit from a groupedData Object
plot.intervals.lmList

Plot lmList Confidence Intervals
plot.nffGroupedData

Plot an nffGroupedData Object
predict.gnls

Predictions from a gnls Object
intervals

Confidence Intervals on Coefficients
plot.compareFits

Plot a compareFits Object
pairs.compareFits

Pairs Plot of compareFits Object
logDet.corStruct

Extract corStruct Log-Determinant
lmeObject

Fitted lme Object
pdLogChol

General Positive-Definite Matrix
intervals.gls

Confidence Intervals on gls Parameters
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
pdClasses

Positive-Definite Matrix Classes
pdSymm

General Positive-Definite Matrix
plot.Variogram

Plot a Variogram Object
predict.nlme

Predictions from an nlme Object
plot.ranef.lmList

Plot a ranef.lmList Object
pairs.lme

Pairs Plot of an lme Object
logLik.glsStruct

Log-Likelihood of a glsStruct Object
pdDiag

Diagonal Positive-Definite Matrix
logLik.gnls

Log-Likelihood of a gnls Object
qqnorm.gls

Normal Plot of Residuals from a gls Object
plot.lme

Plot an lme or nls object
pdMatrix

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

Plot a gls Object
lme.lmList

LME fit from lmList Object
nlsList

List of nls Objects with a Common Model
corSpatial

Spatial Correlation Structure
pdConstruct

Construct pdMat Objects
plot.nfnGroupedData

Plot an nfnGroupedData Object
pdConstruct.pdBlocked

Construct pdBlocked Objects
nlmeControl

Control Values for nlme Fit
Glucose

Glucose levels over time
Wheat2

Wheat Yield Trials
Machines

Productivity Scores for Machines and Workers
Cefamandole

Pharmacokinetics of Cefamandole
Oxide

Variability in Semiconductor Manufacturing
Wafer

Modeling of Analog MOS Circuits
Dialyzer

High-Flux Hemodialyzer
MathAchieve

Mathematics achievement scores
Tetracycline1

Pharmacokinetics of tetracycline
Glucose2

Glucose Levels Following Alcohol Ingestion
IGF

Radioimmunoassay of IGF-I Protein
RatPupWeight

The weight of rat pups
Ovary

Counts of Ovarian Follicles
Orthodont

Growth curve data on an orthdontic measurement
ergoStool

Ergometrics experiment with stool types
Meat

Tenderness of meat
MathAchSchool

School demographic data for MathAchieve
PBG

Effect of Phenylbiguanide on Blood Pressure
Tetracycline2

Pharmacokinetics of tetracycline
BodyWeight

Rat weight over time for different diets
Quinidine

Quinidine Kinetics
Fatigue

Cracks caused by metal fatigue
Muscle

Contraction of heart muscle sections
Gasoline

Refinery yield of gasoline
Milk

Protein content of cows' milk
Rail

Evaluation of Stress in Railway Rails
Nitrendipene

Assay of nitrendipene
Phenobarb

Phenobarbitol Kinetics
Assay

Bioassay on Cell Culture Plate
Oats

Split-plot Experiment on Varieties of Oats
Wheat

Yields by growing conditions
Spruce

Growth of Spruce Trees
bdf

Language scores
Earthquake

Earthquake Intensity
Gun

Methods for firing naval guns
Remifentanil

Pharmacokinetics of remifentanil
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Pixel

X-ray pixel intensities over time
Soybean

Growth of soybean plants
Relaxin

Assay for Relaxin
Oxboys

Heights of Boys in Oxford