coef.glc: Extract 'glc' or 'gcjc' coefficients

Description Usage Arguments Details Examples

View source: R/glc.R

Description

Extracts the coefficients from the model object glc, glcStruct, or gcjc.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'glc'
coef(object, ...)

## S3 method for class 'glcStruct'
coef(object, ...)

## S3 method for class 'gcjc'
coef(object, ...)

Arguments

object

object of class glc or glcStruct

...

further arguments

Details

Both the object glc and glcStruct contain the parameters for the decision boundary in the form:

a1x1 + a2x2 … anxn + b = 0

This function transforms and returns the coefficients of the function solved with respect the xn.

For the object gcjc, a list of two coefficients (Intercepts) are returned.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(subjdemo_2d)
fit.2dl <- glc(response ~ x + y, data=subjdemo_2d,
    category=subjdemo_2d$category, zlimit=7)
plot(fit.2dl, fitdb=FALSE)
abline(coef(fit.2dl), col = "red")
abline(coef(fit.2dl$initpar))

fit.1dx <- update(fit.2dl, . ~ . -y)
abline(v=coef(fit.1dx), col="green")

fit.1dy <- update(fit.2dl, . ~ . -x)
abline(h=coef(fit.1dy), col="blue")

matsukik/grt documentation built on May 21, 2019, 12:57 p.m.