2
votes
2answers
95 views

Why is the Pearson correlation 1 when only two data values are available?

I am trying to obtain a Pearson correlation between 6 different variables (represented by columns in the matrix below) with two datapoints each (rows). This is the matrix: ...
0
votes
1answer
25 views

Investigating relationships between variables- multiple and simple linear regression

please help a sociologist struggling to get to grips with R and statistics in general..! I've got a data set with 11 variables. I need to investigate the possible relationships between one of the ...
2
votes
1answer
84 views

How important is the correlation coefficient's variance in linear regression?

R doesn't return the correlation coefficient's variance (or standard error) when coding summary(linmod), linmod being a linear ...
0
votes
1answer
33 views

Bivariate random variable with R [closed]

I am trying to transform this Matlab code into R. My goal is to generate a bivariate random variable with a pre-specified correlation. The code uses the idea of t-copula. I can't figure out how to ...
0
votes
0answers
20 views

Choosing the best time series for forecasting

I have set of time series for various days (same frequency and source). I need to choose a subset of it, and they together will forecast future values. Currently I am simply using X out of Y time ...
1
vote
1answer
39 views

Multiple comparisons for correlation matrix?

Does the computation of an N x N correlation matrix for N unrelated variables require multiple comparisons correction for all the computed pairwise correlations (assuming each computed correlation is ...
1
vote
0answers
30 views

How to measure/clarify a possible relationship between two spatial points using R

I'm quite new to the area of spatial statistics, but I'm very interest in some general principles. The last two weeks I've created an example dataset, which contains three datsets. A dataset of ill ...
0
votes
0answers
17 views

Influence of using differences or means in order to find correlations

I have a big dataset I want to find correlations in. So far I have been unsuccessful. I'm wondering whether it would be a good idea to either: Take the average of all neighboring entries in all my ...
0
votes
0answers
57 views

Low number of replicates DGE analysis

I am using DESeq for DGE analysis. I have STRANDED RNA-Seq data for 4 developmental stages with no replicates. To have a more reliable DGE I should have replicates and so I obtained (from another lab ...
1
vote
0answers
29 views

How to predict the model fit of a particular % of a sample?

I have a large number of projects (about 300). Each project contains a set of test cases. Each test case can result in a success or a failure. The dataset looks like this. Original: ...
1
vote
2answers
100 views

How to determine the correlation between 2 time series while controlling for a 3rd?

I would like to determine the relationship between two variables after controlling for a third. Specifically, I want to know if the prices of mercury and gold over time are correlated with each other ...
1
vote
0answers
86 views

Correlation between the proportion derived from the data of different size

I want to obtain a correlation between the accuracy of two linguistic features by language learners. The learners wrote a number of essays, and the number of correct and incorrect use of the article ...
3
votes
1answer
86 views

Generate two variables with precise pre-specified correlation

I want to generate two variables with (pseudo-) random numbers with an exact pearson's r. How do I do that? Python and/or R solutions would be nice! I am able to generate random data that ...
2
votes
0answers
219 views

How to test and avoid multicollinearity in mixed linear model?

I am currently running some mixed effect linear models. I am using the package "lme4" in R. My models take the form: ...
0
votes
1answer
77 views

Generating correlated distributions with a certain mean and standard deviation?

Given a distribution A with a mean of $\mu_1$ and standard deviation of $\sigma_1$, how can I generate: Distribution B with a mean of $\mu_2$ and standard deviation of $\sigma_2$ and a correlation ...
1
vote
0answers
64 views

Large discrepancy between confidence intervals for correlation coefficient using bootstrap and Fisher's Z transform

I found that the default confidence intervals provided by cor.test (Fisher's Z transform according to the help) are quite different from the nonparametric boostrap confidence intervals for the below ...
6
votes
1answer
290 views

Variables lack correlation, but have pattern

Below is the graph of two variables, X and Y, each representing count data. N=348. Note the scales of the axes: Y is very approximately lognormal, but X has no decent fit (including Poisson, ...
0
votes
0answers
162 views

Multidimensional Scaling in R with Spearman's Rank Correlation

I'm new to MDS, but I found some good starter code here (http://mhermans.net/static/postdata/r-examples/neighbours-mds/neighbours-mds-example.html) and which I borrowed for below. The code works fine, ...
2
votes
0answers
87 views

Bayesian method to compare correlations

I have read up on Bayesian methods enough now to feel that I would rather use Bayesian analysis over Frequentist, the trouble now is finding the correct tools... I have data from an experiment with ...
0
votes
1answer
92 views

Calculating correlation coefficient

a <- c(10,11) b <- c(2,3) The covariance (C) betweena and ...
2
votes
0answers
52 views

How to check if two variables are dependent given a third variable?

In R, I have a dataset of many variables and based on correlation matrix I see that some of the variable are correlate with the others. For simplicity, let's assume ...
2
votes
1answer
161 views

How can I look for a correlation between dependent variables in a repeated-measures/within-subjects design?

I have a 2x3 within-subjects design, with two different dependent variables (DVs). I would like to know if the two DVs are correlated or not. Here is an example of what the data look like, e.g. a ...
2
votes
0answers
88 views

Permutation test of meta-analysis : correlation coefficient

I am going to estimate False Discovery Rate using permutation tests. To my knowledge, several R packages are applicable for multiple testing. I have several independent datasets for meta-analysis. ...
0
votes
0answers
49 views

Dependency of a third factor in a correlation between 2 continuous variables?

I'm studying the correlation between 2 continuous variables (A~B), the first is an independent measured variable (A), the second one is a dependent estimated variable (B). I'd like to know i) if the ...
1
vote
3answers
275 views

How to identify variable (from many variables) which is able to discriminate between groups?

I currently have a data frame with 98 observations and 107 variables. All of the variables are numeric, but one variable is binary (yes or no). My goal is to determine which correlation and/or ...
0
votes
0answers
376 views

R correlation between two time series analysis

This is my very first post on CV so comment if I can improve my post. I have two webs that sell very similar products and also have a very similar group of customers. I was trying to prove that ...
0
votes
0answers
99 views

maximum correlation between two correlation matrices in R

How to estimate maximum observable correlation between two correlation matrices? I need this in order to correct the observed correlation coefficient between two correlation matrices I have ...
21
votes
1answer
640 views

Why is Mantel's test preferred over Moran's I?

Mantel's test is widely used in biological studies to examine the correlation between the spatial distribution of animals (position in space) with, for example, their genetic relatedness, rate of ...
0
votes
1answer
36 views

Is there autocorrelation in volatile series?

I read in many books or notes online that (1)volatile series do not differ significantly from white noise and that (2)their squared values will exhibit correlation. Although I agree with (2), I can't ...
0
votes
1answer
134 views

Covariance and correlation matrix comparison

I am aware that this question may be too broad and that answers are scattered in various posts, but i need concise and organized answer. My dataset consists of linear measurements of cranial ...
1
vote
0answers
70 views

What statistical test is appropriate for correlations within repeated measures?

We have $N$ individuals measured repeatedly in time. For each individual, at each measurement, we measure the values of two variables: $A$ and $B$. The number of measurements per individual might ...
1
vote
0answers
55 views

How to filter only positive correlations on R? [closed]

Is it possible to filter only positive correlations on R? The point is to make clusters of time series using the correlation as a distance measure, but without clustering the series that have ...
0
votes
0answers
33 views

gls R correlation setting form to default

Just looking for some instruction please. I wish to set an autoregressive correlation within a gls model. I am having trouble understanding this part of the syntax ...
1
vote
1answer
39 views

How to test whether variables are more frequently associated than expected by chance?

I have this presence/absence matrix (S2 is missing on purpose). ...
3
votes
0answers
140 views

Bootstrap on correlation coefficients in R [closed]

For each round of bootstrapping (say $n=1000$), I would like to select the genotypes (the columns) at random without replacement from the original dataset. With this I would like to form two groups ...
5
votes
2answers
247 views

Create 3 correlated variables with pre-specified correlations [duplicate]

I start with a vector of random numbers sampled from a normal distribution: R<-rnorm(100, mean=0, sd=30) I would now like to create 3 variables that are ...
1
vote
1answer
39 views

Create variables with pre-specified correlation

I have a vector: a<-rnorm(100) I would like to create 5 variables that are correlated with a to a different extent. For ...
0
votes
0answers
56 views

Significance of adjacency in correlation matrix with ordered variables

The following values are from the Discrete module in BayesTraits. Each value in the matrix is the difference in log-likelihood values between a 4-parameter model of independent evolution and an ...
1
vote
1answer
169 views

Correlation or independence on contingency table for large N

I have a dataset with about 35,000 individuals described by around 15 categorical variables. I'm trying to study the independence / correlation between these 15 categorical variables. My first idea ...
7
votes
1answer
478 views

Definition of autocorrelation time (for effective sample size)

I've found two definitions in the literature for the autocorrelation time of a weakly stationary time series: $$ \tau_a = 1+2\sum_{k=1}^\infty \rho_k \quad \text{versus} \quad \tau_b = ...
5
votes
1answer
120 views

How to test the effect of variable on spatial distribution of points in R

I'm trying to find statistical test (or procedure) which is able to discover patterns in spatial distribution of points. I sketch the problem by giving the example about position of bird territories ...
7
votes
1answer
178 views

Finding correlations in longitudinal data analysis

We are doing research on video lecture watching. We offer a course which lasts four 5 weeks, and there are 9 or 10 videos in each week. We organize group-watching activities. A group usually is ...
1
vote
1answer
51 views

R: estVar and cor

I have a problem when estimating a multivariate Regression Model. I know that cor(y1, y2) is strongly positive but when I am trying to estimate a regression model ...
1
vote
1answer
511 views

Are two Pearson correlation coefficients different?

I am aware of this question here, which mine was listed as a duplicate of, but it does not fully answer my question. It did however help me progress a little further so thanks, I couldn't find it ...
0
votes
0answers
119 views

Within-subject correlation before deciding on correlation structure in GEE

I want to have a look at the correlation coefficient for repeated measures in $x$ number of individuals. This will help me chose which correlation structure will best fit in GEE (Generalized ...
2
votes
1answer
40 views
0
votes
0answers
136 views

Why am I not getting a symmetrical correlation matrix in R?

I am trying to obtain the correlation between two matrices of equal dimensions. I have used both column by column correlation and the canonical correlation but I don't get a symmetrical correlation ...
0
votes
2answers
187 views

Correlations of correlations using 3 data sets

I'm interested in how 14 environmental parameters co-vary with other environmental parameters and whether they show the same patterns in 3 regions. So 1st, I made a pairwise correlation table of the ...
1
vote
1answer
656 views

Correlation of Fixed Effects in lmer

I'm a psycholinguistics student with few knowledge in statistics and I have some doubts about a Correlation of Fixed Effects in lmer function (lme4 package). So, if my question is stupid… hummm… I'm ...
2
votes
2answers
109 views

How to check for a relationship between water bacterial levels

I have a set of data: http://pastebin.com/KHLKD8XB which is based on TVC (total viable counts - i.e., numbers of bacteria) from water going into a machine (BM), water taken from the machine (IM) ...