Learn R Programming

WMCapacity (version 0.9.6.2)

womRPredVals: Compute predicted values for working memory models in the package WMCapacity

Description

The RPredVals function computes predicted response probabilities for a specified working memory model and design, given values of the effect parameters. This function is useful for model checking.

Usage

womRPredVals(x,setup)

Arguments

x
the vector containing values at which to evaluate the function.
setup
a list object, created by means of the womExtractModel function, containing the model specification.

Value

  • A vector of predicted probabilities; each element corresponds to a trial.

Details

The womRPredVals function computes predicted probabilities for the model and design specified by the setup argument. The probability of responding ``change'' in a change detection task is predicted for each trial.

For further details, see the user's manual at http://wmcapacity.r-forge.r-project.org/.

See Also

wommbatGUI, for fitting the working memory models, and womExtractModel for extracting a model specification.

Examples

Run this code
## load Visual Array data set (Rouder et al., 2008)
     data(VisualArray)

     wommbatGUI(dataFrame = VisualArray)
     
	 ## Once the model is defined via the GUI, 
     ## compute log-likelihood at posterior mean
	 ## replace 'Model' with model name (in quotes)
	 myModel = womExtractModel('Model')
	 posteriorMean = myModel$results$pointEst[,5]
	 
	 womRPredVals(posteriorMean,myModel)

Run the code above in your browser using DataLab