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]

st: re: output from mata:variance

From   Kit Baum <>
Subject   st: re: output from mata:variance
Date   Sat, 6 Mar 2010 14:42:14 -0500

No need for all this code:

//get this result w/o -mata-
stack mpg length , into(newvar) clear
su n, d
local varmpglength=r(Var)
di `varmpglength'

with Mata, all you need is

sysuse auto, clear
di vv

Kit Baum   |   Boston College Economics & DIW Berlin   |
                              An Introduction to Stata Programming  |
   An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

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