Fit a general conjunctive classifier.
gcjc(formula, data, category, par, config = 1, zlimit = Inf,
fixed = list(), equal.noise = TRUE, opt = c("nlminb", "optim"),
lower=-Inf, upper=Inf, control=list())
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.
A data frame from which variables specified in formula
are taken.
(Optional.) A factor specifying the true category membership of the stimuli.
object of class gcjcStruct
or a named list containing a set of initial parameters - that is, noise
and bias
(intercepts).
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.
numeric. The z-scores (or discriminant scores) beyond the specified value will be truncated. Default to Inf
.
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
.
logical. If set to TRUE
(default), two bounds will have the same noise parameter.
Bounds on the parameters. see ‘Details’ for default values.
object of the class gcjc
, i.e., a list containing the following components:
the terms
object used.
the matched call.
the design matrix used to fit the model.
the category vector as specified in the input.
the initial parameter used to fit the model.
the fitted parameter.
the log-likelihood at convergence.
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.
Ashby, F. G. (1992) Multidimensional models of perception and cognition. Lawrence Erlbaum Associates.
# NOT RUN {
data(subjdemo_cj)
m.cj <- gcjc(response ~ x1 + x2, data=subjdemo_cj,
config=2, category=subjdemo_cj$category, zlimit=7)
# }
Run the code above in your browser using DataLab