Learn R Programming

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

nlme (version 3.1-81)

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

License

GPL version 2 or later

Maintainer

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

Last Published

March 31st, 2025

Functions in nlme (3.1-81)

Initialize.lmeStruct

Initialize an lmeStruct Object
Matrix.reStruct

Assign reStruct Matrices
Dim

Extract Dimensions from an Object
Names.formula

Extract Names from a formula
Dim.corSpatial

Dimensions of a corSpatial Object
Covariate

Assign Covariate Values
Initialize.glsStruct

Initialize a glsStruct Object
ACF

Autocorrelation Function
Names.reStruct

Names of an reStruct Object
Coef

Assign Values to Coefficients
asTable

Convert groupedData to a matrix
Matrix

Assign Matrix Values
asOneFormula

Combine Formulas of a Set of Objects
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
Matrix.pdMat

Assign Matrix to a pdMat Object
Initialize.reStruct

Initialize reStruct Object
Initialize.corStruct

Initialize corStruct Object
gapply

Apply a Function by Groups
as.matrix.reStruct

Matrices of an reStruct Object
Variogram.default

Calculate Semi-variogram
predict.lme

Predictions from an lme Object
comparePred

Compare Predictions
summary.corStruct

Summarize a corStruct Object
collapse.groupedData

Collapse a groupedData Object
[.pdMat

Subscript a pdMat Object
lmeObject

Fitted lme Object
coef.corStruct

Coefficients of a corStruct Object
Initialize

Initialize Object
getCovariate.varFunc

Extract varFunc Covariate
fitted.lmeStruct

Calculate lmeStruct Fitted Values
as.matrix.corStruct

Matrix of a corStruct Object
coef.modelStruct

Extract modelStruct Object Coefficients
corFactor.corStruct

Factor of a corStruct Object Matrix
logLik.gnls

Log-Likelihood of a gnls Object
corLin

Linear Correlation Structure
coef.reStruct

reStruct Object Coefficients
LDEsysMat

Generate system matrix for LDEs
corARMA

ARMA(p,q) Correlation Structure
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
formula.reStruct

Extract reStruct Object Formula
varConstPower

Constant Plus Power Variance Function
pooledSD

Extract Pooled Standard Deviation
ACF.lme

Autocorrelation Function for lme Residuals
ranef.lmList

Extract lmList Random Effects
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
Names

Names Associated with an Object
Dim.corStruct

Dimensions of a corStruct Object
BIC

Bayesian Information Criterion
logDet

Extract the Logarithm of the Determinant
Variogram.gls

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

Compare Likelihoods of Fitted Objects
fixed.effects

Extract Fixed Effects
recalc.modelStruct

Recalculate for a modelStruct Object
corSpher

Spherical Correlation Structure
getData.lmList

Extract lmList Object Data
corGaus

Gaussian Correlation Structure
glsStruct

Generalized Least Squares Structure
corNatural

General correlation in natural parameterization
simulate.lme

Simulate results from lme models
Variogram.corLin

Calculate Semi-variogram for a corLin Object
corClasses

Correlation Structure Classes
print.varFunc

Print a varFunc Object
coef.pdMat

pdMat Object Coefficients
getCovariateFormula

Extract Covariates Formula
getData.lme

Extract lme Object Data
pdMatrix.reStruct

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

AR(1) Correlation Structure
gnlsStruct

Generalized Nonlinear Least Squares Structure
isInitialized

Check if Object is Initialized
getGroups.data.frame

Extract Groups from a Data Frame
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
summary.modelStruct

Summarize a modelStruct Object
summary.lme

Summarize an lme Object
allCoef

Extract Coefficients from a Set of Objects
ACF.gls

Autocorrelation Function for gls Residuals
Names.pdMat

Names of a pdMat Object
update.modelStruct

Update a modelStruct Object
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
logDet.reStruct

Extract reStruct Log-Determinants
intervals.gls

Confidence Intervals on gls Parameters
coef.gnls

Extract gnls Coefficients
corMatrix.corStruct

Matrix of a corStruct Object
summary.pdMat

Summarize a pdMat Object
Initialize.varFunc

Initialize varFunc Object
balancedGrouped

Create a groupedData object from a matrix
predict.gnls

Predictions from a gnls Object
fitted.lme

Extract lme Fitted Values
gsummary

Summarize by Groups
pdClasses

Positive-Definite Matrix Classes
residuals.gnlsStruct

Calculate gnlsStruct Residuals
getData

Extract Data from an Object
plot.intervals.lmList

Plot lmList Confidence Intervals
varFunc

Variance Function Structure
splitFormula

Split a Formula
qqnorm.lme

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

Dimensions of a pdMat Object
gls

Fit Linear Model Using Generalized Least Squares
corFactor

Factor of a Correlation Matrix
solve.reStruct

Apply Solve to an reStruct Object
getCovariate.corStruct

Extract corStruct Object Covariate
formula.pdBlocked

Extract pdBlocked Formula
summary.gls

Summarize a gls Object
update.varFunc

Update varFunc Object
residuals.nlmeStruct

Calculate nlmeStruct Residuals
intervals.lmList

Confidence Intervals on lmList Coefficients
fdHess

Finite difference Hessian
predict.gls

Predictions from a gls Object
lmeScale

Scale for lme Optimization
as.matrix.pdMat

Matrix of a pdMat Object
fixef.lmList

Extract lmList Fixed Effects
compareFits

Compare Fitted Objects
getCovariate.data.frame

Extract Data Frame Covariate
augPred

Augmented Predictions
getData.gls

Extract gls Object Data
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
summary.nlsList

Summarize an nlsList Object
varFixed

Fixed Variance Function
Variogram.corExp

Calculate Semi-variogram for a corExp Object
glsControl

Control Values for gls Fit
formula.pdMat

Extract pdMat Formula
lmList.groupedData

lmList Fit from a groupedData Object
qqnorm.gls

Normal Plot of Residuals from a gls Object
VarCorr

Extract variance and correlation components
groupedData

Construct a groupedData Object
getGroups.lme

Extract lme Object Groups
getResponseFormula

Extract Formula Specifying Response Variable
plot.Variogram

Plot a Variogram Object
lme.lmList

LME fit from lmList Object
getGroups.lmList

Extract lmList Object Groups
corSpatial

Spatial Correlation Structure
logLik.corStruct

Extract corStruct Log-Likelihood
collapse

Collapse According to Groups
getVarCov

Extract variance-covariance matrix
corCAR1

Continuous AR(1) Correlation Structure
plot.lme

Plot an lme or nls object
residuals.lmeStruct

Calculate lmeStruct Residuals
varComb

Combination of Variance Functions
varWeights

Extract Variance Function Weights
varWeights.lmeStruct

Variance Weights for lmeStruct Object
Names.pdBlocked

Names of a pdBlocked Object
Covariate.varFunc

Assign varFunc Covariate
predict.nlme

Predictions from an nlme Object
logDet.pdMat

Extract Log-Determinant from a pdMat Object
gnls

Fit Nonlinear Model Using Generalized Least Squares
varIdent

Constant Variance Function
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
coef.varFunc

varFunc Object Coefficients
intervals

Confidence Intervals on Coefficients
gnlsControl

Control Values for gnls Fit
residuals.glsStruct

Calculate glsStruct Residuals
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
coef.lmList

Extract lmList Coefficients
pdMat

Positive-Definite Matrix
summary.lmList

Summarize an lmList Object
plot.ranef.lmList

Plot a ranef.lmList Object
varExp

Exponential Variance Function
pairs.lme

Pairs Plot of an lme Object
fitted.glsStruct

Calculate glsStruct Fitted Values
plot.ACF

Plot an ACF Object
corSymm

General Correlation Structure
gnlsObject

Fitted gnls Object
fitted.lmList

Extract lmList Fitted Values
logLik.glsStruct

Log-Likelihood of a glsStruct Object
pdDiag

Diagonal Positive-Definite Matrix
residuals.lme

Extract lme Residuals
glsObject

Fitted gls Object
lme

Linear Mixed-Effects Models
varClasses

Variance Function Classes
getGroupsFormula

Extract Grouping Formula
print.summary.pdMat

Print a summary.pdMat Object
pairs.compareFits

Pairs Plot of compareFits Object
lmList

List of lm Objects with a Common Model
getGroups.corStruct

Extract corStruct Groups
pdLogChol

General Positive-Definite Matrix
plot.nmGroupedData

Plot an nmGroupedData Object
plot.nfnGroupedData

Plot an nfnGroupedData Object
plot.compareFits

Plot a compareFits Object
lmeControl

Control Values for lme Fit
varWeights.glsStruct

Variance Weights for glsStruct Object
residuals.gls

Extract gls Residuals
Variogram

Calculate Semi-variogram
nlmeObject

Fitted nlme Object
ranef.lme

Extract lme Random Effects
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
getGroups

Extract Grouping Factors from an Object
corMatrix

Extract Correlation Matrix
predict.lmList

Predictions from an lmList Object
plot.nffGroupedData

Plot an nffGroupedData Object
isBalanced

Check a Design for Balance
recalc.reStruct

Recalculate for an reStruct Object
residuals.lmList

Extract lmList Residuals
BIC.logLik

BIC of a logLik Object
logDet.corStruct

Extract corStruct Log-Determinant
recalc.varFunc

Recalculate for varFunc Object
corExp

Exponential Correlation Structure
lmeStruct

Linear Mixed-Effects Structure
recalc.corStruct

Recalculate for corStruct Object
plot.lmList

Plot an lmList Object
corRatio

Rational Quadratic Correlation Structure
plot.augPred

Plot an augPred Object
getGroups.gls

Extract gls Object Groups
recalc

Recalculate Condensed Linear Model Object
quinModel

Model function for the Quinidine data
getGroups.varFunc

Extract varFunc Groups
random.effects

Extract Random Effects
getCovariate

Extract Covariate from an Object
phenoModel

Model function for the Phenobarb data
getResponse

Extract Response Variable from an Object
nlme

Nonlinear Mixed-Effects Models
coef.lme

Extract lme Coefficients
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
anova.gls

Compare Likelihoods of Fitted Objects
lme.groupedData

LME fit from groupedData Object
plot.ranef.lme

Plot a ranef.lme Object
corCompSymm

Compound Symmetry Correlation Structure
intervals.lme

Confidence Intervals on lme Parameters
reStruct

Random Effects Structure
nlme.nlsList

NLME fit from nlsList Object
varPower

Power Variance Function
summary.varFunc

Summarize varFunc Object
pdSymm

General Positive-Definite Matrix
plot.gls

Plot a gls Object
nlsList

List of nls Objects with a Common Model
logLik.lme

Log-Likelihood of an lme Object
logLik.varFunc

Extract varFunc logLik
nlmeStruct

Nonlinear Mixed-Effects Structure
logLik.lmList

Log-Likelihood of an lmList Object
pairs.lmList

Pairs Plot of an lmList Object
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
nlsList.selfStart

nlsList Fit from a selfStart Function
pdFactor.reStruct

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

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

Square-Root Factor of a Positive-Definite Matrix
needUpdate

Check if Update is Needed
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
pdNatural

General Positive-Definite Matrix in Natural Parametrization
pdBlocked

Positive-Definite Block Diagonal Matrix
model.matrix.reStruct

reStruct Model Matrix
logLik.reStruct

Calculate reStruct Log-Likelihood
nlmeControl

Control Values for nlme Fit
pdConstruct

Construct pdMat Objects
pdConstruct.pdBlocked

Construct pdBlocked Objects
pdIdent

Multiple of the Identity Positive-Definite Matrix
Pixel

X-ray pixel intensities over time
Gun

Methods for firing naval guns
Fatigue

Cracks caused by metal fatigue
Machines

Productivity Scores for Machines and Workers
IGF

Radioimmunoassay of IGF-I Protein
Orthodont

Growth curve data on an orthdontic measurement
MathAchieve

Mathematics achievement scores
Oats

Split-plot Experiment on Varieties of Oats
Dialyzer

High-Flux Hemodialyzer
MathAchSchool

School demographic data for MathAchieve
Glucose

Glucose levels over time
Glucose2

Glucose Levels Following Alcohol Ingestion
Earthquake

Earthquake Intensity
Assay

Bioassay on Cell Culture Plate
Wheat2

Wheat Yield Trials
Muscle

Contraction of heart muscle sections
Milk

Protein content of cows' milk
BodyWeight

Rat weight over time for different diets
Ovary

Counts of Ovarian Follicles
Wafer

Modeling of Analog MOS Circuits
Spruce

Growth of Spruce Trees
Soybean

Growth of soybean plants
Nitrendipene

Assay of nitrendipene
Oxide

Variability in Semiconductor Manufacturing
Meat

Tenderness of meat
Quinidine

Quinidine Kinetics
Cefamandole

Pharmacokinetics of Cefamandole
bdf

Language scores
Gasoline

Refinery yield of gasoline
Tetracycline2

Pharmacokinetics of tetracycline
PBG

Effect of Phenylbiguanide on Blood Pressure
Relaxin

Assay for Relaxin
Tetracycline1

Pharmacokinetics of tetracycline
Rail

Evaluation of Stress in Railway Rails
Phenobarb

Phenobarbitol Kinetics
Oxboys

Heights of Boys in Oxford
Remifentanil

Pharmacokinetics of remifentanil
RatPupWeight

The weight of rat pups
ergoStool

Ergometrics experiment with stool types
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Wheat

Yields by growing conditions