similar to: Correlation matrix

Displaying 20 results from an estimated 30000 matches similar to: "Correlation matrix"

2008 Aug 04
1
simulate data based on partial correlation matrix
Given four known and fixed vectors, x1,x2,x3,x4, I am trying to generate a fifth vector,z, with specified known and fixed partial correlations. How can I do this? In the past I have used the following (thanks to Greg Snow) to generate a fifth vector based on zero order correlations---however I'd like to modify it so that it can generate a fifth vector with specific partial
2005 Jul 23
2
cor(X) with P-Value
Friends I am new to R (and statistics) so am struggling a bit. Briefly... I am interested in getting the P-Value from cor(X) where X is a matrix. I have found cor.test. Verbosely... I have 4 vectors and can generate the corellation matrix... > cor(cbind(X1, X2, X3, X4)) X1 X2 X3 X4 X1 1.00000000 -0.06190365 -0.156972795 0.182547517 X2
2013 May 29
3
bootstrap
Hi, You might need to check library(boot).? I have never used that before.? So, I can't comment much.? It is better to post on R-help list.? I had seen your postings on Nabble in the past.? Unfortunately those postings were not accepted in R-help.? You have to directly post at ? r-help at r-project.org after registering at: https://stat.ethz.ch/mailman/listinfo/r-help ?
2006 Sep 27
1
Testing the equality of correlations
Dear All, I wonder if there is any implemented statistical test in R to test the equality between many correlations. As an example, let X1, X2, X3 X4 be four random variables. let Phi(X1,X2) , Phi(X1,X3) and Phi(X1,X4) be the corresponding correlations. How to test Phi(X1,X2) = Phi(X1,X3) = P(X1,X4)? Many thanks in advance, Bernard
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,
2008 Aug 01
5
drop1() seems to give unexpected results compare to anova()
Dear all, I have been trying to investigate the behaviour of different weights in weighted regression for a dataset with lots of missing data. As a start I simulated some data using the following: library(MASS) N <- 200 sigma <- matrix(c(1, .5, .5, 1), nrow = 2) sim.set <- as.data.frame(mvrnorm(N, c(0, 0), sigma)) colnames(sim.set) <- c('x1', 'x2') # x1 & x2 are
2012 Oct 12
7
ifelse reformulation
Hi, i'm trying to simplify some R code but i got stucked in this: test<-data.frame(cbind(id,x1,x2,x3,x4,x5,x6,x7)) test > test id x1 x2 x3 x4 x5 x6 x7 1 1 36 26 21 32 31 27 31 2 2 45 21 46 50 22 36 29 3 3 49 47 35 44 33 31 46 4 4 42 32 38 28 39 45 32 5 5 29 42 39 48 25 35 34 6 6 39 31 30 37 46 43 44 7 7 41 40 25 23 42 40 24 8 8 27 29 47 34 26 38 28 9 9 25 35 29 36
2012 Sep 12
3
how to create a substraction matrix (subtract a row of every column from the same row in other columns)
Hello I have data like this x1 x2 x3 x4 x5 I want to create a matrix similar to a correlation matrix, but with the difference between the two values, like this x1 x2 x3 x4 x5 x1 x2-x1 x3-x1 x4-x1 x5-x1 x2 x3-x2 x4-x2 x5-x2 x3 x4-x3 x5-x3 x4 x5-x4 x5 Then I
1999 Aug 05
1
pairwise scatterplot matrix
Dear Friends: I like so much to work with R program. Congratulations for your work. I need R for work with multivariate data. My question is: With the pairs(X) command my output is a pairwise scatterplot symmetric matrix. Like: | X1 |X1 vs X2|X1 vs X3|X1 vs X4| |X2 vs X1| X2 |X2 vs X3|X2 vs X4| |X3 vs X1|X3 vs X2| X3 |X3 vs X4| |X4 vs X1|X4 vs X2|X4 vs X3| X4 | It is
2012 Aug 01
2
sub setting a data frame with binomial responses
Hi everyone, Let me have a dataframe named ?mydata? and created as below, *> n=c(5,5,5,5) #number of trils > x1=c(2,3,1,3) ) #number of successes > x2=c(5,5,5,5) #number of successes > x3=c(0,0,0,0) #number of successes > x4=c(5,0,5,0) #number of successes > mydata=data.frame(n,x1,x2,x3,x4) > mydata* n x1 x2 x3 x4 1 5 2 5 0 5 2 5 3 5 0 0 3 5 1 5 0 5 4 5 3 5 0
2004 Jan 29
1
Confirmatory Factor Analysis in R? SEM?
Hi Has anyone used R to conduct confirmatory factor analysis? This email pertains to use of SEM. For context consider an example: the basic idea is that there are a bunch of observables variables (say study habbits, amount of time reading in the bus, doing homework, helping other do homework, doing follow-up on errors etc.) and one believes that all these variables maybe measured by two or
2010 Sep 02
2
lower triangle of the correlation matrix with xtable
Dear all, mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3)) cor(mydata) x1 x2 x3 x1 1.0000000 -0.5960396 0.3973597 x2 -0.5960396 1.0000000 0.5000000 x3 0.3973597 0.5000000 1.0000000 I wonder if it is possible to fill only lower triangle of this correlation matrix? Using 'dist' doesn't seem to be useful as it doesnt allow to convert this table
2011 Jun 07
1
variable selection in linear regression
Hello With due respect, have a nice time. I would like to ask some command in R. It is regarding variable selection in linear regression. In R, there is one rebuild function called "step" which selecting variables according to AIC. let say i have data [y, x1,x2,x3,x4] we start with y~b0 i compute the partial F test and choose the variable with maximum partial F to enter the
2003 Aug 26
2
Simple simulation in R
Hello all I have a feeling this is very simple......but I am not sure how to do it My boss has two variables, one is an average of 4 numbers, the other is an average of 3 of those numbers i.e var1 = (X1 + X2 + X3 + X4)/4 var2 = (X1 + X2 + X3)/3 all of the X variables are supposed to be measuring similar constructs not surprisingly, these are highly correlated (r = .98), the question is how
2007 Aug 02
1
Multivariable correlation
Given a square matrix of variables X, is there any way to compute a multivariable correlation among all the variables in the array? It is possible to calculate the correlation of all pairs of variables in the array, but I want to know the correlation of all the variables taken together, i.e. for the matrix X=x1 x2 x3 x4 x5 x6 x7 x8 x9 I don't want the pair-wise correlations
2011 Apr 09
2
Orthoblique rotation on eigenvectors (SAS VARCLUS)
Hi All, I'd like to build a package for the community that replicates the output produced by SAS "proc varclus". According to the SAS documentation, the first few steps are: 1. Find the first two principal components. 2. Perform an orthoblique rotation (quartimax rotation) on eigenvectors. 3. Assign each variable to the rotated component with which it has the higher squared
2012 Nov 24
5
subsetting - questions
Hello, I have two very basic questions (console attached): 1) What am I getting an error message for # 5 and # 7 ? 2) How to fix the code? I would appreciate receiving your help. Thanks, Pradip Muhuri ###### Reproducible Example ##### N <- 100 set.seed(13) df<-data.frame(matrix(sample(c(1:10),N, replace=TRUE),ncol=5)) keep_var <- c("X1", "X2") drop_var
2013 Apr 18
1
select and do some calculations/manipulations on certain rows based on conditions in R
Hi, May be this helps (Assuming that there are only '0's and '1's in the dataset) dat1<-read.table(text=" ??????? ID X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 1?? 5184??? 0??? 0??? 0??? 0??? 0?? 0?? 0??? 0??? 0??? 1???? 0????? 0????? 0????? 0????? 0????? 0 2?? 6884??? 0??? 0??? 1??? 0??? 0?? 1?? 0??? 0??? 0??? 0???? 0????? 0????? 0????? 0????? 0????? 0 3?
2008 May 19
2
Converting variance covariance matrix to correlation matrix
Suppose I have a Variance-covariance matrix A. Is there any fast way to calculate correlation matrix from 'A' and vice-versa without emplying any 'for' loop? [[alternative HTML version deleted]]
2013 Jun 10
2
please check this
Hi, Try this: which(duplicated(res10Percent)) # [1] 117 125 157 189 213 235 267 275 278 293 301 327 331 335 339 367 369 371 379 #[20] 413 415 417 441 459 461 477 479 505 res10PercentSub1<-subset(res10Percent[which(duplicated(res10Percent)),],dummy==1)? #most of the duplicated are dummy==1 res10PercentSub0<-subset(res10Percent[which(duplicated(res10Percent)),],dummy==0)