Bookmark and Share

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


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

st: Calculation of covariance matrix for unbalanced sample?


From   <[email protected]>
To   <[email protected]>
Subject   st: Calculation of covariance matrix for unbalanced sample?
Date   Thu, 3 Nov 2011 10:00:10 -0000

A colleague has data on a relatively large number of variables. His
sample is unbalanced in the sense that each variable has some missing
values. He wishes to calculate the covariance matrix for his data but
without the listwise deletion of cases that is imposed by -correlation,
covariance-  or -matrix accum-.

My first thought was that he could use -pwcorr- and loop over his
variables, and build up his matrix from the saved results. But I thought
there must be an easier or more straightforward way -- but Googling and
-findit- have not suggested any.  I guess there is a relatively easy
Mata solution, but I am currently unfamiliar with that route.

Suggestions using Stata or Mata please

Stephen
------------------
Professor Stephen P. Jenkins <[email protected]>
Department of Social Policy and STICERD
London School of Economics and Political Science
Houghton Street, London WC2A 2AE, UK
Tel: +44(0)20 7955 6527
Changing Fortunes: Income Mobility and Poverty Dynamics in Britain, OUP
2011, http://ukcatalogue.oup.com/product/9780199226436.do
Survival Analysis Using Stata:
http://www.iser.essex.ac.uk/survival-analysis
Downloadable papers and software: http://ideas.repec.org/e/pje7.html


Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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