Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Insufficient Observations error(2001) with out-of-sample predictions


From   Stephen Mennemeyer <[email protected]>
To   statalist <[email protected]>
Subject   st: Insufficient Observations error(2001) with out-of-sample predictions
Date   Wed, 19 Nov 2003 17:35:58 -0600

I am attempting to make out-of-sample predictions using the approach described in [R] predict (pages 219-220).
I estimated a model

gllamm y x1 x2 x3......

later I call up a second dataset of 18 hypothetical observations:

use newdata, clear

then I try to get predicted values

predict newvar, xb

I get back

error . . . . . . . . . . . . . . . . . . . . . . . Return code 2001
insufficient observations;
You have requested some statistical calculation and, while there
are some observations, the number is not sufficient to carry out
your request.
The same problem occurs if I use an alternative method of prediction:
gllapred newvar, xb

I have checked to see that I have the same variables in my dataset as in the estimated model. Variable names are in the correct case. The internal order of the variables in my second dataset is a bit different from the original, but the manual seems to say that this is ok. "ereturn list" shows that the parameters for the estimated model are still in memory.
Why this error?
--
Stephen T. Mennemeyer Ph.D.
University of Alabama at Birmingham
School of Public Health
Dept. of Health Care Organization and Policy

U.S. Mail:
1530 3rd Ave. South 330 RPHB
Birmingham, Al 35294-0022

Express Delivery:
330 Ryals Public Health Building
1665 University Blvd.
Birmingham, Al 35294-0022

Phone: (205) 975-8965
FAX (205) 934-3347
e-mail: [email protected]


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index