@@ -107,58 +107,57 @@ def hmetad(
107
107
num_chains : int = 4 ,
108
108
** kwargs
109
109
):
110
- """Estimate parameters of the Bayesian meta-d' model with hyperparametes at the
111
- group level.
110
+ """Bayesian meta-d' model with hyperparametes at the group level.
112
111
113
112
Parameters
114
113
----------
115
- data : :py:class:`pandas.DataFrame` | None
114
+ data :
116
115
Dataframe. Note that this function can also directly be used as a Pandas
117
116
method, in which case this argument is no longer needed.
118
- nR_S1 : 1d array-like, list, string | None
117
+ nR_S1 :
119
118
Confience ratings (stimuli 1, correct and incorrect).
120
- nR_S2 : 1d array-like, list, string | None
119
+ nR_S2 :
121
120
Confience ratings (stimuli 2, correct and incorrect).
122
- stimuli : string | None
121
+ stimuli :
123
122
Name of the column containing the stimuli.
124
- accuracy : string | None
123
+ accuracy :
125
124
Name of the columns containing the accuracy.
126
- confidence : string | None
125
+ confidence :
127
126
Name of the column containing the confidence ratings.
128
- nRatings : int | None
127
+ nRatings :
129
128
Number of discrete ratings. If a continuous rating scale was used, and
130
129
the number of unique ratings does not match `nRatings`, will convert to
131
130
discrete ratings using :py:func:`metadpy.utils.discreteRatings`.
132
- within : string | None
131
+ within :
133
132
Name of column containing the within factor (condition comparison).
134
- between : string | None
133
+ between :
135
134
Name of column containing the between subject factor (group
136
135
comparison).
137
- subject : string | None
136
+ subject :
138
137
Name of column containing the subject identifier (only required if a
139
138
within-subject or a between-subject factor is provided).
140
- nbins : int
139
+ nbins :
141
140
If a continuous rating scale was using, `nbins` define the number of
142
141
discrete ratings when converting using
143
142
:py:func:`metadpy.utils.discreteRatings`. The default value is `4`.
144
- padding : boolean
143
+ padding :
145
144
If `True`, each response count in the output has the value of padAmount
146
145
added to it. Padding cells is desirable if trial counts of 0 interfere
147
146
with model fitting. If False, trial counts are not manipulated and 0s
148
147
may be present in the response count output. Default value for padding
149
148
is `False`.
150
- padAmount : float or None
149
+ padAmount :
151
150
The value to add to each response count if padCells is set to 1.
152
151
Default value is 1/(2*nRatings)
153
- sample_model : boolean
152
+ sample_model :
154
153
If `False`, only the model is returned without sampling.
155
- output : str
154
+ output :
156
155
The kind of outpute expected. If `"model"`, will return the model function and
157
156
the traces. If `"dataframe"`, will return a dataframe containing `d` (dprime),
158
157
`c` (criterion), `meta_d` (the meta-d prime) and `m_ratio` (`meta_d/d`).
159
- num_samples : int
158
+ num_samples :
160
159
The number of samples per chains to draw (defaults to `1000`).
161
- num_chains : int
160
+ num_chains :
162
161
The number of chains (defaults to `4`).
163
162
**kwargs : keyword arguments
164
163
All keyword arguments are passed to `func::pymc.sampling.sample`.
@@ -167,16 +166,15 @@ def hmetad(
167
166
-------
168
167
If `output="model"`:
169
168
170
- model : :py:class:`pymc.Model` instance
169
+ model :
171
170
The model PyMC as a :py:class:`pymc.Model`.
172
- traces : :py:class:`pymc.backends.base.MultiTrace` |
173
- :py:class:`arviz.InferenceData` | None
171
+ traces :
174
172
A `MultiTrace` or `ArviZ InferenceData` object that contains the samples. Only
175
173
returned if `sample_model` is set to `True`, otherwise set to None.
176
174
177
175
or
178
176
179
- results : pd.DataFrame
177
+ results :
180
178
If `output="dataframe"`, :py:class:`pandas.DataFrame` containing the values for
181
179
the following variables:
182
180
@@ -327,26 +325,27 @@ def extractParameters(
327
325
328
326
Parameters
329
327
----------
330
- nR_S1, nR_S2 : 1d array-like or list
328
+ nR_S1, nR_S2 :
331
329
Total number of responses in each response category, conditional on
332
330
presentation of S1 and S2. e.g. if `nR_S1 = [100 50 20 10 5 1]`, then
333
331
when stimulus S1 was presented, the subject had the following response
334
332
counts:
335
- * responded S1, rating=3 : 100 times
336
- * responded S1, rating=2 : 50 times
337
- * responded S1, rating=1 : 20 times
338
- * responded S2, rating=1 : 10 times
339
- * responded S2, rating=2 : 5 times
340
- * responded S2, rating=3 : 1 time
333
+ * responded S1, rating=3 : 100 times
334
+ * responded S1, rating=2 : 50 times
335
+ * responded S1, rating=1 : 20 times
336
+ * responded S2, rating=1 : 10 times
337
+ * responded S2, rating=2 : 5 times
338
+ * responded S2, rating=3 : 1 time
341
339
342
340
Return
343
341
------
344
- data : dict
342
+ data :
345
343
Dictionary of rates and task parameters.
346
344
347
- See also
345
+ See Also
348
346
--------
349
347
hmetad
348
+
350
349
"""
351
350
if isinstance (nR_S1 , list ):
352
351
nR_S1 = np .array (nR_S1 , dtype = float )
0 commit comments