gcjc: General Conjunctive Classifier

Description Usage Arguments Details Value References See Also Examples

View source: R/gcjc.R

Description

Fit a general conjunctive classifier.

Usage

1
2
3
gcjc(formula, data, category, par, config = 1, zlimit = Inf,
    fixed = list(), equal.noise = TRUE, opt = c("nlminb", "optim"), 
    lower=-Inf, upper=Inf, control=list())

Arguments

formula

A formula of the form response ~ x1 + x2 + ..., where the response specifies the grouping factor (generally a participant's response) and the right hand side specifies the relevant dimensions or features of the stimuli.

data

A data frame from which variables specified in formula are taken.

category

(Optional.) A factor specifying the true category membership of the stimuli.

par

object of class gcjcStruct or a named list containing a set of initial parameters - that is, noise and bias (intercepts).

config

A numeric value specifying the location of the conjunctive category in relation to the category bounds. The value 1 indicates the category is on the top right (set as default), 2 indicates the top left, 3 indicates bottom left, and 4 indicates the bottom right.

zlimit

numeric. The z-scores (or discriminant scores) beyond the specified value will be truncated. Default to Inf.

fixed

A named list of logical vectors specifying whether each of noise and bias parameters should be fixed to the initial value. Default to list(noise=c(FALSE, TRUE), bias=FALSE). A fatal error will be returned if set to all TRUE.

equal.noise

logical. If set to TRUE (default), two bounds will have the same noise parameter.

opt

A character string specifying the optimizer to be used: either nlminb (the default) or optim. If “optim”, “L-BFGS-B” method is used (see ‘Details’ of optim) .

lower, upper

Bounds on the parameters. see ‘Details’ for default values.

control

A list of control parameters passed to the internal optimization function. See ‘Details’ of nlminb or optim.

Details

If par is not fully specified in the argument, the function attempts to calculate the initial parameter values based on means by category or by response.

The default lower and upper values are selected based on the range of the data input so that the decision bound is found within the range of the data and convergence can be reached.

Value

object of the class gcjc, i.e., a list containing the following components:

terms

the terms object used.

call

the matched call.

model

the design matrix used to fit the model.

category

the category vector as specified in the input.

initpar

the initial parameter used to fit the model.

par

the fitted parameter.

logLik

the log-likelihood at convergence.

References

Ashby, F. G. (1992) Multidimensional models of perception and cognition. Lawrence Erlbaum Associates.

See Also

glc, logLik.gcjc, coef.gcjc, plot.gcjc

Examples

1
2
3
4
data(subjdemo_cj)

m.cj <- gcjc(response ~ x1 + x2, data=subjdemo_cj, 
  config=2, category=subjdemo_cj$category, zlimit=7)

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