search for: correlated

Displaying 20 results from an estimated 4432 matches for "correlated".

2011 Jan 10
2
Calculating Portfolio Standard deviation
Dear R helpers I have following data stocks <- c("ABC", "DEF", "GHI", "JKL") prices_df <- data.frame(ABC = c(17,24,15,22,16,22,17,22,15,19),                                          DEF = c(22,28,20,20,28,26,29,18,24,21),                                           GHI = c(32,27,32,36,37,37,34,23,25,32),                                          
2013 Mar 05
3
Simulate binary correlated data
Dear R experts, I am trying to simulate correlated binary data and have stumbled upon the following problem: With the help of "binarySimCLF" or "mvpBinaryEp" I have been able to simulate correlating binary vectors given certain mean values and a desired correlation. My problem is that these procedures do not allow you to specif...
2012 Mar 15
6
Generation of correlated variables
...fied correlation. For this there's no problems. However, I would like that have all my "regressors" to be orthogonal (i.e. no correlation among them. For example, y = x1 + x2 + x3 where the correlation between y x1 = 0.7, x2 = 0.4 and x3 = 0.8. However, x1, x2 and x3 should not be correlated to each other. Anyone can help me? Regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/Generation-of-correlated-variables-tp4475799p4475799.html Sent from the R help mailing list archive at Nabble.com.
2005 Apr 03
4
Generating a binomial random variable correlated with a normal random variable
Hi All: I would like to generate a binomial random variable that correlates with a normal random variables with a specified correlation. Off course, the correlation coefficient would not be same at each run because of randomness. I greatly appreciate your input. Ashraf
2011 Feb 09
2
Generate multivariate normal data with a random correlation matrix
Hi All. I'd like to generate a sample of n observations from a k dimensional multivariate normal distribution with a random correlation matrix. My solution: The lower (or upper) triangle of the correlation matrix has n.tri=(d/2)(d+1)-d entries. Take a uniform sample of n.tri possible correlations (runi(n.tr,-.99,.99) Populate a triangle of the matrix with the sampled correlations Mirror the
2009 Feb 12
3
get top 50 correlated item from a correlation matrix for each item
...matrix. For each of the 3000 items, I want to get the top 50 items that have the highest correlation with it (excluding itself) and generate a data frame with 3 columns like ("ID", "ID2", "cor"), where ID is those 3000 items each repeat 50 times, and ID2 is the top 50 correlated items with ID, and cor is the correlation of ID and ID2. I know I can use two for loops to do it but it is very time consuming considering the correlation matrix is generated for each month of the past 20 years. Is there a better way to do it? Regards, Richard [[alternative HTML version de...
2008 Oct 10
1
Correlation among correlation matrices cor() - Interpretation
Hello, If I have two correlation matrices (e.g. one for each of two treatments) and then perform cor() on those two correlation matrices is this third correlation matrix interpreted as the correlation between the two treatments? In my sample below I would interpret that the treatments are 0.28 correlated. Is this correct? > var1<- c(.000000000008, .09, .1234, .5670008, .00110011002200, 8, 9, 12.34, 56.7, 1015245698745859) > var2<- c(11, 222, 333, 4444, 55555, 1.1, 2.2, 3.3, 4.4, .55) > var3 <-c(22.2, 66.7, 99.9, 1000008, 123123, .1, .2, .3, .4, .5) > var4<- c(.000001,.000...
2011 Apr 09
1
How do I make this faster?
I was on vacation the last week and wrote some code to run a 500-day correlation between the Nasdaq tracking stock (QQQ) and 191 currency pairs for 500 days. The initial run took 9 hours(!) and I'd like to make it faster. So, I'm including my code below, in hopes that somebody will be able to figure out how to make it faster, either through parallelisation, or by making changes. I've
2011 May 05
3
cross-correlation table with subscript or superscript to indicate significant differences
Hi, I wonder whether the following is possible with R, and whether anyone has done that and can share his/her code with me. I have a correlation matrix, and I want to create a correlation table that I can copy to Microsoft Word with a superscript above each correlation, indicating significant differences in the same row. That is, when correlations in the same row do not share superscript, it means
2007 Nov 07
1
(no subject)
...ly answer my question, which is more about what confidence i can assign to the measured correlation coefficient (0.5198252). an alternative question would be: given two sequences and a calculated correlation coefficient, with what probability could i assert that the underlying processes are indeed correlated and that the calculated correlation coefficient does not simply arise by chance. please forgive my ignorance. any help will be vastly appreciated. thanks! best regards, andrew. ---------------------------------------------------------------------- Get a free email account with anti spam protecti...
2012 Oct 26
1
Creating a correlation matrix from a vector
I'm looking to create a correlation matrix, but I have already obtained the correlations, which are stored in a vector. (Basically, I'm running a simulation which requires a correlation matrix, but I am simulating the various correlations.) My aim is to create a function that can take the vector, and fit the values into their respective locations in a correlation matrix. (The correlations
2007 Jun 27
3
Correlation ratio
Hi, I wanted to know how to compute the correlation ratio (eta) between two variables using R. Is there any function to compute the correlation ratio. Any help will be very much appreciated. Thanks, Suman [[alternative HTML version deleted]]
2011 Nov 01
1
How to interpret Spearman Correlation
Hi, I am not really familiar with Correlation foundations, although I read a lot. So maybe if someone kindly help me to interpret the following results. I had the following R commands: correlation <-cor( vector_CitationProximity , vector_Impact, method = "spearman", use="na.or.complete") cor_test<-cor.test(vector_CitationProximity, vector_Impact,
2010 Apr 02
2
tetrachoric correlations
Hi, Is there any R library/package that calculates tetrachoric correlations from given marginals and Pearson correlations among ordinal variables? Inputs to polychor function in polycor package are either contingency tables or ordinal data themselves. I am looking for something that takes marginal distributions and Pearson correlation as inputs. For example, Y1=(1,2,3) with P(Y1=1)=0.3,
2011 Apr 09
3
In need of help with correlations
I am in need of someone's help in correlating gene expression. I'm somewhat new to R, and can't seem to find anyone local to help me with what I think is a simple problem. I need to obtain pearson and spearman correlation coefficients, and corresponding p-values for all of the genes in my dataset that correlate to one specific gene of interest. I'm working with mouse Affymetrix
2009 May 26
2
(OT) Does pearson correlation assume bivariate normality of the data?
Dear all, The other day I was reading this post [1] that slightly surprised me: "To reject the null of no correlation, an hypothsis test based on the normal distribution. If normality is not the base assumption your working from then p-values, significance tests and conf. intervals dont mean much (the value of the coefficient is not reliable) " (BOB SAMOHYL). To me this implied that in
2004 Oct 14
1
correlating between two vectors of numbers
...rrelation) > cor.test(V2.Signal,V3.Signal,method="kendall") (the Kendall's correlation) what's wrong? Question2: Does anyone accidently know which correlation method would be the most correct to use when the microarray signal values (the values to be correlated) are not normal distributed (the Kendall's method seem to fit better to my other tests than the Pearson method).
2006 Jan 25
2
how to test robustness of correlation
Hi, there: As you all know, correlation is not a very robust procedure. Sometimes correlation could be driven by a few outliers. There are a few ways to improve the robustness of correlation (pearson correlation), either by outlier removal procedure, or resampling technique. I am wondering if there is any R package or R code that have incorporated outlier removal or resampling procedure in
2012 May 29
1
correlation matrix only if enough non-NA values
Hi everybody. I'm trying to do a correlation matrix in a list of files. Each file contains 2 columns: "capt1" and "capt2". For the example, I merged all in one data.frame. My data also contains many missing data. The aim is to do a correlation matrix for the same data for course (one correlation matrix for capt1 and another for capt2). For the moment, I have a correlation
2009 Jan 12
3
polychoric correlation: issue with coefficient sign
Hello, I am running polychoric correlations on a dataset composed of 12 ordinal and binary variables (N =384), using the polycor package. One of the association (between 2 dichotomous variables) is very high using the 2-step estimate (0.933 when polychoric run only between the two variables; but 0.801 when polychoric run on the 12 variables). The same correlation run with ML estimate returns a