Learn R Programming

grt (version 0.1.0)

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

Description

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

Usage

## S3 method for class 'glc':
scale(x, initdb = FALSE, zlimit = Inf, \dots)
## S3 method for class 'gqc':
scale(x, initdb = FALSE, zlimit = Inf, \dots)

Arguments

x
object of class glc or gqc
initdb
optional logical. If TRUE, the returned vector represents the z-scores with repect to the initial parameters, rather than the fitted parameters. Defaults to FALSE.
zlimit
optional numeric. Used to truncate the the scores beyound the speficied value. Default to Inf
...
further arguments (currently unused)

Examples

Run this code
data(subjdemo_2d)
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 pariticipants 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)

Run the code above in your browser using DataLab