coef.glc {grt}R Documentation

Extract 'glc' or 'gcjc' coefficients

Description

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

Usage

## 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:

a_1x_1 + a_2x_2 \ldots a_nx_n + b = 0

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

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

Examples

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")

[Package grt version 0.2.1 Index]