Hello,

I'm trying to create distance and time interaction dummy variables with my sample dataset given below. Here wanted is the distance variable between two counties in miles.

I want to create an interaction dummy of this wanted variable with the year-month dummy of my data which is presented by ym.

Even though, I tried creating the dummy with the following code it's returning me an error. May I know why ? Also wanted have a lot of missing observations. I don't know if it's relevant or not. Just letting you know

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input float(wanted ym year)
10 440 1996
10.96 438 1996
15 442 1996
20 436 1996
21.34 441 1996
12 438 1996
10 441 1997
15 440 1997
16 432 1997
20 436 1998
21.22 437 1998
31 438 1998
41 442 1999
50 443 1999
end
Code:
g want_year = c.wanted##i.ym
invalid matrix stripe;
c.wanted##i.ym
r(198);

end of do-file

r(198);