@@ -145,28 +145,24 @@ def var_to_ci(y, v, n):
145145# The two combination models in PyMARE are Stouffer's and Fisher's Tests.
146146#
147147# Notice that these models don't use :class:`pymare.core.Dataset` objects.
148- stouff = pymare .estimators .Stouffers (input = 'z' )
149- stouff .fit (y = z [:, None ])
150- stouff_summary = stouff .summary ()
148+ stouff = pymare .estimators .StoufferCombinationTest ()
149+ stouff .fit (z [:, None ])
151150print ('Stouffers' )
152- print ('z: {}' .format (stouff_summary .z ))
153- print ('p: {}' .format (stouff_summary .p ))
151+ print ('p: {}' .format (stouff .params_ ["p" ]))
154152print ()
155153
156- fisher = pymare .estimators .Fishers (input = 'z' )
157- fisher .fit (y = z [:, None ])
158- fisher_summary = fisher .summary ()
154+ fisher = pymare .estimators .FisherCombinationTest ()
155+ fisher .fit (z [:, None ])
159156print ('Fishers' )
160- print ('z: {}' .format (fisher_summary .z ))
161- print ('p: {}' .format (fisher_summary .p ))
157+ print ('p: {}' .format (fisher .params_ ["p" ]))
162158
163159###############################################################################
164160# Now we have a fixed effects model
165161# `````````````````````````````````````````````````````````````````````````````
166162# This estimator does not attempt to estimate between-study variance.
167163# Instead, it takes ``tau2`` (:math:`\tau^{2}`) as an argument.
168164wls = pymare .estimators .WeightedLeastSquares ()
169- wls .fit (dset )
165+ wls .fit_dataset (dset )
170166wls_summary = wls .summary ()
171167results ['Weighted Least Squares' ] = wls_summary .to_df ()
172168print ('Weighted Least Squares' )
@@ -184,31 +180,31 @@ def var_to_ci(y, v, n):
184180# can use either maximum-likelihood (ML) or restricted maximum-likelihood (REML)
185181# to iteratively estimate it.
186182dsl = pymare .estimators .DerSimonianLaird ()
187- dsl .fit (dset )
183+ dsl .fit_dataset (dset )
188184dsl_summary = dsl .summary ()
189185results ['DerSimonian-Laird' ] = dsl_summary .to_df ()
190186print ('DerSimonian-Laird' )
191187print (dsl_summary .to_df ().T )
192188print ()
193189
194190hedge = pymare .estimators .Hedges ()
195- hedge .fit (dset )
191+ hedge .fit_dataset (dset )
196192hedge_summary = hedge .summary ()
197193results ['Hedges' ] = hedge_summary .to_df ()
198194print ('Hedges' )
199195print (hedge_summary .to_df ().T )
200196print ()
201197
202198vb_ml = pymare .estimators .VarianceBasedLikelihoodEstimator (method = 'ML' )
203- vb_ml .fit (dset )
199+ vb_ml .fit_dataset (dset )
204200vb_ml_summary = vb_ml .summary ()
205201results ['Variance-Based with ML' ] = vb_ml_summary .to_df ()
206202print ('Variance-Based with ML' )
207203print (vb_ml_summary .to_df ().T )
208204print ()
209205
210206vb_reml = pymare .estimators .VarianceBasedLikelihoodEstimator (method = 'REML' )
211- vb_reml .fit (dset )
207+ vb_reml .fit_dataset (dset )
212208vb_reml_summary = vb_reml .summary ()
213209results ['Variance-Based with REML' ] = vb_reml_summary .to_df ()
214210print ('Variance-Based with REML' )
@@ -219,15 +215,15 @@ def var_to_ci(y, v, n):
219215# using ``y`` and ``n``, but assumes within-study variance is homogenous
220216# across studies.
221217sb_ml = pymare .estimators .SampleSizeBasedLikelihoodEstimator (method = 'ML' )
222- sb_ml .fit (dset )
218+ sb_ml .fit_dataset (dset )
223219sb_ml_summary = sb_ml .summary ()
224220results ['Sample Size-Based with ML' ] = sb_ml_summary .to_df ()
225221print ('Sample Size-Based with ML' )
226222print (sb_ml_summary .to_df ().T )
227223print ()
228224
229225sb_reml = pymare .estimators .SampleSizeBasedLikelihoodEstimator (method = 'REML' )
230- sb_reml .fit (dset )
226+ sb_reml .fit_dataset (dset )
231227sb_reml_summary = sb_reml .summary ()
232228results ['Sample Size-Based with REML' ] = sb_reml_summary .to_df ()
233229print ('Sample Size-Based with REML' )
0 commit comments