setCov-set: Install an already-computed covariance result on a fit

setCov<-R Documentation

Install an already-computed covariance result on a fit

Description

setCov(fit) <- value installs the covariance carried by value as the fit's covariance, the way setCov(fit, method) installs one it computes: the matrix is checked for positive definiteness, the standard errors are refreshed, and the prior covariance is kept in fit$covList. The options that produced value are recorded too, so a later setCov(fit, method, control = ...) reuses it only when the options it asks for are the same.

Usage

setCov(fit, method = NULL, ...) <- value

Arguments

fit

nlmixr2 fit

method

covariance-method name to install value as; NULL lets setCovValue() choose

...

passed to setCovValue()

value

a covariance matrix named like fit$cov, or a result with a setCovValue() method

Details

value is dispatched on through setCovValue(): a covariance matrix is installed as method (default "user") with no options, and other packages add methods for their own results (for example a SIR run), returning the matrix, the method name and the options.

Value

the fit, with its covariance updated

Author(s)

Matt Fidler

See Also

setCov(), setCovOptions()

Examples

## Not run: 
setCov(fit) <- fit$cov * 2
setCov(fit, "doubled") <- fit$cov * 2

## End(Not run)

nlmixr2est documentation built on Sept. 20, 2026, 9:08 a.m.