@@ -107,58 +107,57 @@ def hmetad(
107107 num_chains : int = 4 ,
108108 ** kwargs
109109):
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.
112111
113112 Parameters
114113 ----------
115- data : :py:class:`pandas.DataFrame` | None
114+ data :
116115 Dataframe. Note that this function can also directly be used as a Pandas
117116 method, in which case this argument is no longer needed.
118- nR_S1 : 1d array-like, list, string | None
117+ nR_S1 :
119118 Confience ratings (stimuli 1, correct and incorrect).
120- nR_S2 : 1d array-like, list, string | None
119+ nR_S2 :
121120 Confience ratings (stimuli 2, correct and incorrect).
122- stimuli : string | None
121+ stimuli :
123122 Name of the column containing the stimuli.
124- accuracy : string | None
123+ accuracy :
125124 Name of the columns containing the accuracy.
126- confidence : string | None
125+ confidence :
127126 Name of the column containing the confidence ratings.
128- nRatings : int | None
127+ nRatings :
129128 Number of discrete ratings. If a continuous rating scale was used, and
130129 the number of unique ratings does not match `nRatings`, will convert to
131130 discrete ratings using :py:func:`metadpy.utils.discreteRatings`.
132- within : string | None
131+ within :
133132 Name of column containing the within factor (condition comparison).
134- between : string | None
133+ between :
135134 Name of column containing the between subject factor (group
136135 comparison).
137- subject : string | None
136+ subject :
138137 Name of column containing the subject identifier (only required if a
139138 within-subject or a between-subject factor is provided).
140- nbins : int
139+ nbins :
141140 If a continuous rating scale was using, `nbins` define the number of
142141 discrete ratings when converting using
143142 :py:func:`metadpy.utils.discreteRatings`. The default value is `4`.
144- padding : boolean
143+ padding :
145144 If `True`, each response count in the output has the value of padAmount
146145 added to it. Padding cells is desirable if trial counts of 0 interfere
147146 with model fitting. If False, trial counts are not manipulated and 0s
148147 may be present in the response count output. Default value for padding
149148 is `False`.
150- padAmount : float or None
149+ padAmount :
151150 The value to add to each response count if padCells is set to 1.
152151 Default value is 1/(2*nRatings)
153- sample_model : boolean
152+ sample_model :
154153 If `False`, only the model is returned without sampling.
155- output : str
154+ output :
156155 The kind of outpute expected. If `"model"`, will return the model function and
157156 the traces. If `"dataframe"`, will return a dataframe containing `d` (dprime),
158157 `c` (criterion), `meta_d` (the meta-d prime) and `m_ratio` (`meta_d/d`).
159- num_samples : int
158+ num_samples :
160159 The number of samples per chains to draw (defaults to `1000`).
161- num_chains : int
160+ num_chains :
162161 The number of chains (defaults to `4`).
163162 **kwargs : keyword arguments
164163 All keyword arguments are passed to `func::pymc.sampling.sample`.
@@ -167,16 +166,15 @@ def hmetad(
167166 -------
168167 If `output="model"`:
169168
170- model : :py:class:`pymc.Model` instance
169+ model :
171170 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 :
174172 A `MultiTrace` or `ArviZ InferenceData` object that contains the samples. Only
175173 returned if `sample_model` is set to `True`, otherwise set to None.
176174
177175 or
178176
179- results : pd.DataFrame
177+ results :
180178 If `output="dataframe"`, :py:class:`pandas.DataFrame` containing the values for
181179 the following variables:
182180
@@ -327,26 +325,27 @@ def extractParameters(
327325
328326 Parameters
329327 ----------
330- nR_S1, nR_S2 : 1d array-like or list
328+ nR_S1, nR_S2 :
331329 Total number of responses in each response category, conditional on
332330 presentation of S1 and S2. e.g. if `nR_S1 = [100 50 20 10 5 1]`, then
333331 when stimulus S1 was presented, the subject had the following response
334332 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
341339
342340 Return
343341 ------
344- data : dict
342+ data :
345343 Dictionary of rates and task parameters.
346344
347- See also
345+ See Also
348346 --------
349347 hmetad
348+
350349 """
351350 if isinstance (nR_S1 , list ):
352351 nR_S1 = np .array (nR_S1 , dtype = float )
0 commit comments