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]

Re: st: Variance-Covariance Matrix


From   Federico Belotti <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Variance-Covariance Matrix
Date   Sat, 4 Jan 2014 21:28:39 +0100

This is a way using Mata

mkmat x1 x2, matrix(test1)
mata test1 = st_matrix("test1")
mata st_matrix("vce", variance(test1))
mat li vce

HTH
Federico 

> Il giorno 04/gen/2014, alle ore 20:18, Adrian Stork <[email protected]> ha scritto:
> 
> Dear all
> 
> I'm sorry for asking such a simple question but unfortunately I
> couldn't find an answer. How do you get the variance-covariance matrix
> in Stata?
> I know it's available in postestimations using e(V) but in my case
> there is no estimation. Specifically  I got two variables each with
> length of 306 that I transformed into a matrix
> 
> .mkmat x1 x2, matrix(test1)
> 
> Now there must be some way to calculate the variance-covariance matrix
> in an efficient way as in other known mathematical software.
> 
> Something like:
> .matrix cov test1
> 
> Am I missing something?
> Does anyone have an idea to get the v-cov matrix in some way? Help is
> very much appreciated. Thanks.
> 
> Best,
> Adrian
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

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


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