estimate_1_MAP: Estimation Method: Maximum A Posteriori (MAP)

View source: R/estimate_1_MAP.R

estimate_1_MAPR Documentation

Estimation Method: Maximum A Posteriori (MAP)

Description

This function first performs a maximum likelihood estimation (MLE) to obtain the best-fitting parameters for all subjects based on maximum likelihood. It then computes the likelihood-based posterior using user-specified prior distributions. Based on the current group-level data, the prior distributions are subsequently updated. This procedure is iteratively repeated until the likelihood-based posterior converges. The entire process is referred to as Expectation-Maximization with Maximum A Posteriori estimation(EM-MAP).

Usage

estimate_1_MAP(
  data,
  colnames,
  behrule,
  ids = NULL,
  models,
  funcs = NULL,
  priors,
  settings = NULL,
  lowers,
  uppers,
  control,
  ...
)

Arguments

data

A data frame in which each row represents a single trial, see data

colnames

Column names in the data frame, see colnames

behrule

The agent's implicitly formed internal rule, see behrule

ids

The Subject ID of the participant whose data needs to be fitted.

models

Reinforcement Learning Models

funcs

The functions forming the reinforcement learning model, see funcs

priors

Prior probability density function of the free parameters, see priors

settings

Other model settings, see settings

lowers

Lower bound of free parameters in each model.

uppers

Upper bound of free parameters in each model.

control

Settings manage various aspects of the iterative process, see control

...

Additional arguments passed to internal functions.

Value

An S3 object of class DataFrame containing, for each model, the estimated optimal parameters and associated model fit metrics.


multiRL documentation built on March 31, 2026, 5:06 p.m.