Bookmark and Share

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]

st: Issue with st_local


From   Amadou DIALLO <[email protected]>
To   statalist <[email protected]>
Subject   st: Issue with st_local
Date   Mon, 20 Jan 2014 17:25:49 +0100

Dear Statalisters,

Happy new year 2014 !
I hope you're fine. I have the following problem in Stata. My
st_local() command is returning nothing. What I'm I doing wrong? Many
thanks for usual support.

.    keep country product flag

.
.    so c p

.    order c p f

.
.    egen ncountry = group(country)

.    su nc

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
    ncountry |     55335         109    62.64241          1        217

.    local maxcountry = r(max)

.    di `maxcountry'
217

.    mata : maxcountry = st_local("`maxcountry'")

.    mata: maxcountry


.    tomata ncountry

.    mata: mycountry= colminmax(ncountry)

.    mata: maxcountry = mycountry[2]

.    mata: maxcountry
  217




-- 
Amadou B. DIALLO, PhD.
Senior Economist, AfDB.
[email protected]
+21671101789
*
*   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/


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