metadpy.utils.pairedResponseSimulation#

metadpy.utils.pairedResponseSimulation(d: float = 1.0, d_sigma: float = 0.1, mRatio: list = [1, 0.6], mRatio_sigma: float = 0.2, mRatio_rho: float = 0, c: float = 0, c_sigma: float = 0.1, nRatings: int = 4, nTrials: int = 500, nSubjects: int = 20) DataFrame[source]#

Simulate response and confidence ratings a group with 2 experimental conditions.

Parameters
d

Type 1 task performance (d prime).

d_sigma

Include some between-subject variability for d prime.

mRatio

Specify Mratio (meta-d/d’). If len(mRatio)>1, mRatios are assumed to be drawn from a repeated measures design.

mRatio_sigma

Include some variability in the mRatio scores.

mRatio_rho

Specify the correlation between the two Mratios.

c

Type 1 task bias (criterion).

c_sigma

Include some between-subject variability for criterion.

nRatings

Number of ratings.

nTrials

Set the number of trials performed.

nSubjects

Specify the number of subject who performed the task. Defaults to 20.

Returns
output_df

A DataFrame (nRows==`nTrials` * nSubjects) containing the responses and confidence rating for one or many participants given the provided parameters.

See also

ratings2df

References

This function is adapted from the Matlab cpc_metad_sim function from: metacoglab/HMeta-d