Skip to content

Commit 43d86cc

Browse files
depreceated formula for lrt()
now explicitly formula_loc.
1 parent 9fa1e0b commit 43d86cc

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

diffxpy/testing/base.py

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,12 +2606,10 @@ def _fit(
26062606

26072607
def lrt(
26082608
data,
2609-
reduced_formula: str = None,
2610-
full_formula: str = None,
26112609
reduced_formula_loc: str = None,
26122610
full_formula_loc: str = None,
2613-
reduced_formula_scale: str = None,
2614-
full_formula_scale: str = None,
2611+
reduced_formula_scale: str = "~1",
2612+
full_formula_scale: str = "~1",
26152613
as_numeric: Union[List[str], Tuple[str], str] = (),
26162614
init_a: Union[np.ndarray, str] = "AUTO",
26172615
init_b: Union[np.ndarray, str] = "AUTO",
@@ -2621,7 +2619,7 @@ def lrt(
26212619
size_factors: np.ndarray = None,
26222620
batch_size: int = None,
26232621
training_strategy: Union[str, List[Dict[str, object]], Callable] = "AUTO",
2624-
quick_scale: bool = None,
2622+
quick_scale: bool = False,
26252623
dtype="float64",
26262624
**kwargs
26272625
):
@@ -2632,10 +2630,6 @@ def lrt(
26322630
use wald() for constraints.
26332631
26342632
:param data: input data
2635-
:param reduced_formula: formula
2636-
Reduced model formula for location and scale parameter models.
2637-
:param full_formula: formula
2638-
Full model formula for location and scale parameter models.
26392633
:param reduced_formula_loc: formula
26402634
Reduced model formula for location and scale parameter models.
26412635
If not specified, `reduced_formula` will be used instead.
@@ -2711,15 +2705,6 @@ def lrt(
27112705
if len(kwargs) != 0:
27122706
logger.info("additional kwargs: %s", str(kwargs))
27132707

2714-
if full_formula_loc is None:
2715-
full_formula_loc = full_formula
2716-
if reduced_formula_loc is None:
2717-
reduced_formula_loc = reduced_formula
2718-
if full_formula_scale is None:
2719-
full_formula_scale = full_formula
2720-
if reduced_formula_scale is None:
2721-
reduced_formula_scale = reduced_formula
2722-
27232708
if isinstance(as_numeric, str):
27242709
as_numeric = [as_numeric]
27252710

@@ -2817,7 +2802,7 @@ def wald(
28172802
size_factors: np.ndarray = None,
28182803
batch_size: int = None,
28192804
training_strategy: Union[str, List[Dict[str, object]], Callable] = "AUTO",
2820-
quick_scale: bool = None,
2805+
quick_scale: bool = False,
28212806
dtype="float64",
28222807
**kwargs
28232808
):

0 commit comments

Comments
 (0)