Questions tagged [correlation]
For questions regarding interdependence of variable quantities.
3,672
questions
-1
votes
2
answers
14
views
SAML REQUEST FAILURE DOING CORRELATION
Hi can any one help i am facing aissue while correlating the SAML REQUEST AND Relaystate values it is getting you are not authorized to the link can any one help me
Need to correlate the SAML REQUEest
...
1
vote
1
answer
31
views
Do a correlation test between two datasets of different sizes (one has 24, the other one 25 values) in R
when doing a correlation test in R (doesnt matter if its spearman, pearson or anything else) it always gives me the following error:
Fehler in cor.test.default(young1$Viral.load, old1$Viral.load, ...
0
votes
0
answers
5
views
Can 2 pairs of Random variables, X - Y & X -Z have same absolute value of kendals tau. Can we simulate such data? Are there any real data examples?
I have a theoretical situation where all data should have unique absolute value of kendals tau. I want to study the effect if this condition is not met.
Can we simulate data such that X,Y and X,Z have ...
-1
votes
0
answers
12
views
How can I do future trend in sale using Power Bi? [closed]
I've been asked to make a trend of sales for some retailer
The Retailer wants to know if he should continue with the same amount of goods or change some types, whether they are cheaper or higher ...
0
votes
0
answers
35
views
weighted pearson correlation coefficent with two sample sizes
I have a dataframe with var1 and var1 nvar1 and nvar2 I want to get the weighted square of the pearson correlation coefficent between var1 and var2 weighted by the same sizes (nvar1 and nvar2)
# ...
0
votes
0
answers
16
views
How do I remove nonnumeric values from my dataset to run the cor.test funciton, I'm a complete novice at R [duplicate]
Here's the error message:
cor.test(executions_correlation$`Age at Execution`,executions_correlation$`Sex of Offender`, method="pearson")
Error in cor.test.default(executions_correlation$`Age ...
1
vote
0
answers
30
views
Is there a way to keep hierarchical clustering order constant across groups for correlation matrices?
I have created multiple correlational matrices for age ranges (e.g. 1-5, 5-10, 10-15 years old). However, when I do hierarchical clustering using ggcorrplot for example, running ggcorrplot(...
-2
votes
0
answers
15
views
How to Predict Climate forecasting model by custom coordinates list
I have the data of the climate projection model (CMIP5 monthly) https://cds.climate.copernicus.eu/cdsapp#!/dataset/projections-cmip5-monthly-single-levels
I want to put my list of coordinates into the ...
0
votes
0
answers
29
views
Python generate 3 correlated array of random noise with different distributions
I need to generate random noise for 3 variables, i.e. X, Y and Z. I need X to be lognormal, and Y and Z is normal. The correlation matrix should be:
1, -0.8, 0.5
-, 1, -0.5
0.5,-0.5, 1
The std of ...
0
votes
1
answer
28
views
Analyzing Impact of a Single Independent Time Series Variable on a Cluster of Dependent Variables in R
Hello Stack Overflow Community,
I am an economic researcher seeking statistical advice for an analysis I am conducting in R. My dataset includes one independent time series variable, X, and a large ...
0
votes
1
answer
69
views
Significant correlations between two dataframes
I want to find a significant correlation between two large dataframes (FDR < 0.05). How do I modify the code to run faster? The cor.mtest(cor) has taken several hours.
Running on a small dataset ...
0
votes
0
answers
7
views
I'm encountering an issue in VuGen while attempting to substitute the server-generated value "\x2D" with "-" within the correlation value
I'm currently using LoadRunner 2022 R1 and haven't been able to successfully implement this replacement. Could anyone offer guidance on how to achieve this ?
I'm encountering an issue in VuGen while ...
4
votes
1
answer
126
views
Different results using cor.test() and sm_statCorr() for spearman's rho?
I'm comparing two different surveys for two different symptoms of migraine. Because I want to present the correlation for each symptom in both a table and a plot, I used cor.test() to retrieve the ...
-2
votes
0
answers
55
views
is there a python function to determine which variables are correlated to the target variable of my data frame?
My model seems to be too accurate and keeps getting 99.95% accuracy every time I run it. It gets the same single row incorrect every time I run it too. I can't see any errors in my code but of course ...
0
votes
0
answers
10
views
Finding correlations between two different pieces of the same column in Power BI
Is there a way to find, in Power BI, the correlation between two different pieces of the same column? For example, let's say that the name of the column is "cookie YOY price change", and we ...
1
vote
1
answer
46
views
I'm trying to generate synthetic data using Python. The data should be bivariate and have a specified correlation. Why doesn't my code work?
Here is what I've tried. I've been playing with this for a very long time and cannot figure out what I'm doing wrong. Can anyone help identify what I'm not seeing?
I'm trying to create 1,000 samples, ...
0
votes
0
answers
15
views
How to add labels and indicate significant correlations in the chord plot?
I have corr_mat where I have stored the correlation between microbiota and metabolite data.
In pmat, I have stored the pvalues from the correlations. I have used the following R plot to create the ...
0
votes
0
answers
8
views
SPSS syntax style for correlation matrix
In the correlation matrix, for each variable, there are 3 rows;
correlation value (r)
significance value
number of cases (n)
I use the style function when producing the matrix to colour the ...
0
votes
0
answers
6
views
correlation for two columns in dataprep library
I wrote this code plot_correlation(df1, "Selling_Price", "Present_Price");but, I have this error:
ValueError: Metadata inference failed in dropna.
You have supplied a custom ...
0
votes
0
answers
16
views
Fisher Z backtransformation with metafor package
I've used the Fisher Z transformation to obtain an averaged Pearson correlation coefficient between 19 subjects with the metafor package in R. To perform the back transformation I tried to use two ...
0
votes
1
answer
41
views
How to create a for loop of simulated correlation coefficients in R?
I plan to run 10,000 simulations on an existing dataset, and want to find the correlation coefficient of each simulation and save it into a dataframe (theoretically ending up with 10,000 correlation ...
0
votes
0
answers
12
views
I have a dataframe of 19 columns and need to get the max correlated variables among the dataset
plt.figure(figsize=(19,19)) `PLot graph`
g=sns.heatmap(df.corr(), vmin=df.corr().values.min(),
vmax=1, cmap="coolwarm", linewidths=0.1,
annot=False, annot_kws={"fontsize":4},
...
1
vote
0
answers
26
views
Correlation vs identity: a=b, b=c, but a != c?
I analyze a dataset - the result of a survey asking people several yes/no questions. I find a moderate positive correlation (~0.5), very statistically significant, between those who answer yes to ...
0
votes
1
answer
27
views
correlated variables from a multivariate normal distribution
I am trying to develop a loop that will help allow me to dynamically control the correlation between two variables, while holding other variables correlations static. I have this completed, but I ...
0
votes
1
answer
11
views
Partial correlation, Non-parametric data
I am struggling to know how to conduct a partial correlation when data is not normally distributed...
I have tried this and it is giving me data (the code has worked), but is this how you would ...
0
votes
0
answers
27
views
How to use correlationBF() with multiple columns?
Could correlationBF() from BayesFactor package be used with multiple columns like the example below, corr.test() from psych package:
df <- data.frame (height = c(1.95, 1.88, 1.91, 1.71, 1.57, 1.77)...
0
votes
1
answer
50
views
Persistent time shift after cross correlation
I have two data sets each containing data on the x and y positions of an object. The data is sampled with different sensors. One of the data sets is sampled at 125 Hz the other at 500Hz. I have ...
2
votes
1
answer
45
views
Why correlation calculated by 'cor' function in R differs from cosine of angle between vectors
I'm trying to demonstrate that the cosine of the angle between vectors is the same as the correlation coefficient between them. However, the cor function in R and the value I get from the dot product ...
0
votes
1
answer
81
views
How to permute correlations between several pairs of variables in R?
I would like to compute the correlation between pairs of variables from two data frames, ideally using cor.test, so I can compare the p value from using either the estimate or the statistic. My real ...
0
votes
0
answers
52
views
How to generate an exponentially weighted and then exponentially smoothed correlation matrix dataframe in pandas?
I have a time series dataframe that I want to generate a smoothed correlation matrix on.
An example:
import numpy as np
import pandas as pd
import datetime as dt
np.random.seed(0)
df = pd.DataFrame(...
0
votes
1
answer
42
views
Is Pearson correlation faster than Spearman correlation in R?
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 ...
1
vote
1
answer
21
views
Modify names of variables
I am trying to modify the variable labels, that is, my variable "h_ex" represents "household expenses", and I would like "household expenses" to appear when doing my ...
0
votes
0
answers
31
views
how to generate a heatmap of a correlation matrix with clustering and phylogenetic tree
i'm stuck with R, i don't know what package use to create the plot i would like. I have a pairwise matrix with the similiarity between genomes.
Something like:
GENOMES genomeA genomeB genomeC
...
0
votes
0
answers
57
views
Find correlations between genes and samples
I have data with samples as rows and Genes as columns with gene expression values.
The original data has more than 100 genes. Below is an example of a data frame.
df <- data.frame (Sample = c(&...
0
votes
0
answers
32
views
R: How do I create a correlation matrix with time series of different lengths, and truncate longer time series based on the shorter time series?
Set-up:
I have 50 monthly time series of 50 distinct items, from Jan 2015 to July 2023.
Some of the time series are completely populated, with data from Jan 2015 to July 2023.
However, some other time ...
0
votes
0
answers
8
views
How to calculate correlation between two series with high autocorrelation
two series with high autocorrelation, so the degree of freedom is decline. Using t-test to estimate the p-value, they are easy to achieve a high significance level. How to adjusted the correlation ...
0
votes
2
answers
58
views
Temporally correlating events with date ranges
I have a dataframe of extreme temperature events in R. The data looks something like this:
data <- data.frame(date_start = c("1980-05-11", "1980-07-12", "1980-08-17", &...
0
votes
0
answers
24
views
Correlation between a single HTTP request and multiple JMS messages
Service A receives an HTTP request. If the request already has a request id the service will use it, otherwise the service will generate one. At this point the request id is guaranteed to exist and ...
0
votes
1
answer
31
views
Polychoric matrices out of complex survey data in R
I'm using R to analyze data from surveys with complex designs. Therefore, I'm utilizing the survey package. Is there a way to obtain polychoric correlation matrices in R while taking into account the ...
0
votes
2
answers
33
views
Am I interpreting my data incorrectly or have I done the test analysis wrong?
I'm having an issue with interpreting my results and I don't know if I have done the test analysis correctly.
To me is seem like the test analysis data doesn't match up to verify the results of my ...
3
votes
1
answer
70
views
How do I bootstrap correlations between two data frames?
I have not been able to find an example of bootstrapping correlations between two data frames. Key posts I have looked at are
(1) https://stats.stackexchange.com/questions/20701/computing-p-value-...
1
vote
2
answers
76
views
How to use lapply to replace nested for loop to get correlations between two data frames?
I would like to get the estimate, statistic and p value from correlating two data frames together. I know how to do this using a nested for loop or foreach using parallelisation. However, I do not ...
0
votes
0
answers
20
views
Analysis for many Categorical and one Continuous trait
My dataset contains multiple nominal non-binary variables (i.e- beak shape type, general eye position) which are represented/coded as numbers. For instance, for 'beak shape type' there are 4 options, ...
0
votes
1
answer
14
views
Does pretrained Resnet 18 capture correlation of R, G, B modes?
I am new to this field and had a concern to which I cannot find any literature. Does pretrained resnet-18 capture correlation between RGB modes? I have modified the resnet to have a greyscale image as ...
0
votes
1
answer
34
views
Total explained variance based on three dependent correlation coefficients
Is there any way to compute the total explained variance of a variable x explained by two dependent variables y and z when only the three correlation coefficients are known?
Let's say the following ...
0
votes
0
answers
24
views
How can I position the correlation in my scatter plot in a better way using the stat_cor function in ggplot?
I have a scatter plot in ggplot and I would like to add the correlation coefficient.
This is my code:
ggplot(bcflow, aes(x = age, y = vpa_baseline_mean, color = group)) +
geom_point() +
labs(x = &...
0
votes
0
answers
10
views
addig p values to mutilevel correlations calculated with statsBy function in R
I have the following code to calculate within- and between-person correlations of a multilevel dataset:
library(psych)
corrdata <- dat %>%
select(id, var1, var2)
between_within_corr <- ...
0
votes
2
answers
42
views
Azure authentication not working in JMeter after apparently correct correlation - Login API problems
Referring to the same question raised before in this post : Azure authentication not working in JMeter
the API: https://login.microsoftonline.com/login/{Tenant_ID}/login, is not responding with ...
0
votes
1
answer
47
views
how to plot scatter plot for two different dataset in R
I want to ask how to plot scatter plot for correlation value obtained from two different datasets.
So I did analysis between predicted and actual expression before and after doing PCA analysis.
I see ...
1
vote
1
answer
79
views
Make a bootstrap for matrix in R with 100 replications (bootstrap correlation matrices)
Here I show the dataset.
library(igraph)
vetor <- c(1, 5, 3, 8, 2, 9, 3, 2:15, 1, 5, 3, 6, 5, 9, 3 )
matrix(vetor, 7, 7)
matrix<-matrix(vetor, 7, 7)
matcor <- cor(matrix, method = "...