Learn R Programming

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

nlme (version 3.1-74)

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

License

GPL version 2 or later

Maintainer

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

Last Published

March 31st, 2025

Functions in nlme (3.1-74)

Covariate

Assign Covariate Values
Dim.corSpatial

Dimensions of a corSpatial Object
Dim

Extract Dimensions from an Object
Dim.pdMat

Dimensions of a pdMat Object
pdMatrix.reStruct

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

Initialize reStruct Object
Names

Names Associated with an Object
ACF.gls

Autocorrelation Function for gls Residuals
pdMat

Positive-Definite Matrix
getGroups.data.frame

Extract Groups from a Data Frame
getCovariateFormula

Extract Covariates Formula
quinModel

Model function for the Quinidine data
random.effects

Extract Random Effects
lmeScale

Scale for lme Optimization
residuals.glsStruct

Calculate glsStruct Residuals
lme.groupedData

LME fit from groupedData Object
Initialize

Initialize Object
predict.gnls

Predictions from a gnls Object
Names.pdMat

Names of a pdMat Object
corCompSymm

Compound Symmetry Correlation Structure
Initialize.corStruct

Initialize corStruct Object
Variogram.corRatio

Calculate Semi-variogram for a corRatio Object
Names.pdBlocked

Names of a pdBlocked Object
coef.lme

Extract lme Coefficients
ACF

Autocorrelation Function
ACF.lme

Autocorrelation Function for lme Residuals
as.matrix.reStruct

Matrices of an reStruct Object
LDEsysMat

Generate system matrix for LDEs
collapse.groupedData

Collapse a groupedData Object
[.pdMat

Subscript a pdMat Object
Names.reStruct

Names of an reStruct Object
coef.gnls

Extract gnls Coefficients
Variogram.default

Calculate Semi-variogram
Variogram.corSpatial

Calculate Semi-variogram for a corSpatial Object
Matrix

Assign Matrix Values
corCAR1

Continuous AR(1) Correlation Structure
Coef

Assign Values to Coefficients
coef.pdMat

pdMat Object Coefficients
BIC

Bayesian Information Criterion
Matrix.pdMat

Assign Matrix to a pdMat Object
as.matrix.corStruct

Matrix of a corStruct Object
Initialize.lmeStruct

Initialize an lmeStruct Object
Initialize.glsStruct

Initialize a glsStruct Object
Variogram

Calculate Semi-variogram
anova.gls

Compare Likelihoods of Fitted Objects
coef.corStruct

Coefficients of a corStruct Object
BIC.logLik

BIC of a logLik Object
getGroups

Extract Grouping Factors from an Object
Variogram.corExp

Calculate Semi-variogram for a corExp Object
getData.gls

Extract gls Object Data
gnlsStruct

Generalized Nonlinear Least Squares Structure
corSpatial

Spatial Correlation Structure
pdClasses

Positive-Definite Matrix Classes
asTable

Convert groupedData to a matrix
plot.lmList

Plot an lmList Object
fdHess

Finite difference Hessian
allCoef

Extract Coefficients from a Set of Objects
fixef.lmList

Extract lmList Fixed Effects
Variogram.gls

Calculate Semi-variogram for Residuals from a gls Object
augPred

Augmented Predictions
lme.lmList

LME fit from lmList Object
getVarCov

Extract variance-covariance matrix
Variogram.lme

Calculate Semi-variogram for Residuals from an lme Object
plot.ranef.lmList

Plot a ranef.lmList Object
getGroups.corStruct

Extract corStruct Groups
fitted.lmeStruct

Calculate lmeStruct Fitted Values
plot.augPred

Plot an augPred Object
Initialize.varFunc

Initialize varFunc Object
plot.ACF

Plot an ACF Object
fitted.nlmeStruct

Calculate nlmeStruct Fitted Values
varExp

Exponential Variance Function
pdDiag

Diagonal Positive-Definite Matrix
predict.gls

Predictions from a gls Object
asOneFormula

Combine Formulas of a Set of Objects
Covariate.varFunc

Assign varFunc Covariate
Names.formula

Extract Names from a formula
Dim.corStruct

Dimensions of a corStruct Object
gsummary

Summarize by Groups
gapply

Apply a Function by Groups
Matrix.reStruct

Assign reStruct Matrices
model.matrix.reStruct

reStruct Model Matrix
logLik.glsStruct

Log-Likelihood of a glsStruct Object
pdCompSymm

Positive-Definite Matrix with Compound Symmetry Structure
corNatural

General correlation in natural parameterization
coef.lmList

Extract lmList Coefficients
formula.pdMat

Extract pdMat Formula
gls

Fit Linear Model Using Generalized Least Squares
corClasses

Correlation Structure Classes
corLin

Linear Correlation Structure
getData.lme

Extract lme Object Data
coef.reStruct

reStruct Object Coefficients
pdLogChol

General Positive-Definite Matrix
balancedGrouped

Create a groupedData object from a matrix
getCovariate.data.frame

Extract Data Frame Covariate
getGroupsFormula

Extract Grouping Formula
getResponseFormula

Extract Formula Specifying Response Variable
formula.reStruct

Extract reStruct Object Formula
getCovariate.varFunc

Extract varFunc Covariate
fitted.glsStruct

Calculate glsStruct Fitted Values
isBalanced

Check a Design for Balance
getCovariate.corStruct

Extract corStruct Object Covariate
corFactor.corStruct

Factor of a corStruct Object Matrix
getData

Extract Data from an Object
logLik.corStruct

Extract corStruct Log-Likelihood
plot.nffGroupedData

Plot an nffGroupedData Object
Variogram.corSpher

Calculate Semi-variogram for a corSpher Object
VarCorr

Extract variance and correlation components
Variogram.corGaus

Calculate Semi-variogram for a corGaus Object
compareFits

Compare Fitted Objects
glsStruct

Generalized Least Squares Structure
glsObject

Fitted gls Object
predict.lme

Predictions from an lme Object
pairs.lme

Pairs Plot of an lme Object
pdFactor

Square-Root Factor of a Positive-Definite Matrix
ranef.lme

Extract lme Random Effects
logLik.gnlsStruct

Log-Likelihood of a gnlsStruct Object
getGroups.varFunc

Extract varFunc Groups
lmList.groupedData

lmList Fit from a groupedData Object
intervals.gls

Confidence Intervals on gls Parameters
corARMA

ARMA(p,q) Correlation Structure
qqnorm.gls

Normal Plot of Residuals from a gls Object
Variogram.corLin

Calculate Semi-variogram for a corLin Object
lme

Linear Mixed-Effects Models
formula.pdBlocked

Extract pdBlocked Formula
corAR1

AR(1) Correlation Structure
collapse

Collapse According to Groups
fixed.effects

Extract Fixed Effects
corRatio

Rational Quadratic Correlation Structure
logLik.gnls

Log-Likelihood of a gnls Object
isInitialized

Check if Object is Initialized
gnlsObject

Fitted gnls Object
getGroups.lme

Extract lme Object Groups
lmeStruct

Linear Mixed-Effects Structure
splitFormula

Split a Formula
gnlsControl

Control Values for gnls Fit
intervals.lme

Confidence Intervals on lme Parameters
varWeights.glsStruct

Variance Weights for glsStruct Object
getCovariate

Extract Covariate from an Object
getResponse

Extract Response Variable from an Object
update.modelStruct

Update a modelStruct Object
logLik.lmeStruct

Log-Likelihood of an lmeStruct Object
logLik.lmList

Log-Likelihood of an lmList Object
varComb

Combination of Variance Functions
nlmeStruct

Nonlinear Mixed-Effects Structure
fitted.lmList

Extract lmList Fitted Values
logLik.reStruct

Calculate reStruct Log-Likelihood
corSymm

General Correlation Structure
recalc.modelStruct

Recalculate for a modelStruct Object
pdBlocked

Positive-Definite Block Diagonal Matrix
logLik.varFunc

Extract varFunc logLik
corFactor

Factor of a Correlation Matrix
pdConstruct.pdBlocked

Construct pdBlocked Objects
groupedData

Construct a groupedData Object
intervals

Confidence Intervals on Coefficients
lmeControl

Control Values for lme Fit
lmeObject

Fitted lme Object
needUpdate

Check if Update is Needed
nlmeObject

Fitted nlme Object
coef.modelStruct

Extract modelStruct Object Coefficients
glsControl

Control Values for gls Fit
lmList

List of lm Objects with a Common Model
nlme

Nonlinear Mixed-Effects Models
coef.varFunc

varFunc Object Coefficients
pdSymm

General Positive-Definite Matrix
varIdent

Constant Variance Function
ranef.lmList

Extract lmList Random Effects
getData.lmList

Extract lmList Object Data
predict.lmList

Predictions from an lmList Object
plot.intervals.lmList

Plot lmList Confidence Intervals
logDet.corStruct

Extract corStruct Log-Determinant
phenoModel

Model function for the Phenobarb data
as.matrix.pdMat

Matrix of a pdMat Object
nlsList.selfStart

nlsList Fit from a selfStart Function
pdNatural

General Positive-Definite Matrix in Natural Parametrization
plot.ranef.lme

Plot a ranef.lme Object
varClasses

Variance Function Classes
recalc.reStruct

Recalculate for an reStruct Object
nlme.nlsList

NLME fit from nlsList Object
update.varFunc

Update varFunc Object
simulate.lme

Simulate results from lme models
print.summary.pdMat

Print a summary.pdMat Object
intervals.lmList

Confidence Intervals on lmList Coefficients
pdFactor.reStruct

Extract Square-Root Factor from Components of an reStruct Object
summary.gls

Summarize a gls Object
recalc

Recalculate Condensed Linear Model Object
qqnorm.lme

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

Plot an lme or nls object
varConstPower

Constant Plus Power Variance Function
recalc.corStruct

Recalculate for corStruct Object
pooledSD

Extract Pooled Standard Deviation
corMatrix.reStruct

Extract Correlation Matrix from Components of an reStruct Object
residuals.lmList

Extract lmList Residuals
print.varFunc

Print a varFunc Object
pairs.compareFits

Pairs Plot of compareFits Object
summary.corStruct

Summarize a corStruct Object
corMatrix

Extract Correlation Matrix
summary.lmList

Summarize an lmList Object
plot.nfnGroupedData

Plot an nfnGroupedData Object
corMatrix.pdMat

Extract Correlation Matrix from a pdMat Object
plot.nmGroupedData

Plot an nmGroupedData Object
fitted.gnlsStruct

Calculate gnlsStruct Fitted Values
summary.lme

Summarize an lme Object
reStruct

Random Effects Structure
predict.nlme

Predictions from an nlme Object
plot.Variogram

Plot a Variogram Object
residuals.lmeStruct

Calculate lmeStruct Residuals
residuals.nlmeStruct

Calculate nlmeStruct Residuals
summary.pdMat

Summarize a pdMat Object
summary.modelStruct

Summarize a modelStruct Object
varWeights

Extract Variance Function Weights
pdIdent

Multiple of the Identity Positive-Definite Matrix
varPower

Power Variance Function
varFixed

Fixed Variance Function
plot.compareFits

Plot a compareFits Object
residuals.gls

Extract gls Residuals
residuals.gnlsStruct

Calculate gnlsStruct Residuals
summary.nlsList

Summarize an nlsList Object
summary.varFunc

Summarize varFunc Object
solve.pdMat

Calculate Inverse of a Positive-Definite Matrix
corSpher

Spherical Correlation Structure
logDet.reStruct

Extract reStruct Log-Determinants
recalc.varFunc

Recalculate for varFunc Object
nlsList

List of nls Objects with a Common Model
pdMatrix

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

Extract Log-Determinant from a pdMat Object
pairs.lmList

Pairs Plot of an lmList Object
pdConstruct

Construct pdMat Objects
varFunc

Variance Function Structure
solve.reStruct

Apply Solve to an reStruct Object
varWeights.lmeStruct

Variance Weights for lmeStruct Object
anova.lme

Compare Likelihoods of Fitted Objects
comparePred

Compare Predictions
corExp

Exponential Correlation Structure
corMatrix.corStruct

Matrix of a corStruct Object
fitted.lme

Extract lme Fitted Values
corGaus

Gaussian Correlation Structure
gnls

Fit Nonlinear Model Using Generalized Least Squares
logDet

Extract the Logarithm of the Determinant
getGroups.lmList

Extract lmList Object Groups
logLik.lme

Log-Likelihood of an lme Object
needUpdate.modelStruct

Check if a modelStruct Object Needs Updating
nlmeControl

Control Values for nlme Fit
plot.gls

Plot a gls Object
residuals.lme

Extract lme Residuals
getGroups.gls

Extract gls Object Groups
Tetracycline1

Pharmacokinetics of tetracycline
Machines

Productivity Scores for Machines and Workers
Oxboys

Heights of Boys in Oxford
Earthquake

Earthquake Intensity
Wafer

Modeling of Analog MOS Circuits
Soybean

Growth of soybean plants
Relaxin

Assay for Relaxin
Gun

Methods for firing naval guns
Ovary

Counts of Ovarian Follicles
Meat

Tenderness of meat
Wheat

Yields by growing conditions
Alfalfa

Split-Plot Experiment on Varieties of Alfalfa
Milk

Protein content of cows' milk
RatPupWeight

The weight of rat pups
MathAchieve

Mathematics achievement scores
Tetracycline2

Pharmacokinetics of tetracycline
Orthodont

Growth curve data on an orthdontic measurement
Pixel

X-ray pixel intensities over time
Oxide

Variability in Semiconductor Manufacturing
MathAchSchool

School demographic data for MathAchieve
Glucose

Glucose levels over time
Assay

Bioassay on Cell Culture Plate
Fatigue

Cracks caused by metal fatigue
Gasoline

Refinery yield of gasoline
Muscle

Contraction of heart muscle sections
Oats

Split-plot Experiment on Varieties of Oats
Wheat2

Wheat Yield Trials
Quinidine

Quinidine Kinetics
Spruce

Growth of Spruce Trees
Remifentanil

Pharmacokinetics of remifentanil
Rail

Evaluation of Stress in Railway Rails
Cefamandole

Pharmacokinetics of Cefamandole
bdf

Language scores
ergoStool

Ergometrics experiment with stool types
PBG

Effect of Phenylbiguanide on Blood Pressure
Nitrendipene

Assay of nitrendipene
Glucose2

Glucose Levels Following Alcohol Ingestion
Phenobarb

Phenobarbitol Kinetics
BodyWeight

Rat weight over time for different diets
IGF

Radioimmunoassay of IGF-I Protein
Dialyzer

High-Flux Hemodialyzer