File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -218,3 +218,19 @@ def test_sc_brexit():
218
218
len (result .prediction_model .idata .posterior .coords ["draw" ])
219
219
== sample_kwargs ["draws" ]
220
220
)
221
+
222
+
223
+ @pytest .mark .integration
224
+ def test_ancova ():
225
+ df = cp .load_data ("anova1" )
226
+ result = cp .pymc_experiments .PrePostNEGD (
227
+ df ,
228
+ formula = "post ~ 1 + C(group) + pre" ,
229
+ group_variable_name = "group" ,
230
+ pretreatment_variable_name = "pre" ,
231
+ prediction_model = cp .pymc_models .LinearRegression (),
232
+ )
233
+ assert isinstance (df , pd .DataFrame )
234
+ assert isinstance (result , cp .pymc_experiments .LinearRegression )
235
+ assert len (result .idata .posterior .coords ["chain" ]) == sample_kwargs ["chains" ]
236
+ assert len (result .idata .posterior .coords ["draw" ]) == sample_kwargs ["draws" ]
You can’t perform that action at this time.
0 commit comments