Questions tagged [pingouin]

Pingouin is an open-source statistical package written in Python 3 and based mostly on Pandas and NumPy.

17 questions
4
votes
0 answers

How to fix python error code -> cannot import name 'studentized_range' from 'scipy.stats'

I'm importing the following packages into Jupyter Lab and I keep getting an error whenever I try to import the "pingouin" library as follows: import scipy.stats as stats import seaborn as sns from sklearn.linear_model import LinearRegression from…
Mostafa Skafi
  • 41
  • 1
  • 3
2
votes
1 answer

Pingouin rcorr heatmap

I’ve been using Pandas .corr() with Seaborn to generate a heatmap showing correlation, but want to switch to Pingouin’s .rcorr() to give a bit more control. import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as…
molcode
  • 25
  • 4
2
votes
0 answers

Which is the better way of getting significantly correlated features with respect to outcome variable?

I have a dataset with 2112 features and 2337 entries. I am trying to see the correlation between these features and the dependent variable. All of the features and the outcome variable are numeric. The features have been standard scaled. I am trying…
Echo
  • 570
  • 1
  • 7
  • 21
2
votes
0 answers

Pingouin mixed anova not reporting Greenhouse-Geisser corrected p-values

I am running a mixed model anova using Pingouin, but I can't get it to report the Greenhouse-Geisser corrected p-values My data is structured like…
Navot Naor
  • 59
  • 5
1
vote
1 answer

python pingouin cronbach alpha return value

from pingouin import cronbach_alpha import pandas as pd ca_test = pd.DataFrame({'Score1': \[3,4,2,1,3\], 'Score2': \[5,5,2,2,1\], 'Score3': \[5,2,1,3,4\]}) alpha_all = cronbach_alpha(data=ca_test) print(alpha_all,alpha) # it prints …
1
vote
2 answers

p-value and null hypothesis for the alternatives of scipy.stats.mannwhitneyu

I'm using the pingouin library in python which in-turn uses scipy.stats for it's implementation of Mann-Whitney U tests. Looking at the example code we see two independent data sets x and y where the distribution sorting x is less than y My…
Matt Ahrens
  • 129
  • 7
1
vote
0 answers

ImportError: cannot import module from scipy.stats using Pingouin

This issue is appearing in a local Jupyter notebook and I'm using Python 3.10 Importing scipy and scipy.stats is no problem. import scipy import scipy.stats However, I'm trying to use the Pingouin library for data analysis and running into issues…
1
vote
1 answer

DataFrame to DataFrameRow conversion (Julia)

I'm using Pingouin.jl to test normality. In their docs, we have dataset = Pingouin.read_dataset("mediation") Pingouin.normality(dataset, method="jarque_bera") Which should return a DataFrame with normality true or false for each name in the…
BuddhiLW
  • 608
  • 3
  • 9
1
vote
0 answers

Pearsonr & pvalues on large dataset including nulls

I have a datafile of ~375 cell lines and ~14,000 genes. I'm attempting to compute the pairwise correlations for each gene with every other gene. Code is very simple as I'm using the pingouin package: import pandas as pd import pingouin as pg df =…
JGamma
  • 11
  • 2
1
vote
1 answer

pg.pairwise_corr error: x and y must be 1D array

trying with the pg.pairwise_corr method I get the following error: pg.pairwise_corr(df) /usr/local/lib/python3.7/dist-packages/pingouin/correlation.py in corr(x, y, tail, method, **kwargs) 507 x = np.asarray(x) 508 y =…
Becca
  • 11
  • 1
0
votes
0 answers

Repeated measures correlation in python using pingouin package

I want to compute the correlation between two variables (ex. A and B) across all my participants. Because my observations are not independent because I have multiple observations per participant, I computed a repeated measures correlation using…
marye
  • 1
0
votes
0 answers

how to get sphericity from pingouin.mixed_anova?

so according to the docu https://pingouin-stats.org/generated/pingouin.mixed_anova.html#pingouin.mixed_anova mixed_anova returns a DataFrame object including sphericity. aov = mixed_anova(...) display(aov) this doesnt show the sphericity. and…
Niklas
  • 1
  • 1
0
votes
0 answers

How to organize my data for a 2-way repeated measures ANOVA (python)

I'm coming from SPSS where I was taught that each line is an individual person's score. Right now, however, I have long-form data, where each person's attitude was measured before and after seeing a photo, 24 times. participant attitude…
0
votes
0 answers

t test several subgroups using groupby

lets say I have this dataframe: data = {"col1":["yes", "no", "yes", "no", "yes", "no", "yes", "no"],\ "col2":["A", "A", "B", "B", "C", "C", "D", "D"],\ "col3":[24, 20, 19, 17, 24, 27, 22, 18]} df = pd.DataFrame(data=data) Now, If I…
Luis_12345
  • 55
  • 6
0
votes
2 answers

Get partial correlations matrix from pandas dataframe using spearman

I want to obtain a matrix of partial correlatins (for all pairs), removing the effect of all other columns. I am using pingouin, however the function df.pcorr().round(3) only works with pearson correlation. Here is the code: #!pip install…
Leo
  • 1,176
  • 1
  • 13
  • 33
1
2