Learn R Programming

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

nlme (version 3.1-85)

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

License

GPL (>=2)

Maintainer

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

Last Published

March 31st, 2025

Functions in nlme (3.1-85)

BIC.logLik

BIC of a logLik Object
random.effects

Extract Random Effects
BIC

Bayesian Information Criterion
varClasses

Variance Function Classes
residuals.lmList

Extract lmList Residuals
pairs.compareFits

Pairs Plot of compareFits Object
gapply

Apply a Function by Groups
varFixed

Fixed Variance Function
summary.varFunc

Summarize varFunc Object
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
gnls

Fit Nonlinear Model Using Generalized Least Squares
logLik.lmList

Log-Likelihood of an lmList Object
varFunc

Variance Function Structure
update.modelStruct

Update a modelStruct Object
getCovariate.varFunc

Extract varFunc Covariate
reStruct

Random Effects Structure
[.pdMat

Subscript a pdMat Object
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
getData

Extract Data from an Object
pdMatrix.reStruct

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

Names Associated with an Object
getResponse

Extract Response Variable from an Object
varWeights.glsStruct

Variance Weights for glsStruct Object
Names.reStruct

Names of an reStruct Object
nlmeControl

Control Values for nlme Fit
getGroups.lme

Extract lme Object Groups
logDet.reStruct

Extract reStruct Log-Determinants
pdConstruct.pdBlocked

Construct pdBlocked Objects
Matrix

Assign Matrix Values
summary.gls

Summarize a gls Object
getCovariate.data.frame

Extract Data Frame Covariate
plot.lmList

Plot an lmList Object
pooledSD

Extract Pooled Standard Deviation
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
getVarCov

Extract variance-covariance matrix
logLik.glsStruct

Log-Likelihood of a glsStruct Object
glsControl

Control Values for gls Fit
update.varFunc

Update varFunc Object
residuals.gnlsStruct

Calculate gnlsStruct Residuals
corSymm

General Correlation Structure
getGroups

Extract Grouping Factors from an Object
print.summary.pdMat

Print a summary.pdMat Object
getGroups.corStruct

Extract corStruct Groups
getData.gls

Extract gls Object Data
getGroups.data.frame

Extract Groups from a Data Frame
nlmeStruct

Nonlinear Mixed-Effects Structure
nlsList.selfStart

nlsList Fit from a selfStart Function
pdClasses

Positive-Definite Matrix Classes
varExp

Exponential Variance Function
recalc.modelStruct

Recalculate for a modelStruct Object
gsummary

Summarize by Groups
Matrix.pdMat

Assign Matrix to a pdMat Object
plot.lme

Plot an lme or nls object
pdMat

Positive-Definite Matrix
Initialize

Initialize Object
summary.corStruct

Summarize a corStruct Object
needUpdate

Check if Update is Needed
varConstPower

Constant Plus Power Variance Function
qqnorm.gls

Normal Plot of Residuals from a gls Object
getGroups.lmList

Extract lmList Object Groups
logLik.corStruct

Extract corStruct Log-Likelihood
getResponseFormula

Extract Formula Specifying Response Variable
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
phenoModel

Model function for the Phenobarb data
lme.groupedData

LME fit from groupedData Object
lmeControl

Control Values for lme Fit
Names.pdMat

Names of a pdMat Object
fdHess

Finite difference Hessian
solve.reStruct

Apply Solve to an reStruct Object
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
Matrix.reStruct

Assign reStruct Matrices
quinModel

Model function for the Quinidine data
lmeObject

Fitted lme Object
gnlsStruct

Generalized Nonlinear Least Squares Structure
plot.nfnGroupedData

Plot an nfnGroupedData Object
pdSymm

General Positive-Definite Matrix
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
pdBlocked

Positive-Definite Block Diagonal Matrix
model.matrix.reStruct

reStruct Model Matrix
pdFactor

Square-Root Factor of a Positive-Definite Matrix
nlme

Nonlinear Mixed-Effects Models
formula.pdBlocked

Extract pdBlocked Formula
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
residuals.glsStruct

Calculate glsStruct Residuals
lmeStruct

Linear Mixed-Effects Structure
Covariate.varFunc

Assign varFunc Covariate
corGaus

Gaussian Correlation Structure
pdFactor.reStruct

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

Initialize a glsStruct Object
pdIdent

Multiple of the Identity Positive-Definite Matrix
coef.lmList

Extract lmList Coefficients
corMatrix

Extract Correlation Matrix
augPred

Augmented Predictions
coef.pdMat

pdMat Object Coefficients
collapse

Collapse According to Groups
corClasses

Correlation Structure Classes
LDEsysMat

Generate system matrix for LDEs
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
getGroupsFormula

Extract Grouping Formula
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
fitted.lme

Extract lme Fitted Values
nlme.nlsList

NLME fit from nlsList Object
logLik.gnls

Log-Likelihood of a gnls Object
summary.lme

Summarize an lme Object
nlmeObject

Fitted nlme Object
simulate.lme

Simulate results from lme models
predict.gnls

Predictions from a gnls Object
predict.gls

Predictions from a gls Object
Initialize.reStruct

Initialize reStruct Object
corMatrix.corStruct

Matrix of a corStruct Object
residuals.gls

Extract gls Residuals
comparePred

Compare Predictions
coef.gnls

Extract gnls Coefficients
logLik.lme

Log-Likelihood of an lme Object
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
residuals.nlmeStruct

Calculate nlmeStruct Residuals
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
splitFormula

Split a Formula
logLik.reStruct

Calculate reStruct Log-Likelihood
Initialize.corStruct

Initialize corStruct Object
getData.lmList

Extract lmList Object Data
formula.pdMat

Extract pdMat Formula
Variogram.default

Calculate Semi-variogram
Coef

Assign Values to Coefficients
corSpher

Spherical Correlation Structure
varWeights.lmeStruct

Variance Weights for lmeStruct Object
residuals.lmeStruct

Calculate lmeStruct Residuals
corARMA

ARMA(p,q) Correlation Structure
coef.corStruct

Coefficients of a corStruct Object
intervals.lmList

Confidence Intervals on lmList Coefficients
corRatio

Rational Quadratic Correlation Structure
Variogram

Calculate Semi-variogram
summary.nlsList

Summarize an nlsList Object
varComb

Combination of Variance Functions
predict.lmList

Predictions from an lmList Object
lmList.groupedData

lmList Fit from a groupedData Object
coef.lme

Extract lme Coefficients
logLik.varFunc

Extract varFunc logLik
corSpatial

Spatial Correlation Structure
coef.modelStruct

Extract modelStruct Object Coefficients
logDet.corStruct

Extract corStruct Log-Determinant
summary.pdMat

Summarize a pdMat Object
plot.ACF

Plot an ACF Object
intervals

Confidence Intervals on Coefficients
getGroups.gls

Extract gls Object Groups
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
corNatural

General correlation in natural parameterization
fixed.effects

Extract Fixed Effects
summary.modelStruct

Summarize a modelStruct Object
as.matrix.corStruct

Matrix of a corStruct Object
pairs.lmList

Pairs Plot of an lmList Object
balancedGrouped

Create a groupedData object from a matrix
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
qqnorm.lme

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

Initialize varFunc Object
pairs.lme

Pairs Plot of an lme Object
lmList

List of lm Objects with a Common Model
Names.formula

Extract Names from a formula
Names.pdBlocked

Names of a pdBlocked Object
ACF

Autocorrelation Function
logDet.pdMat

Extract Log-Determinant from a pdMat Object
recalc.varFunc

Recalculate for varFunc Object
logDet

Extract the Logarithm of the Determinant
summary.lmList

Summarize an lmList Object
ACF.gls

Autocorrelation Function for gls Residuals
isInitialized

Check if Object is Initialized
coef.varFunc

varFunc Object Coefficients
anova.gls

Compare Likelihoods of Fitted Objects
pdConstruct

Construct pdMat Objects
isBalanced

Check a Design for Balance
corCompSymm

Compound Symmetry Correlation Structure
groupedData

Construct a groupedData Object
lmeScale

Scale for lme Optimization
getGroups.varFunc

Extract varFunc Groups
compareFits

Compare Fitted Objects
gls

Fit Linear Model Using Generalized Least Squares
gnlsObject

Fitted gnls Object
plot.ranef.lmList

Plot a ranef.lmList Object
recalc

Recalculate Condensed Linear Model Object
gnlsControl

Control Values for gnls Fit
varWeights

Extract Variance Function Weights
predict.lme

Predictions from an lme Object
plot.ranef.lme

Plot a ranef.lme Object
recalc.reStruct

Recalculate for an reStruct Object
glsObject

Fitted gls Object
varIdent

Constant Variance Function
corExp

Exponential Correlation Structure
lme

Linear Mixed-Effects Models
corFactor.corStruct

Factor of a corStruct Object Matrix
pdDiag

Diagonal Positive-Definite Matrix
residuals.lme

Extract lme Residuals
plot.intervals.lmList

Plot lmList Confidence Intervals
Initialize.lmeStruct

Initialize an lmeStruct Object
glsStruct

Generalized Least Squares Structure
nlsList

List of nls Objects with a Common Model
varPower

Power Variance Function
lme.lmList

LME fit from lmList Object
getCovariate.corStruct

Extract corStruct Object Covariate
formula.reStruct

Extract reStruct Object Formula
Dim.corSpatial

Dimensions of a corSpatial Object
plot.compareFits

Plot a compareFits Object
plot.augPred

Plot an augPred Object
pdNatural

General Positive-Definite Matrix in Natural Parametrization
plot.Variogram

Plot a Variogram Object
Covariate

Assign Covariate Values
Dim.corStruct

Dimensions of a corStruct Object
Dim.pdMat

Dimensions of a pdMat Object
pdLogChol

General Positive-Definite Matrix
plot.gls

Plot a gls Object
Dim

Extract Dimensions from an Object
plot.nffGroupedData

Plot an nffGroupedData Object
Variogram.corLin

Calculate Semi-variogram for a corLin Object
pdMatrix

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

reStruct Object Coefficients
plot.nmGroupedData

Plot an nmGroupedData Object
fitted.lmList

Extract lmList Fitted Values
fitted.glsStruct

Calculate glsStruct Fitted Values
intervals.gls

Confidence Intervals on gls Parameters
corLin

Linear Correlation Structure
intervals.lme

Confidence Intervals on lme Parameters
ranef.lmList

Extract lmList Random Effects
recalc.corStruct

Recalculate for corStruct Object
print.varFunc

Print a varFunc Object
predict.nlme

Predictions from an nlme Object
ACF.lme

Autocorrelation Function for lme Residuals
allCoef

Extract Coefficients from a Set of Objects
VarCorr

Extract variance and correlation components
ranef.lme

Extract lme Random Effects
getCovariate

Extract Covariate from an Object
getCovariateFormula

Extract Covariates Formula
fixef.lmList

Extract lmList Fixed Effects
collapse.groupedData

Collapse a groupedData Object
asTable

Convert groupedData to a matrix
corFactor

Factor of a Correlation Matrix
as.matrix.pdMat

Matrix of a pdMat Object
Variogram.corExp

Calculate Semi-variogram for a corExp Object
corAR1

AR(1) Correlation Structure
getData.lme

Extract lme Object Data
as.matrix.reStruct

Matrices of an reStruct Object
asOneFormula

Combine Formulas of a Set of Objects
fitted.lmeStruct

Calculate lmeStruct Fitted Values
corCAR1

Continuous AR(1) Correlation Structure
anova.lme

Compare Likelihoods of Fitted Objects
Quinidine

Quinidine Kinetics
Ovary

Counts of Ovarian Follicles
Pixel

X-ray pixel intensities over time
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Rail

Evaluation of Stress in Railway Rails
Glucose

Glucose levels over time
IGF

Radioimmunoassay of IGF-I Protein
BodyWeight

Rat weight over time for different diets
Soybean

Growth of soybean plants
Gun

Methods for firing naval guns
RatPupWeight

The weight of rat pups
Machines

Productivity Scores for Machines and Workers
Fatigue

Cracks caused by metal fatigue
Wheat

Yields by growing conditions
Orthodont

Growth curve data on an orthdontic measurement
Meat

Tenderness of meat
Dialyzer

High-Flux Hemodialyzer
Relaxin

Assay for Relaxin
MathAchieve

Mathematics achievement scores
Tetracycline1

Pharmacokinetics of tetracycline
Phenobarb

Phenobarbitol Kinetics
PBG

Effect of Phenylbiguanide on Blood Pressure
Milk

Protein content of cows' milk
Gasoline

Refinery yield of gasoline
Glucose2

Glucose Levels Following Alcohol Ingestion
Wheat2

Wheat Yield Trials
Muscle

Contraction of heart muscle sections
Assay

Bioassay on Cell Culture Plate
Oxboys

Heights of Boys in Oxford
Remifentanil

Pharmacokinetics of remifentanil
Spruce

Growth of Spruce Trees
Oats

Split-plot Experiment on Varieties of Oats
Tetracycline2

Pharmacokinetics of tetracycline
ergoStool

Ergometrics experiment with stool types
Nitrendipene

Assay of nitrendipene
bdf

Language scores
Earthquake

Earthquake Intensity
Cefamandole

Pharmacokinetics of Cefamandole
MathAchSchool

School demographic data for MathAchieve
Wafer

Modeling of Analog MOS Circuits
Oxide

Variability in Semiconductor Manufacturing