I am curious about the following behavior of fvexpand (and other commands):
I want to take a time lag of an interaction term which includes a specific level of a categorical variable. When I do that in the following way, the level of the categorical variable is ignored:
[CODE]
. webuse psidextract
. fvexpand L.(4.ed#c.wks)
. display "`r(varlist)'"
4bL.ed#cL.wks 5L.ed#cL.wks 6L.ed#cL.wks 7L.ed#cL.wks 8L.ed#cL.wks 9L.ed#cL.wks 10L.ed#cL.wks 11L.ed#cL.wks 12L.ed#cL.wks 13L.ed#cL.wks 14L.ed#cL.wks 15L.ed#cL.wks 16L.ed#cL.wks 17L.ed#cL.wks
[CODE]
Is this intended?
I know that I can do the following to get around this:
But that is not my point. I am trying to understand the above behavior because it affects how I should deal in my code with time lags of an arbitrary variable, say L.`var', where `var' may or may not be an interaction term as above.
I want to take a time lag of an interaction term which includes a specific level of a categorical variable. When I do that in the following way, the level of the categorical variable is ignored:
[CODE]
. webuse psidextract
. fvexpand L.(4.ed#c.wks)
. display "`r(varlist)'"
4bL.ed#cL.wks 5L.ed#cL.wks 6L.ed#cL.wks 7L.ed#cL.wks 8L.ed#cL.wks 9L.ed#cL.wks 10L.ed#cL.wks 11L.ed#cL.wks 12L.ed#cL.wks 13L.ed#cL.wks 14L.ed#cL.wks 15L.ed#cL.wks 16L.ed#cL.wks 17L.ed#cL.wks
[CODE]
Is this intended?
I know that I can do the following to get around this:
Code:
. fvexpand 4L.ed#cL.wks . display "`r(varlist)'" 4L.ed#cL.wks
Comment