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: Can -bootstrap- handle vectors

From   Nick Cox <>
To   "" <>
Subject   Re: st: Can -bootstrap- handle vectors
Date   Sat, 13 Aug 2011 14:13:44 +0100

A side issue: The distinction between numeric and string does not bite here for returning macros to Stata.

A local macro is a place for holding character strings, which can be numeric characters. Thus -st_local()- will work fine regardless of content.


On 13 Aug 2011, at 10:12, Matthew White <> wrote:

I don't know of a way to use Mata to put numeric values in a local.
st_local only works with string values, I think. But you could return
each element of a Mata vector to separate Stata scalars. Say X is a
Mata column vector:
mata: st_numscalar("r(rows)", rows(X))
forvalues row = 1/`r(rows)' {
   mata: st_numscalar("r(v`row')", X[`row',

*   For searches and help try:

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