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
Stata List <[email protected]>
Subject
Re: st: Variance-Covariance Matrix
Date
Sat, 4 Jan 2014 22:24:49 +0100
Sorry. I forgot to substitute b" with x2. This is the right code
regress x1 x2
summarize x2
mat vce = ((e(mss)+e(rss))/(e(df_m)+e(df_r)),_b[x2]*r(Var)\_b[x2]*r(Var),r(Var))
mat li vce
Federico
On Jan 4, 2014, at 8:18 PM, Adrian Stork <[email protected]> wrote:
> 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/
--
Federico Belotti, PhD
Research Fellow
Centre for Economics and International Studies
University of Rome Tor Vergata
tel/fax: +39 06 7259 5627
e-mail: [email protected]
web: http://www.econometrics.it
*
* 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/