vcov.gsl_nls: Calculate variance-covariance matrix

View source: R/nls_methods.R

vcov.gsl_nlsR Documentation

Calculate variance-covariance matrix

Description

Returns the estimated variance-covariance matrix of the model parameters from a fitted "gsl_nls" object.

Usage

## S3 method for class 'gsl_nls'
vcov(object, ...)

Arguments

object

An object inheriting from class "gsl_nls".

...

At present no optional arguments are used.

Value

A matrix containing the estimated covariances between the parameter estimates similar to vcov with row and column names corresponding to the parameter names given by coef.gsl_nls.

See Also

vcov

Examples

## data
set.seed(1)
n <- 50
xy <- data.frame(
  x = (1:n) / n, 
  y = 2.5 * exp(-1.5 * (1:n) / n) + rnorm(n, sd = 0.1)
)
## model
obj <- gsl_nls(fn = y ~ A * exp(-lam * x), data = xy, start = c(A = 1, lam = 1))

vcov(obj)

gslnls documentation built on Jan. 17, 2023, 5:15 p.m.

Related to vcov.gsl_nls in gslnls...