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: last estimation results not found, nothing to store -- Error message
From
"P. Wilner Jeanty" <[email protected]>
To
[email protected]
Subject
st: last estimation results not found, nothing to store -- Error message
Date
Wed, 6 Oct 2010 15:19:39 -0400
Hi All,
Stata issues an error message saying "last estimation results not
found, nothing to store" when I try to store estimation results from
an estimation command I wrote. However, when I type -ereturn list-,
all the saved scalars, matrices, macros and so on show up. Stephens
Jenkins experienced a similar problem back in 2008, maybe becasue he
did not generate his results within an -eclass- program (check out:
http://www.stata.com/statalist/archive/2008-06/msg00196.html).
But in my case, I follow religiously the basic outline suggested by
StataCorp and I still get the error message (see program code below).
Does anyone know what might trigger this error and how to fix it?
Thanks
Here is the structure I used for the estimation command:
********** Code begins***********************
program myest, eclass
version 11
if !replay() {
syntax whatever [, whatever Level(cilevel)]
marksample touse // see [P] mark
* Here I perform any other parsing of the user’s estimation request;
local depn "dependent variable name"
local nobs = number of observations in estimation
tempname b V
* Here I produce coefficient vector `b' and variance–covariance matrix `V'
ereturn post `b' `V', obs(`nobs') depname(`depn') esample(`touse')
ereturn local depvar "`depn'"
* Here I store stuff I want in e()
ereturn local cmd "myest" // set e(cmd) last
}
else { // replay
if "`e(cmd)'"!="myest" error 301
syntax [, Level(cilevel)]
}
* Here I output header above the coefficient table;
ereturn display, level(`level')
*Here I perform some housekeeping
end
*****************Code ends************************
P. Wilner Jeanty, Researcher Economist
Dept. of Agricultural, Environmental, and Development Economics
The Ohio State University
2120 Fyffe Road
Columbus, Ohio 43210
(614) 292-6382 (Office)
http://ideas.repec.org/e/pje95.html
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/