Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Predict in version 11

From   "Marnix Zoutenbier" <[email protected]>
To   [email protected]
Subject   st: Predict in version 11
Date   Wed, 8 Dec 2010 10:58:13 +0100

Dear all,

I see a difference in the way predict works between Stata10 and 11.

Consider the following example
x1	testset 	y
1	1	12
2	1	13
3	1	14
4	2	.

And the commands
anova y x1 if testset==1
predict yhat

The following is the result in version 11
x1	testset 	y	yhat
1	1	12	12
2	1	13	13
3	1	14	14
4	2	.	12

While in version 10 the following dataset results
x1	testset 	y	yhat
1	1	12	12
2	1	13	13
3	1	14	14
4	2	.	.

I prefer the version 10 way-of-working, because it gives me the opportunity
to identify observations that are in the testset (testset==2) and not in
the trainingset (testset==1).

Is it possible to obtain the same result in version 11 as in version 10,
other than switching with the version command before and after predict?

Thank you for your consideration,

Marnix Zoutenbier


Drs. Marnix Zoutenbier MTD CIRM
Senior Consultant

T: +31 (0)40 750 23 25
F: +31 (0)40 750 16 99
E: [email protected]

PO Box 414, 5600 AK Eindhoven, The Netherlands
Vonderweg 16, 5616 RM Eindhoven, The Netherlands
KvK 17076484
De informatie verzonden in dit e-mail bericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien de informatie bij
vergissing bij u terecht is gekomen dan verzoeken wij u vriendelijk de
afzender hiervan op de hoogte te stellen en de informatie te verwijderen.
Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze
informatie aan derden zonder expliciete toestemming van de afzender is niet
toegestaan. Aan de verstrekte informatie kunnen geen rechten worden
ontleend, tenzij expliciet anders is aangegeven in het e-mail bericht. Wij
staan niet in voor de juiste en volledige overbrenging, noch voor de
tijdige ontvangst van dit e-mail bericht.<br>
This message and its attachments are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient,
please notify the sender by reply mail and delete this message and its
attachments from your system and refrain from using or copying its contents
or disclosing its contents in any manner to third parties. We cannot assume
any responsibility for the accuracy or reliability of the information
contained in these message (including attachments), nor shall the
information be construed as constituting any obligation on the part of CQM

*   For searches and help try:

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