Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: output from mata:variance

From   Stas Kolenikov <>
Subject   Re: st: output from mata:variance
Date   Sat, 6 Mar 2010 09:50:17 -0600

On Fri, Mar 5, 2010 at 6:39 PM, Jon Schwabish <> wrote:

> I'm using the -mata:variance- command to calculate the variance across (at
> least) two variables. Specifically, for the two variable case, I am running
> the following command:
> mata:variance(vec(st_data(.,("r1","r2"))))
> Is there any way to capture the output from the command in order to write
> it to an output file (as in something stored in r() or e())?

mata: st_local("myvar",strofreal(variance(vec(st_data(.,("r1","r2"))))))
di "`myvar'"

Stas Kolenikov, also found at
Small print: I use this email account for mailing lists only.

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index