Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: RE: create matrix from pwcorr command

From   "Nick Cox" <>
To   <>
Subject   RE: st: RE: create matrix from pwcorr command
Date   Thu, 29 Apr 2010 19:40:00 +0100

You want to take the determinant of that matrix! I'd strongly advise
getting at the correlation matrix in several different ways. With that
fraction of missing data you are going to end up with a distribution of
estimates for that determinant in any honest assessment of uncertainty.
I have no easy or specific advice beyond that. 


Tyler Frazier

Thank you for your reply and comment -- you are correct, the number of
observations in this household survey vary from ~3400 down to ~1400
and even one or two variables are in the range of ~800.  I would like
to come up with the determinants in order to synthetically simulate
the population of a large area of a city, approximately 200,000
persons.  Should I fill in the missing values using stata first? Ty

On Thu, Apr 29, 2010 at 7:35 PM, Nick Cox <> wrote:
> I don't know why you thought that would work. It's a very long way
> the syntax for -matrix-.
> Stata makes it difficult for you to do this, and with good reason. As
> different correlations may be based on different sample sizes, the
> correlations are not strictly comparable, and the resulting matrix is
> typically unsuitable for multivariate analysis. It may not even be
> positive semi-definite.
> But that aside, -matpwcorr- from SSC evidently does this for you.
> Nick
> Tyler Frazier
> I would like to create a matrix from the pwcorr command -- I tried
> matrix m = pwcorr Var1 Var2 Var3 Var4 etc.... but that doesn't seem to
> work. likewise for standard dev and mean

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index