mle_twochoiceRL: Maximum-likelihood estimation (MLE) of behavior in a...

Description Usage Arguments Value

View source: R/estimate_twochoiceRL.R

Description

This function runs the MLE technique to recover behavior in a two-choice decision task.

Usage

1
2
3
4
5
6
7
8
9
mle_twochoiceRL(
  data = NULL,
  param = list(init_x1, init_x2),
  fn = "mle.objectiveFunction",
  opt = "TRM",
  radius = c(tr_rad[1], tr_rad[2]),
  nRes = nRes,
  progress_bar = progress_bar
)

Arguments

data

simulated two-choice task data

param

randomly generated initial parameters

fn

objective function being minimized

opt

optimization algorithm used. Defaults to trust-region method (trm)

radius

starting and maximum allowed trust region radius. Defaults to 1 and 5.

nRes

number of restarts. Defaults to 5

progress_bar

tracks completion time of function. Defaults to TRUE.

Value

A list containing the sum log-likelihood, mle estimates of parameter 1 per subject, mle estimates of parameter 2 per subject, laplace values of parameter 1 per subject, laplace values of parameter 2 per subject.


psuthaharan/twochoiceRL documentation built on Dec. 22, 2021, 9:56 a.m.