param_recovery: Parameter Recovery for Model Testing without Experimental...

View source: R/param_recovery.r

param_recoveryR Documentation

Parameter Recovery for Model Testing without Experimental Data

Description

This function extracts DDM parameters from a Stanfit object run on simulated data. Then, it and compares those parameters fitted on simulated data with the parameters used to simulate the data in the first place. This function is intended to check if the model is capable to "recover" parameters which are known. Plots for visual inspection are made automatically. Automatic fit diagnostics yet to be implementd with this function. The comparison is done for each parameter over all iterations to detect convergence problems or to spot difficult parameter spaces.

Usage

param_recovery(fit, n_subjects, auth_params,
  model_name = "NAME_UNDEFINED")

Arguments

fit

Stanfit object fitted on synthetic data.

n_subjects

Number of "Simulated Subjects".

auth_params

"Ground-truth" parameters used to simulate the data. In the form of the output from the function makeFakeParams.

model_name

Optional name for the model to distinguish the plots and created folder easier. Default is 'NAME_UNDEFINED'.

Value

Creates a folder and saves plots which compare recovered parameters and "ground-truth" parameters for each iteration of the MCMC sampler.


Seneketh/StanDDM documentation built on Oct. 17, 2023, 4:26 p.m.