Statalist


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

st: Re: out of sample prediction


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: Re: out of sample prediction
Date   Sat, 14 Feb 2009 23:20:01 +0100

<>

I take it from your terse message you want something like an imemdiate command for -predict- (which would have to be -predicti-). There is no such command at the moment, but you can edit your dataset in the data editor and enter the desired values of the covariates in the last row, then run -predict-.

Or use the dialog box for -adjust-, available from -db adjust-, to enter the values there in the lower half of the "main" tab.

Or do it manually. I show the last two options here:

********
sysuse auto, clear
regress price weight for
adjust weight=2000 foreign=1, xb
di _b[weight]*2000+_b[foreign]*1+_b[_cons]
********

HTH
Martin
_______________________
----- Original Message ----- From: "Dragutin Culinovic" <[email protected]>
To: "STATA List" <[email protected]>
Sent: Saturday, February 14, 2009 11:09 PM
Subject: st: out of sample prediction


Dear all,

how to compute instant prediction on some arbitrary (inline typed)
value of xs after -regress-, without loading or creating new dataset?

THX.
*
*   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/


*
*   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/



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