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: ereturn post, obs(#) - does the # in obs() option have a size limit?


From   Joseph Luchman <[email protected]>
To   statalist <[email protected]>
Subject   st: ereturn post, obs(#) - does the # in obs() option have a size limit?
Date   Thu, 20 Feb 2014 13:34:10 -0800

Hi Statalist,

  I've been working with this problem for some time now, I'm at an
impasse and am beginning to wonder if it is a problem with the obs(#)
option of ereturn post itself - but I thought I'd try posting to the
list to make sure it's not something I'm overlooking that is producing
this behavior.

  To summarize, it seems that the obs(#) option of ereturn post
returns missing values for numbers of observations that are too high
(e.g., one million).  The same problem doesn't seem to affect
separating out the scalar though.

  I should note that I'm running Stata version 12.1.

  Representative issue is covered below in the example syntax below:

version 12.1

program define count_then_post1, eclass
count
ereturn post , obs(`=r(N)')
end

program define count_then_post2, eclass
count
ereturn scalar N = `=r(N)'
end

set obs 100

count_then_post1

ereturn list //result here is e(N) = 100

count_then_post2

ereturn list //result here is e(N) = 100

clear

set obs 1000000

count_then_post1

ereturn list //result here is missing

count_then_post2

ereturn list //result here is e(N) = 1000000

- joe

Joseph Nicholas Luchman, Ph.D.
----
Behavioral Statistics Lead | Fors Marsh Group
Email: [email protected]
forsmarshgroup.com
https://www.researchgate.net/profile/Joseph_Luchman/
*
*   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