I answered your question using the newer -margins- command, but
it is easier to use the older -adjust- command (or I am not
familiar enough with -margins- to have found the appropriate
trick):
*-------------------- begin example -----------------------
sysuse auto, clear
mkspline mpg1 20 mpg2 = mpg
reg price mpg? foreign rep78
adjust foreign=0 rep78=3, by(mpg) gen(yhat)
twoway line yhat mpg, sort ///
title(predicted price for US cars with average repair status)
*----------------------- end example ------------------------
( For more on how to use examples I sent to statalist see:
http://www.maartenbuis.nl/stata/exampleFAQ.html )
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/