stat stat
2007-Apr-28 15:36 UTC
[R] 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 second option? Your help will be highly appreciated. Thanks and regards, stat --------------------------------- [[alternative HTML version deleted]]
Peter Dalgaard
2007-Apr-28 21:00 UTC
[R] Calculating Variance-covariance matrix for a multivariate normal distribution.
stat stat wrote:> 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 second option? > >The definition is the former, though...> Your help will be highly appreciated > > Thanks and regards, > stat > > > --------------------------------- > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Ranjan Maitra
2007-Apr-28 21:10 UTC
[R] Calculating Variance-covariance matrix for a multivariate normal distribution.
Dear "stat", Interesting claim to a name! In any case, var(X) where X is the data matrix with n rows of 5-variables should do the trick. Btw, please read the posting guide: your question is legitimate, hiding your identity ("stat stat") is not. Best wishes, Ranjan On Sat, 28 Apr 2007 16:36:55 +0100 (BST) stat stat <stat700004 at yahoo.co.in> wrote:> 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 second option? > > Your help will be highly appreciated. > > Thanks and regards, > stat > > > --------------------------------- > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Reasonably Related Threads
- Simulating from "matrix variate normal distribution"
- Fitting mean and covariance of Multivariate normal with censored data
- variance does not equal serial covariance of lag zero?
- Simulating from a Multivariate Normal Distribution Using a Correlation Matrix
- generate bi-variate normal data