rmodel_wrapper: Wrapper for individual model log likelihood function

View source: R/wrappers.R

rmodel_wrapperR Documentation

Wrapper for individual model log likelihood function

Description

This function performs some common steps such as rearrangeing the data pulling out parameter items into variable and combining the results of applying to model to different subsets of the data (accept and reject responses)

This function performs some common steps such as rearrangeing the data pulling out parameter items into variable and combining the results of applying to model to different subsets of the data (accept and reject responses)

Usage

rmodel_wrapper(x, data, model, contaminant_prob = 0.02, min_rt = 0, max_rt = 1)

rmodel_wrapper(x, data, model, contaminant_prob = 0.02, min_rt = 0, max_rt = 1)

Arguments

x

A named vector containing parameter values to test

data

The data for a single subject for which the likelihood should be calculated

model

The model to be wrapped and returned

contaminant_prob

The probability used for contaminant process in the modelling. A contaminant process is just a uniform random response in the allowable time window.

min_rt

The smallest possible response time in the data

max_rt

The largest possible response time in the data

Value

The log of the likelihood for the data under parameter values x

The log of the likelihood for the data under parameter values x


gjcooper/gcphd-model_of_dce documentation built on March 25, 2024, 8:57 a.m.