Bookmark and Share

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

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

RE: st: Mata and do files

From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: Mata and do files
Date   Thu, 11 Aug 2011 20:08:31 +0100

To close this off:  

Given a multiple varlist such as "price length weight" as an argument to -st_view()-, you need to wrap it in -tokens()- in Stata 9.2 and 10.1, but not in 11.1 or 12.0, so everybody's right about something (and I was thus wrong in my first comment as far as Alex is concerned). 

[email protected] 

Nick Cox

I have 12, but it's at my workplace, and I'm not.

. sysuse auto
(1978 Automobile Data)

. mata
------------------------------------------------- mata (type end to exit) -----
: st_view(a = ., ., "price length weight")
variable price length weight not found
               st_view():  3500  invalid Stata variable name
                 <istmt>:     -  function returned error

: end

. about

Stata/SE 10.1 for Windows
Born 10 Jun 2010

Nick Cox 

>> It didn't work for me in Stata 10.1. (My machine with Stata 12 is a mile away.)

Alex Olssen

>>> Nick, you said "price length weight" is not an acceptable argument for
>>> -st_view()- however typing the following interactively in a new Stata
>>> session suggests otherwise.
>>> sysuse auto, clear
>>> mata
>>> st_view(a=., ., "price length weight")
>>> a

Nick Cox
>>>> "price length weight" is not an acceptable argument for -st_view()-.
>>>> You need to tokenize it.

*   For searches and help try:

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