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

Re: st: How to plot a mkspline regression?

From   Maarten buis <>
Subject   Re: st: How to plot a mkspline regression?
Date   Thu, 11 Feb 2010 08:40:47 +0000 (GMT)

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

*-------------------- 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: )

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen


*   For searches and help try:

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