Scale method for the class 'glc' and 'gqc'

Share:

Description

Return the discriminant scores obtained by applying the general linear classifier to the fitted data.

Usage

1
2
3
4
## S3 method for class 'glc'
scale(x, initdb = FALSE, zlimit = Inf, ...)
## S3 method for class 'gqc'
scale(x, initdb = FALSE, zlimit = Inf, ...)

Arguments

x

object of class glc or gqc

initdb

optional logical. If TRUE, the returned vector represents the z-scores with respect to the initial parameters, rather than the fitted parameters. Defaults to FALSE.

zlimit

optional numeric. Used to truncate the scores beyond the speficied value. Default to Inf

...

further arguments (currently unused)

Note

The generic function scale is redefined to accept arguments other than x, center, and scale.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
data(subjdemo_2d)
fit.2dl <- glc(response ~ x + y, data=subjdemo_2d, 
    category=subjdemo_2d$category, zlimit=7)
scale(fit.2dl)

fit.2dq <- gqc(response ~ x + y, data=subjdemo_2d, 
    category=subjdemo_2d$category, zlimit=7)
scale(fit.2dq)


## Not run: 
#plots using the discriminant scores
require(Hmisc)
options(digits=3)
fit.2dl <- glc(response ~ x + y, data=subjdemo_2d, 
    category=subjdemo_2d$category, zlimit=7)
# z-scores based on the initial decision bound
# split by the true category membership
zinit <- split(scale(fit.2dl, initdb=TRUE), subjdemo_2d$category)
histbackback(zinit)

# z-scores based on the fitted decision bound
# split by the participants' response
zfit1 <- split(scale(fit.2dl, initdb=FALSE), subjdemo_2d$category)
histbackback(zfit1)

# z-scores based on the fitted decision bound
# split by the true category membership
zfit2 <- split(scale(fit.2dl, initdb=FALSE), subjdemo_2d$response)
histbackback(zfit2)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.