metadpy.utils.trialSimulation#

metadpy.utils.trialSimulation(d: float = 1.0, metad: float = 2.0, mRatio: float = 1, c: float = 0, nRatings: int = 4, nTrials: int = 500) DataFrame[source]#

Simulate nR_S1 and nR_S2 response counts.

Parameters
dfloat

Type 1 task performance (d prime).

metadfloat

Type 2 sensitivity in units of type 1 dprime.

mRatiofloat

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

cfloat

Type 1 task bias (criterion).

nRatingsint

Number of ratings.

nTrialsint

Set the number of trials performed.

Returns
output_dfpandas.DataFrame

A DataFrame (nRows==`nTrials`) containing the responses and confidence rating for one participant given the provided parameters.

See also

ratings2df

References

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