Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
90 views

Given two 2d arrays I want to calculate the cross-correlation similar as done in scipy.signal.correlate2d but instead of using a fill_value=0 I want to calculate the Pearson R from the data overlap of ...
pas-calc's user avatar
  • 170
0 votes
1 answer
90 views

I'm getting inconsistent results when using cor() function. It is easiest to demonstrate with small piece of code: data("pbc2.id", package = "JM") # Mayo Clinic Primary Biliary ...
Hunter's user avatar
  • 359
1 vote
2 answers
97 views

In order to create a dataset to test a statistical calculation package, I want to be able to generate a sample that is correlated to a reference sample with a given searman coefficient. I managed to ...
BayesianMonk's user avatar
0 votes
1 answer
47 views

I have tried everything: Different functions and changed the way I type in the confidence interval (CI) that I want. I need a CI for correlations that ranges from -1 to 1 by 0.5 steps. my R-code: data ...
v_eicher's user avatar
0 votes
0 answers
32 views

I am able to make a correlation matrix that is formatted with the significant values and stars indicating how significant but dont know how to make it so it focuses only on VOC. Output I have: ...
Emma_Fran's user avatar
0 votes
0 answers
71 views

I have used the following code in correlation matrix using metan library in r studio, library(metan) View(CorrawpomF) All <- corr_coef(CorrawpomF) all plot(All) and the output of the code is like ...
dips.geo's user avatar
0 votes
2 answers
81 views

Say that I have a sample dataframe like so. sample_df <- data.frame(replicate(100,sample(0:1,1000,rep=TRUE))) One thing you could ask is which columns in the dataframe are most correlated to ...
wooden05's user avatar
  • 195
0 votes
1 answer
287 views

I have task to do in python. Here is the description: Using the function scipy.stats.bootstrap(), perform interval estimation of the following parameters at a significance level of 1-alpha = 0.98 ...
mymoonluna's user avatar
0 votes
0 answers
107 views

I've a data frame of 2942 rows and 52 columns. One of the columns is the target variable and the other columns are features. I'm trying to calculate Pearson's correlation between the feature column(s) ...
Tamanna Mostafa's user avatar
1 vote
0 answers
58 views

In the following source codes, Python and R are giving the same result. However, C# is giving an incorrect result. How can I fix the C# code? Input data: [1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 3.33] ...
user366312's user avatar
  • 17.5k
0 votes
1 answer
125 views

I have two arrays - array1 and array2. How confidently can I state that they are generated from uncorrelated distributions? Just checking the correlation values would not suffice; I would require p-...
Anirban Chakraborty's user avatar
0 votes
1 answer
146 views

I checked the documentation of scipy.stats.pearsonr but did not find any options to force intercept at origin 0,0. If it's impossible with scipy.stats.pearsonr does anyone know any alternatives?
Johnny Tam's user avatar
0 votes
2 answers
549 views

I want to increase the font size of autogenerated r2 and p value. I used the code like + theme(text = element_text(size = 18)) but it did not make any changes? The code used are given below # Load ...
nicholaspooran's user avatar
0 votes
2 answers
71 views

I have a dataset 673 x 232. I want to use for loop to perform Pearson correlation and save p-value and estimate. My code is vec_lipid <- colnames(df3[,9:232]) df4 <- data.frame(vec_lipid) df4$p....
C.YIN's user avatar
  • 21
0 votes
1 answer
237 views

I would like to determine many correlations (millions) between pairs of columns, so I am worried about computing time. I suspect that Pearson correlations (based on values) are faster to calculate in ...
Sylvia Rodriguez's user avatar
0 votes
2 answers
79 views

Ideally it should be returning values between -1 and 1 for every cell except for the cells that have the same column name and row name those need to have a 1 value Tried replacing the NaN with 0 ...
Anirvesh Arcot's user avatar
0 votes
0 answers
145 views

I have to do linearity test between different pair of variables. I'm using the code ggpairs(data) to do it as I have multiple variables. But many of my variables have y=0 values and x=0 values. So my ...
R_help's user avatar
  • 25
1 vote
1 answer
104 views

I want to create a correlation matrix with ggpairs. I only need the lower part. The upper and diagonal parts are not relevant. Furthermore, I want to keep the final plot simple and therefore remove ...
ChrisAl's user avatar
  • 13
0 votes
1 answer
143 views

Hi Thank you for reading and potential help! I am trying to annotate the x and y-axis of a corelation heatmap generated using ggplot with the following code: # Gen ggplot ggplot(cor.df, aes(x, y, fill ...
Dragonmasterx87's user avatar
0 votes
1 answer
63 views

I've printed a correlation table on Pandas for some results derived from a questionnaire. There are some letters in the correlation values for some reason. Not sure what's causing this and how to ...
Anusha's user avatar
  • 11
1 vote
0 answers
57 views

I performed an LDA for 50 elements vis-a-vis land cover type on R. The final plot showed 13 elements which contributed the most to the separability of the 5 land cover types. However, when I created a ...
permanovice's user avatar
0 votes
1 answer
112 views

Having made a correlation of Pearson on R, I would like to simplify my data set by selecting the indicators with a correlation, between two, greater than 0.7 and less than -0.7 and by eliminating ...
Nakune's user avatar
  • 1
0 votes
1 answer
73 views

I am trying to remove a row from my dataframe in every iteration in a for loop and perform correlation test on the newly saved dataframe. However, I am not getting what I expect. Please help. Each row ...
Satabdi Mandal's user avatar
1 vote
1 answer
154 views

I implemented my own correlation function in R. Surprisingly I get slightly different results when using the built-in cor function. The differences seem to disappear when n the number of observations ...
Maverick Meerkat's user avatar
2 votes
1 answer
98 views

I am interested in benchmarking a coefficient and would like to see some toy examples. I came across this link which includes the following image. Would anyone happen to know of a Python toolkit or be ...
Thoth's user avatar
  • 1,041
0 votes
1 answer
57 views

I have to carry out a relatively complex correlation analysis, in which a total of 150 columns are to be examined of correlation against 36 other columns. I have already done this for 30 columns ...
Bellis's user avatar
  • 37
0 votes
0 answers
211 views

I am facing this strange problem, that i am not able to figure out. With euclidean distance and manhattan distance(either their are standardized or not), clusters are divided in very strange way. I ...
robonoff's user avatar
0 votes
1 answer
170 views

I am extremely nervous to post because I am a beginner and took on a bit more than I could chew. Nonetheless, the problem is that I am working on a project where I write a script to correlate the ...
Gunner32223's user avatar
0 votes
1 answer
37 views

I want to create a facetted area plot showing the cumulative proportion of each category, with a trend line and a Pearson's correlation coefficient. I've so far used this code (exemplified with the ...
Wandering_geek's user avatar
0 votes
1 answer
988 views

I would like to know how to calculate the Pearson correlation coefficient for two complex time series. Do we simply do Or there is something else? import numpy as np R = lambda x,y: ((x-x.mean())...
iury simoes-sousa's user avatar
1 vote
1 answer
326 views

I want to calculate the coefficient of correlation, by year, in R and put the results in a dataframe (then repeat the process by calculating the coefficient of determination). The following code ...
Bryan Schmidt's user avatar
1 vote
0 answers
487 views

Could you please explain how to use principal components in principal component analysis in a correlation analysis? I performed a PCA on my dataset and extracted 2 components; Now I'm wondering how to ...
Erfan Naghavi's user avatar
0 votes
0 answers
68 views

We are using Heap algorithm for generating permutations of an array a. . The generated permutations are passed to the printArr function, which calculates the correlation coefficient between two arrays ...
Shaggy's user avatar
  • 804
1 vote
1 answer
98 views

It is possible to calculate the correlation coefficients and p-values in groups? For example with this dataset: df<-read.csv("http://renatabrandt.github.io/EBC2015/data/varechem.csv", row....
Bellis's user avatar
  • 37
0 votes
1 answer
895 views

Here’s the head of my dataframe: There are 100 different loggers and 10 different years. I want to subset the table by logger and find the Pearson correlation values for year by avg_max_temp, ...
Tom's user avatar
  • 427
1 vote
0 answers
85 views

I am trying to calculate correlation coefficients at each grid point in python. The dimension of two variables(variable1[t,y,x], variable2[t,y,x]) are same and I would like to get a correlation ...
user18515763's user avatar
1 vote
0 answers
163 views

I'm trying to replicate a feature in Systat, which is k-means clustering with Pearson correlation. I saw that a package called ClusterR allows you to do this by specifying a bunch of parameters. I ...
StephenRappaport's user avatar
0 votes
0 answers
46 views

I have a panel dataset and I am having trouble using the correlation command to get the correlation between variables. Can anyone provide a code for Pearson goodness of fit correlation with a panel ...
econ_grad12345's user avatar
0 votes
0 answers
176 views

I have a dataset where I have two recordings (sessions) of two different variables. set.seed(123) data <- data.table( id = rep(1:20, each = 2), session = rep(1:2, times = 20), var1 = ...
Inkling's user avatar
  • 499
1 vote
1 answer
136 views

Suppose I have two very simple arrays with numpy: import numpy as np reference=np.array([0,1,2,3,0,0,0,7,8,9,10]) probe=np.zeros(3) I would like to find which slice of array reference has the highest ...
mad's user avatar
  • 2,799
0 votes
1 answer
385 views

I am training an ImageNet-pretrained VGG-16 model in Keras with two different hyperparameter settings. I prefer to see if there exists a linear relationship between the two sets of model weights. For ...
shiva's user avatar
  • 1,189
1 vote
1 answer
410 views

I have several pairs of vectors (arranged as two matrices) and I want to compute the vector of their pairwise correlation coefficients (or, better yet, angles between them - but since correlation ...
sds's user avatar
  • 60.5k
0 votes
0 answers
57 views

I have been carrying out some Pearson correlations. In some of the outcome tables I get the following results inside instead of a correlation value: "NA", "NaN", "-Inf***"...
MGB's user avatar
  • 15
0 votes
1 answer
2k views

I want to calculate a Pearson correlation between several columns. The solution JasonAizkalns posted in this thread is very useful for me. df %>% select_if(is.numeric) %>% group_by(year) %&...
formatc's user avatar
  • 35
1 vote
1 answer
925 views

This's a rather straightforward question where I'd like to increase the font size of the automatically generated R and p-value for my correlation plot via ggscatter. I've tried using cex but doesn't ...
wychin's user avatar
  • 21
1 vote
1 answer
2k views

I have Query with 10 Measures I am able to draw correlation heat map in Python using below? import pandas as pd import seaborn as sn import matplotlib as mt df = pd.read_sql('select statement') sn....
Pritesh's user avatar
  • 1,970
-3 votes
1 answer
145 views

this is an IBM skill lab code. try running it and keeps getting a error pearson_coef, p_value = stats.pearsonr(df['city-mpg'], df['price']) print("The Pearson Correlation Coefficient is", ...
Collins Ekwe's user avatar
0 votes
0 answers
226 views

I have a binary variable (which is either 0 or 1) and continuous variables. I have continuous variables that I should adjust as covariates. I would like to see the result of the point biserial ...
Jung Youn Min's user avatar
1 vote
1 answer
258 views

i have an array norm_array=np.array([[1, 133, 1, 5.73, 5.09, 11.12, 10.16, 3.38, 15, 3, 8, 7, 4, 5, 1, 6, 1, 2, 18, 12, 48], [1, 185, 0, 4.34, 3.66, 18.23, 14.91, 0, 21, 15, 11, 2, 4, 4, 5, ...
user19381782's user avatar
1 vote
0 answers
208 views

I want to reduce the runtime of my algorithm. Can anyone suggest ways to reduce its complexity other than using threads or parallel computing. Algorithm: This algorithm aims to solve Pearson's r where ...
Gie Grajo's user avatar
  • 197

1
2 3 4 5
7