Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit 761fd8d

Browse files
committed
Fix pairwise.
1 parent b5a42c4 commit 761fd8d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

diffxpy/testing/tests.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,15 +1188,20 @@ def pairwise(
11881188

11891189
if test.lower() == 'z-test' or test.lower() == 'z_test' or test.lower() == 'ztest':
11901190
# -1 in formula removes intercept
1191-
dmat, _ = glm.utils.data.design_matrix(
1191+
dmat_loc, _ = glm.utils.data.design_matrix(
11921192
sample_description,
11931193
formula="~ 1 - 1 + grouping"
11941194
)
1195+
# Only intercept scale model
1196+
dmat_scale, _ = glm.utils.data.design_matrix(
1197+
sample_description,
1198+
formula="~ 1"
1199+
)
11951200
model = _fit(
11961201
noise_model=noise_model,
11971202
data=data,
1198-
design_loc=dmat,
1199-
design_scale=dmat,
1203+
design_loc=dmat_loc,
1204+
design_scale=dmat_scale,
12001205
gene_names=gene_names,
12011206
size_factors=size_factors,
12021207
init_a="closed_form",

0 commit comments

Comments
 (0)