Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: linear spline and interaction

From   "stata_user stata_user" <>
Subject   st: linear spline and interaction
Date   Fri, 22 Sep 2006 17:42:47 +0100

I have used the follwoing code to test the associaton between z and y

mkspline z1 a z2 = z,marginal
reg y z1 z2

predict p
label variable p "L_Spline_a"

The first line creates a linear spline at the value 'a' of the variable z and then I use the result in the regression ( line 2)

My question , how I can include an interaction term with a dummy variable d? the code

xi: reg y i.d*z1 i.d*z2

does not give me the expected result

Thanks a lot for any comments


Windows Live™ Messenger has arrived. Click here to download it for free!

* For searches and help try:

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