: [R] correlation matrix difference
Hi, I have got four correlation matrix. They are the same set
of variables under different conditions. Is there a way to
test whether the correlation matrix are significently
different among each other? Could anyone give me some advice?
--
View
Hi, I have got four correlation matrix. They are the same set of variables
under different conditions. Is there a way to test whether the correlation
matrix are significently different among each other? Could
anyone give me some advice?
--
View this message in context:
I have a model with 5 parameters that I am optimising where the (best)
value of the objective function is negative. I would like to use the
Hessian matrix (from genoud and/or optim functions) to construct the
covariance and correlation matrices.
This is the code that I am using:
est -
Caskenette, Amanda wrote:
I have a model with 5 parameters that I am optimising where the (best)
value of the objective function is negative. I would like to use the
Hessian matrix (from genoud and/or optim functions) to construct the
covariance and correlation matrices.
This is the code
[mailto:[EMAIL PROTECTED]
Sent: July 13, 2007 10:51 AM
To: Caskenette, Amanda
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Correlation matrix
Caskenette, Amanda wrote:
I have a model with 5 parameters that I am optimising where the (best)
value of the objective function is negative. I would like
Dear R users,
Suppose I have a 4*5 data frame like this:
Date x1 x2 x3 x4
1/1/2004100 22 12 34
2/1/200433-22 33 12
3/1/20041212 -115
4/1/20041 223 22 1
Now I want to get a correlation matrix
Arun Kumar Saha wrote:
Dear R users,
Suppose I have a 4*5 data frame like this:
Date x1 x2 x3 x4
1/1/2004100 22 12 34
2/1/200433-22 33 12
3/1/20041212 -115
4/1/20041 223 22 1
Now I
I've a vector of pairwise correlations in the order low-index element
precedes the high-index element, say:
corr(1,2)=0.1, corr(1,3)=0.2, corr(2,3)=0.3, corr(3,4)=0.4
How can I construct the corresponding correlation matrix?
I tried using the combn-function in combinat package:
Serguei Kaniovski kaniovsk at wifo.ac.at writes:
I've a vector of pairwise correlations in the order low-index element
precedes the high-index element, say:
corr(1,2)=0.1, corr(1,3)=0.2, corr(2,3)=0.3, corr(3,4)=0.4
How can I construct the corresponding correlation matrix?
Not
How do I convert the output of cor(x) to a columnar format?
Ex. from format below
XYZ
X 1.0 0.9 0.5
Y 0.9 1.0 0.1
Z 0.5 0.1 1.0
to format below
X X 1.0
X Y 0.9
X Z 0.5
Y X 0.9
Y Y 1.0
Y Z 0.1
Z X 0.5
Z Y 0.1
Z Z 1.0
Thanks!
Omer
Omer Bakkalbasi wrote:
How do I convert the output of cor(x) to a columnar format?
Ex. from format below
XYZ
X 1.0 0.9 0.5
Y 0.9 1.0 0.1
Z 0.5 0.1 1.0
to format below
X X 1.0
X Y 0.9
X Z 0.5
Y X 0.9
Y Y 1.0
Y Z 0.1
Z X 0.5
Z Y 0.1
Z Z 1.0
See, e.g.,
Maybe like:
dat
X Y Z
X 1.0 0.9 0.5
Y 0.9 1.0 0.1
Z 0.5 0.1 1.0
datrow - stack(as.data.frame(dat))
datrow$X=rownames(dat)
datrow
values ind X
11.0 X X
20.9 X Y
30.5 X Z
40.9 Y X
51.0 Y Y
60.1 Y Z
70.5 Z X
80.1 Z Y
91.0 Z Z
Something like:
dat - data.frame(x=runif(10), y=runif(10), z=runif(10))
m - cor(dat)
m
x y z
x 1.000 0.1183305 0.1096394
y 0.1183305 1.000 -0.2819285
z 0.1096394 -0.2819285 1.000
mat2col - function(m) {
+ m2 - matrix(m, ncol=1)
+
Excellent! This is the most flexible and intuitive option. Thanks!
Omer
Cell: (914) 671-7447
-Original Message-
From: Liaw, Andy [mailto:[EMAIL PROTECTED]
Sent: Friday, June 17, 2005 8:40 AM
To: '[EMAIL PROTECTED]'; r-help@stat.math.ethz.ch
Subject: RE: [R] CORRELATION MATRIX
Hi, I have data normal with mean 0, I was wondering how to get (using R)
the best r such that the correlation matrix of my data has the form
{r^(i-j)} where (i,j) indicate row and columm respectivly. Thanks. Liliana
__
[EMAIL PROTECTED] mailing list
- Original Message -
From: Liliana Forzani [EMAIL PROTECTED]
Cc: R-News [EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 3:32 PM
Subject: [R] correlation matrix o
Hi, I have data normal with mean 0, I was wondering how to get
(using R)
the best r such that the correlation matrix of my data
Liliana Forzani wrote:
Hi, I have data normal with mean 0, I was wondering how to get (using R)
the best r such that the correlation matrix of my data has the form
{r^(i-j)} where (i,j) indicate row and columm respectivly. Thanks. Liliana
Thats the correlation matrix for an autoregressive(1)
Hi,
I'm dealing with a datamining analysis: I've a lot of
categories of product sold per week (n. week =26, n.
categories about 50.
my dataframe is like this:
Settimana ALIMENTI..ALTRI. ALIMENTI.APROTEICI
1 13 19
2 22
Vito Ricci wrote:
Hi,
I'm dealing with a datamining analysis: I've a lot of
categories of product sold per week (n. week =26, n.
categories about 50.
my dataframe is like this:
Settimana ALIMENTI..ALTRI. ALIMENTI.APROTEICI
1 13 19
2 2
Hi Sundar,
many thanks for your suggestion: it's just I wished!
Best
Vito
--- Sundar Dorai-Raj [EMAIL PROTECTED] ha
scritto:
Vito Ricci wrote:
Hi,
I'm dealing with a datamining analysis: I've a lot
of
categories of product sold per week (n. week =26,
n.
categories about
Dear all,
I am trying to compute a matrix of Pearson's `r' or Spearman's `rho'
rank correlation coefficients using rcorr (Hmisc) the following way:
mx-rcorr(x, type=spearman)[1]
but then ...
is.matrix(mx)
[1] FALSE
Even if I use as.matrix the result is not better.
What can I do?
Thank you
On Fri, 17 Oct 2003 16:36:47 +0200
Luca De Benedictis [EMAIL PROTECTED] wrote:
Dear all,
I am trying to compute a matrix of Pearson's `r' or Spearman's `rho'
rank correlation coefficients using rcorr (Hmisc) the following way:
mx-rcorr(x, type=spearman)[1]
Instead of [1] use $r. Or
Dear all,
I have T Y variables, Y1,...,YT, which are T repeated observations on a
variable over the T waves of a survey.
I'd like to estimate a correlation matrix cor(Y1,...,YT) assuming specific
structures, as for example exchangeable, stationary, autoregressive and
nonstationary.
Is there
23 matches
Mail list logo