Displaying 20 results from an estimated 10000 matches similar to: "testing equality of covariance matrices"
2010 Jan 22
1
Equality between covariance matrices?
I have conducted a discriminant function analysis with lda() in the MASS
Package, and I am interested in testing that the covariance matrices of the
groups are equal.
Does anybody have any suggestions on how I could test for equality between
covariance matrices?
Any help would be great. Thank you in advance.
Cheers -Rob
--
[[alternative HTML version deleted]]
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.
2005 Aug 15
1
error in predict glm (new levels cause problems)
Dear R-helpers,
I try to perform glm's with negative binomial distributed data.
So I use the MASS library and the commands:
model_1 = glm.nb(response ~ y1 + y2 + ...+ yi, data = data.frame)
and
predict(model_1, newdata = data.frame)
So far, I think everything should be ok.
But when I want to perform a glm with a subset of the data,
I run into an error message as soon as I want to predict
2011 Aug 06
0
ridge regression - covariance matrices of ridge coefficients
For an application of ridge regression, I need to get the covariance
matrices of the estimated regression
coefficients in addition to the coefficients for all values of the ridge
contstant, lambda.
I've studied the code in MASS:::lm.ridge, but don't see how to do this
because the code is vectorized using
one svd calculation. The relevant lines from lm.ridge, using X, Y are:
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
2005 Sep 18
0
How to test homogeneity of covariance matrices?
Dear Group Members,
Forgive me if I am a little bit out of subject. I am looking for a good
way to test the homogeneity of two variance-covariance matrices using R,
prior to a Hotelling T test. Youll probably tell me that it is better
to use a robust version of T, but I have no precise idea of the
statistical behaviour of my variables, because they are parameters from
the harmonics of
2003 Apr 04
0
nlme and variance-covariance matrices.
--
Dear R users,
I have data on around 2000 birds from 3 generations for which I know
an individual's pedigree (i.e. the relationship it shares with other
individuals e.g brother, uncle, mother) and also a pedigree based on
foster-families, because half broods were removed from their nest of
origin and placed in a foster parent's nest.
From this I want to model two types of random
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
2002 Oct 23
0
Obtaining covariance matrices for kmeans output clusters
I am having trouble getting a covariance matrix for each cluster which
is output by kmeans(). My input looks like:
> imagedat <- read.table("table", header=TRUE)
> imagedat
Red Green Blue
0_0 5 7 8
1_0 5 5 18
2_0 7 8 49
3_0 22 8 76
4_0 54 10 67
5_0 50 9 28
6_0 18 10 15
7_0 9 7 6
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
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 Jan 27
0
customizing covariance matrices
Hello R-users,
Does anyone know how to customize a corStruct object to be used in gls?
I would either like to create the covariance matrix from scratch, or
alter the diagonal elements of an existing corStruct object and pass
that to gls.
Any ideas would be appreciated!
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:
2009 Jun 02
2
variance does not equal serial covariance of lag zero?
Dear all,
Does this make any sense:
var() = cov() != acf(lag.max=0, type="covariance")?
I have daily data of IBM for May 2005, and I'm using the logarithmic return:
> ibm200505$LRAdj.Close
[1] NA 0.0203152 0.0005508 -0.0148397 -0.0025182 0.0092025
-0.0013889
[8] 0.0098196 -0.0103757 -0.0274917 0.0005716 -0.0159842 -0.0074306
0.0091710
[15] 0.0002898 0.0226306
2005 Jun 21
1
test for equality of two data sets with multidimensional variables
Hello there,
I have two data sets with 14 variables each, and wish to do the test
for equality of their covariance matrices and mean vectors. Normally
these tests should be done by chi square test (box provided) and
Hotelling's T square test respectively. Which R functions could do
this kind of test? I just find some functions could do for one
dimension, but no for multidimension. Some one
2008 Jan 23
2
survey: estimating a covariance matrix
Hello
Does anybody happen to know if it is possible to use the survey package to
estimate a covariance matrix from a complex survey?
I have design weights and clusters (no strata), and want to get a covariance
matrix with preferably the effective sample size or else an estimate of the
variance-covariance matrix of the covariance matrix ("asymptotic covariance
matrix"). Is this
2002 Feb 26
2
covariance of equal date values
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I need to count the covariance of two time series. Both of them contain
the dates' vector and vector of values. But the dates are not the same. It
means some dates of first ts are not in the second respectively. And I
need the covariance of same dates, of course.
Could anyone help me, please?
Thank you.
lukas
- --
Lukas Kubin
lukas.kubin at
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
2012 Oct 13
1
hep on arithmetic covariance conversion to log-covariance
Dear All,
is there a function in R that would help me convert a covariance matrix built based on arithmetic returns to a covariance matrix from log-returns?
As an example of the means and covariance from arithmetic:
mu <-c(0.094,0.006,1.337,1.046,0.263)
sigma
2005 May 14
1
lda
Dear R-helpers,
if I am right a discriminant analysis can be done with "lda".
My questions are:
1. What method to discriminate the groups is used by "lda" (Fisher's linar
discriminant function, diagonal linear discriminant analysis, likelihood ratio
discriminant rule, ...)?
2. How can I see, which method is used? (Typing just lda does not give me any
code).
Thank you in