Skip to content

2.2.0

Latest

Choose a tag to compare

@QuentinAndre QuentinAndre released this 29 Sep 13:04
· 1 commit to master since this release

Additive release, tracked in the
2.2.0 milestone.
Nothing written against 2.1 stops working; the defaults are unchanged.

Added

  • Multicategorical X and moderators, PROCESS's mcx and mcw options (mcz, mcv, mcq for the other moderator symbols): indicator, sequential, Helmert and effect coding; relative direct, conditional direct, indirect and conditional indirect effects per code; omnibus tests of the direct effect and of the equality of conditional means; the index of moderated mediation per code of X or of the moderator; an X column in the tables and an x_code column in tidy(). Groups may be numbers, strings or a pandas Categorical (also #24). Checked against PROCESS for R 5.0 on 23 cases (tests/Results/v5/mc, generated by tests/fixtures/regenerate.py --suite mc). Not yet with a multicategorical variable: the two-moderator indices, the floodlight analysis, the plots and contrast (#17).
  • family="negbin": negative binomial regression for a count outcome Y (NB2, log link, maximum likelihood, batched over the bootstrap like the logistic fits), a PyProcessMacro extension that PROCESS does not offer; the mediator equations stay OLS. family="logit" is the same as logit=True. glance() gains an alpha column and to_statsmodels() returns the NegativeBinomial refit (#25).
  • spotlight option for the values at which continuous moderators are probed: "moments" (the default, and the PROCESS 2 rule), "percentiles" (the 16th, 50th and 84th percentiles computed as PROCESS 3 and later do) or "quantiles" (the quantile=True rule). Under "percentiles" a moderator is probed at its two values only when dichotomous, as PROCESS does (#87, #90).
  • intprobe option: models 1 to 3 report their conditional effects only when the highest-order interaction of X has p at most intprobe (default 1, always, as PROCESS 2; PROCESS 3 and later use 0.10). direct_model.probe_p and direct_model.probed expose the test PROCESS compares to it: the coefficient's test for OLS, a likelihood-ratio test for a binary outcome (#87).
  • The initialization banner, summary() and the notebook display start with the conventions in force (interval type, spotlight rule, probing threshold) and the PROCESS release each is the default of, so a saved output says how its numbers were produced (#87).
  • Models 23 to 27 and 30 to 57 (retired in PROCESS 3.0) and 74 (retired in 4.0), none of which exists in PROCESS 5, are estimated as PROCESS 2.16 defined them with a note, also raised as a UserWarning, naming the release that retired them (#91).
  • README section on the three defaults PROCESS 3.0 changed (bootstrap interval type, spotlight values, probing threshold) and the two options that reproduce PROCESS 3, 4 or 5: percent=True, spotlight="percentiles" (#90).
  • The PROCESS 5 comparison test fits with those two options and lets PyProcessMacro compute the spotlight values, which checks its percentile rule against PROCESS's (#87).
  • Comparison files produced with PROCESS for R version 5.0 for every model PROCESS 5 defines (tests/Results/v5), the generator that makes them from Hayes's process.R (tests/fixtures/regenerate.py), and a v5-marked test that checks what 2.x already claims to reproduce against them and lists the deliberate differences for 3.0. The 2.16 files remain the accuracy reference for 2.x (#82).
  • Model 6 is compared to the PROCESS 2.16 output file that was already in the repository (#69).

Changed

  • The bootstrap fits resamples in cache-sized batches (100 000 values per chunk instead of 10 million): 1.5 to 3.5 times faster than one-by-one fits, where the 2.1 setting was no faster and slower beyond a few thousand observations. Same draws, same results (#96).
  • The error for an invalid quantile value named the wrong option.

Fixed

  • README: the Model 6 section said that no PROCESS output file for it was part of the fixtures (#88).