Learn R Programming

ggpmisc (version 0.6.0)

coef.lmodel2: Extract Model Coefficients

Description

coef is a generic function which extracts model coefficients from objects returned by modeling functions. coefficients is an alias for it.

Usage

# S3 method for lmodel2
coef(object, method = "MA", ...)

Value

A named numeric vector of length two.

Arguments

object

a fitted model object.

method

character One of the methods available in object.

...

ignored by this method.

Details

Function lmodel2() from package 'lmodel2' returns a fitted model object of class "lmodel2" which differs from that returned by lm(). Here we implement a coef() method for objects of this class. It differs from de generic method and that for lm objects in having an additional formal parameter method that must be used to select estimates based on which of the methods supported by lmodel2() are to be extracted. The returned object is identical in its structure to that returned by coef.lm().

See Also

lmodel2