- Join over
**1.5M+ people** - Join over
**100K+ communities** - Free
**without limits** - Create
**your own community**

- May 23 00:52raphaelvallat labeled #97
- May 23 00:52raphaelvallat assigned #97
- May 23 00:52raphaelvallat commented #97
- May 22 20:49adam2392 opened #97
- May 22 04:49
raphaelvallat on develop

Returns NaN in bicor if mad(x) … (compare)

- May 21 16:20
raphaelvallat on develop

flake8 (compare)

- May 21 16:09
raphaelvallat on develop

Update partial_corr to assert t… Merge pull request #96 from jne… Merge branch 'master' into deve… (compare)

- May 21 16:08
raphaelvallat on master

Update partial_corr to assert t… Merge pull request #96 from jne… (compare)

- May 21 16:08raphaelvallat closed #96
- May 21 16:08raphaelvallat commented #96
- May 21 11:38codecov[bot] commented #96
- May 21 11:38codecov[bot] commented #96
- May 21 11:36codecov[bot] commented #96
- May 21 11:27jnecus opened #96
- May 21 00:36
raphaelvallat on develop

Added support for biweight midc… (compare)

- May 18 19:23
raphaelvallat on develop

Use T instead of Z distribution… (compare)

- May 18 07:35
raphaelvallat on develop

Use @ instead of .dot (compare)

- May 18 07:24raphaelvallat commented #95
- May 18 07:10
raphaelvallat on develop

Major: First working version of… (compare)

- May 16 07:19
raphaelvallat on develop

Updated formula for CLES (compare)

Thanks for your sharp eyes @manfredh_twitter ! So indeed I think there are two separate issues here:

1) The y-label is not correct, it should be X - Y

2) For some reasons, the figure on Pingouin's website were not updated when I released the latest version.

I'll try to fix that soon!

1) The y-label is not correct, it should be X - Y

2) For some reasons, the figure on Pingouin's website were not updated when I released the latest version.

I'll try to fix that soon!

so it's only another depiction. or is there some deeper meaning?

Hi pingouin users! I'm working with the mediation_analysis function and am wondering if there is any way to incorporate repeated measures data? Perhaps via mixed effects?

Currently, I have X_t1, M_t1, and Y_t2 as my variables (where _t1 and _t2 represents the variable assessed at timepoint 1 or timepoint 2, respectively). If I only use these three variables, then the model is fine because no two variables have dependency due to repeated measurement (i.e., I'm only using Y_t2, not Y_t1 and Y_t2 in model; similarly, I only use X_t1, not X_t1 and X_t2). But I would like to include Y_t1 as a covariate, which introduces correlated data into the model.

Currently, I have X_t1, M_t1, and Y_t2 as my variables (where _t1 and _t2 represents the variable assessed at timepoint 1 or timepoint 2, respectively). If I only use these three variables, then the model is fine because no two variables have dependency due to repeated measurement (i.e., I'm only using Y_t2, not Y_t1 and Y_t2 in model; similarly, I only use X_t1, not X_t1 and X_t2). But I would like to include Y_t1 as a covariate, which introduces correlated data into the model.

Hi @LindenParkes_twitter! Unfortunately, this is not possible right now in Pingouin, and I doubt that it will be in the near future. From my understanding, there does not seem to be a gold standard to do mediation analyses with repeated measures, even though some methods have been developed in recent years (e.g. http://afhayes.com/public/aps2015mh.pdf). Alternatively, you can perhaps regress your covariate

`Y_t2`

to all the other variables separately, get the residuals, and then apply a mediation on the residuals...?
Hi @manfredh_twitter ! I just pushed a commit on the develop branch to fix the plot_shift function, which now returns the Y - X quantiles (in other words, I did not change the label to X - Y, but instead I changed the code to calculate the Y - X quantile, as it was before v0.3.0, but still keeping the robust estimator implemented in v0.3.0). This will be released in the next stable version of Pingouin, but if by any chance you can try the new function on your own data with the develop version of Pingouin (cloned from GitHub, then switch to the develop branch then

`python setup.py develop`

), that would be fantastic! Thank you! Commit: raphaelvallat/pingouin@774a5c4
it works! btw: thats my own implementation of shift plot (for personal use), so that i can add labels and change colors...

np.random.seed(42)

x = np.random.normal(5.5, 2, 50)

y = np.random.normal(6, 1.5, 50)

fig = sp.shift_plot(x, y, n_boot=5000, percentiles=[25, 50, 75],

ci=0.95, show_median=True, show_mean=False, violin=True,

xlab="Item X", ylab="Item Y", score="Preferenceranking",

size=2)

x = np.random.normal(5.5, 2, 50)

y = np.random.normal(6, 1.5, 50)

fig = sp.shift_plot(x, y, n_boot=5000, percentiles=[25, 50, 75],

ci=0.95, show_median=True, show_mean=False, violin=True,

xlab="Item X", ylab="Item Y", score="Preferenceranking",

size=2)

```
23 b
^
```

SyntaxError: invalid syntax
this name worked perfectly in rm_corr

I get also this error for other strings. I don't understand why some are ok and other not?

tks for your help!

Hi @garincle, this is surprising. First, the error is not caused by Pingouin but by an internal call to statsmodels and patsy. I'd therefore recommend you upgrade these two libraries. Second, a "b" before a string means that the string is encoded as bytes. However, in this case the "b" is at the end of the string so I really don't see why you would get an error here. Could you send a list of strings that work and strings that do not work? Anyway, for now I think the quickest fix is to rename your variable (e.g. y="Region"). Thanks

Don't works

8Bm

23c

14r

11l

24a_prime

works

STGr

CA1

Clear

MGad

MGmc

MGz

MGpd

OT

Iapl

Ri

it seems that starting with a number cause the problem

all packages are already up to date

Hi Raphael, thank you so much for creating Pigouin - I've found it extremely useful! I have one question regarding the mixed_anova function, could it work for N-ways mixed-ANOVA (i.e., 3-way mix ANOVA)? The documentation for the mixed_anova, doesn't state that it's intended for N-ways, so I'm guessing it is only intended to perform 2-ways, is that correct? Thanks!

Hi @NathaTJ ! Thanks so much for the feedback, I appreciate it! The

`mixed_anova`

function only accepts 2-way mixed design (e.g. one within and one between factor). I want at some point to have more than 2-ways but I doubt this will be implemented in the near future. For now, I'd recommend using R (e.g.ezANOVA package), or the JASP or JAMOVI free softwares. Thank you!
Hi @raphaelvallat, thank you for the prompt response - I very much appreciate the time. Thank you for clarifying that the mixed_anova function only accepts 2 factors (BW), and informing me that it may not be implemented in the near future. I will take your advice and implement the 3-way mix Anova with ezANOVA package in R. Thank you!

hi @RM_04_gitlab i adapted the code of the shift plot module a little bit last year so that i can design the figure. i also emailed @raphaelvallat my version. if it's ok from raphaels point i can email you the code. or maybe he plans to implement some design features himself and then everybody has it. i'll wait for his reply on that before i send out changed versions of his work.

Hi @abrueggeman ! 2 within subject factors are supported by this function so it would work. Can you check that your variable

`df`

is a Pandas DataFrame? Can you also share a screenshot of the full error message? Thanks
The data variable is a Pandas DataFrame. Using the exact same parameters with rm_anova works fine.

Hi, I'd like to perform a mediation analysis on panel data. From the instructions I'm unsure whether that is possible using pingouin.mediation_analysis. I'm able to perform the mediation analysis on my data but the results are slightly different to what I'd get calculating everything "manually"