Maximising responses with error

Share:

Description

Construct a MaxResponse object.

Usage

1
2
MaxResponse(formula,data,parameters=list(beta=2.944439),ntimes=NULL,
  replicate=TRUE,fixed,parStruct,subset)

Arguments

formula

an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted. For more details of model specification, see lm or glm.

data

(optional) data frame.

parameters

an (optional) named list with (starting) values of the parameters. The model has one parameter (beta), which sets the error rate (see details). If no values are supplied, defaults are used.

ntimes

an optional vector with, for each repetition in the data, the total number of trials.

replicate

logical to indicate whether model parameters are identical for each replication in ntimes.

fixed

a logical vector indicating whether model parameters are fixed or free

parStruct

a ParStruct object. If supplied, the fixed argument above will be ignored

subset

(optional) subset.

Details

The MaxResponse function sets up a MaxResponse model. This model predicts categorical responses R = 1,...,k on the basis of predictors x[j], j = 1,...,k, as P(R=j) = 1 - exp(beta)/(1+exp(beta)) if j = arg max x[j] and P(R=j) = exp(beta)/(1+exp(beta)) otherwise.

Value

A (fitted) object of class MaxResponse.