Displaying 20 results from an estimated 20000 matches similar to: "Equality between covariance matrices?"
2005 Mar 23
0
how to test for equality of covariance Matrices in lda
when using the two-group discriminant analysis,we need to test for equality of covariance Matrices in lda.as whenm we formed our estimate of the within-group covariance matrix by pooling across groups,we implicitly assumed that the covariance structure was the same across groups.so it seems important the test the equality.but i can not find function in R to do these.
2008 Sep 27
1
Using "by" to create individual variance-covariance matrices
Hello R list subscribers,
I am trying to use the "by" command to create line-specific variance covariance matrices (where "x" is the original data matrix):
by(x, x$line, function(d) {
d.clean <- d[,-1]})
write.table(d.clean$line[1,1], sep = ",", file = "covariances.csv", col.names = FALSE, row.names = FALSE, append = TRUE)
write.table("", sep
2005 May 15
0
testing equality of covariance matrices
Dear R-mailers,
I would like to test for equality of population covariance matrices.
But I can't find a R tool to do so.
I saw, that other people had the same question, but I could not find an answer
to it, I would appreciate to know the missed link.
Thank you,
b.w. K. Steinmann
2010 Jan 30
2
Questions on Mahalanobis Distance
Hello,
I am a new R user and trying to learn how to implement the mahalanobis
function to measure the distance between to 2 population centroids. I
have used STATISTICA to calculate these differences, but was hoping to learn
to do the analysis in R. I have implemented the code as below, but my
results are very different from that of STATISTICA, and I believe I may not
have interpreted the help
2004 Nov 16
5
Difference between two correlation matrices
Hi
Now a more theoretical question. I have two correlation matrices - one
of a set of variables under a particular condition, the other of the
same set of variables under a different condition. Is there a
statistical test I can use to see if these correlation matrices are
"different"?
Thanks
Mick
2011 Jun 02
4
generating random covariance matrices (with a uniform distribution of correlations)
List members,
Via searches I've seen similar discussion of this topic but have not seen
resolution of the particular issue I am experiencing. If my search on this
topic failed, I apologize for the redundancy. I am attempting to generate
random covariance matrices but would like the corresponding correlations to
be uniformly distributed between -1 and 1.
The approach I have been using is:
2011 Dec 08
2
Relationship between covariance and inverse covariance matrices
Hi,
I've been trying to figure out a special set of covariance
matrices that causes some symmetric zero elements in the inverse
covariance matrix but am having trouble figuring out if that is
possible.
Say, for example, matrix a is a 4x4 covariance matrix with equal
variance and zero covariance elements, i.e.
[,1] [,2] [,3] [,4]
[1,] 4 0 0 0
[2,] 0 4
2006 Sep 20
1
Pooled Covariance Matrix
I am in a discriminant analysis situation with a frame containing
several variables and a grouping factor, if you like:
set.seed(200906)
exampledf <- as.data.frame(matrix(rnorm(50,5,2),nrow=10,ncol=5))
exampledf$Group <- factor(rep(c(1,2,3),c(3,3,4)))
exampledf
I'm sure there must be a simple way to get the within group pooled
covariance matrix but I haven't found it yet.
I
2010 Nov 15
1
Non-positive definite cross-covariance matrices
I am creating covariance matrices from sets of points, and I am having
frequent problems where I create matrices that are non-positive
definite. I've started using the corpcor package, which was
specifically designed to address these types of problems. It has
solved many of my problems, but I still have one left.
One of the matrices I need to calculate is a cross-covariance matrix.
In other
2004 Jan 20
1
evaluation of discriminant functions+multivariate homosce dasticity
While I don't know anything about Box's M test, I googled around and found a
Matlab M-file that computes it. Below is my straight-forward translation of
the code, without knowing Matlab or the formula (and done in a few minutes).
I hope this demonstrates one of Prof. Ripley's point: If you really want to
shoot yourself in the foot, you can probably program R to do that for you.
[BTW:
2004 Jan 29
2
Calculating/understanding variance-covariance matrix of logistic regression (lrm $var)
Hallo!
I want to understand / recalculate what is done to get
the CI of the logistic regression evaluated with lrm.
As far as I came back, my problem is the
variance-covariance matrix fit$var of the fit
(fit<-lrm(...), fit$var). Here what I found and where
I stucked:
-----------------
library(Design)
# data
D<-c(rep("a", 20), rep("b", 20))
V<-0.25*(1:40)
V[1]<-25
2007 Apr 28
2
Calculating Variance-covariance matrix for a multivariate normal distribution.
Dear all R users,
I wanted to calculated a sample Variance covariance matrix of a five-variate normal distribution. However I stuck to calculate each element of that matrix. My question is should I calculate ordinary variance and covariances, taking pairwise variables? or I should take partial covariance between any two variables, keeping other fixed. In my decent opinion is I should go for the
2011 Feb 05
1
Creating covariance matrices for simple and complex factor structure
Hello all,
I'm trying to create covariance matrices that, when processed via CFA methods (in the sem package) will produce exact fit with simple structure down to poor fit with cross loadings. What is the best way to do this? I don't really need to have the exact loop code, but maybe an explanation of how to make a few of the matrices or an explanation of the rationale behind performing
2007 Sep 26
1
Accessing the fixed- and random-effects variance-covariance matrices of an nlme model
I would appreciate confirmation that the function vcov(model.nlme)
gives the var-cov matrix of the fixed effects in an nlme model.
Presumably the random-effects var-cov matrix is given by cov(ranef
(model.nlme)?
Rob Forsyth
2000 Jul 26
3
Correlation matrices
Hello,
are there any good methods in R that will test if two correlation matrices (obtained in different ways) are equal? Something better than the Mantel test would be preferable.
Regards,
Patrik Waldmann
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info",
2004 Sep 14
3
repeated measures and covariance structures
Hello-
I'm trying to do some repeated measures ANOVAs. In the past, using SAS,
I have used the framework outlined in Littell et al.'s "SAS System for
Mixed Models", using the REPEATED statement in PROC MIXED to model
variation across time within an experimental unit. SAS allows you to
specify different within-unit covariance structures (e.g., compound
symmetric, AR(1), etc.) to
2007 Mar 06
1
sem: standardized covariance estimates
Dear all,
How do I get the standardized covariance (the correlation) between two
latent variables?
'standardized.coefficients' gives standardized path coefficients, but
not covariances.
The covariance estimates are easily obtained from fit$coeff or
'summary', but
EQS reports both the covariance and the correlation, how can I get that?
best wishes, Mike
2007 Mar 01
1
covariance question which has nothing to do with R
This is a covariance calculation question so nothing to do with R but
maybe someone could help me anyway.
Suppose, I have two random variables X and Y whose means are both known
to be zero and I want to get an estimate of their covariance.
I have n sample pairs
(X1,Y1)
(X2,Y2)
.
.
.
.
.
(Xn,Yn)
, so that the covariance estimate is clearly 1/n *(sum from i = 1 to n
of ( X_i*Y_i) )
But,
2012 Aug 11
3
Problem when creating matrix of values based on covariance matrix
Hi,
I want to simulate a data set with similar covariance structure as my
observed data, and have calculated a covariance matrix (dimensions
8368*8368). So far I've tried two approaches to simulating data:
rmvnorm from the mvtnorm package, and by using the Cholesky
decomposition (http://www.cerebralmastication.com/2010/09/cholesk-post-on-correlated-random-normal-generation/).
The problem is
2007 May 09
1
generalized least squares with empirical error covariance matrix
I have a bayesian hierarchical normal regression model, in which the
regression coefficients are nested, which I've wrapped into one
regression framework, y = X %*% beta + e . I would like to run data
through the model in a filter style (kalman filterish), updating
regression coefficients at each step new data can be gathered. After
the first filter step, I will need to be able to feed