Good Morning everyone !!!
I need to perform the following command:
The fact is that until I work whit string variables it works, but when I try with numerical one it doesn't, I had also tried those syntax:
-----------------------------------------------
--------------------------------------------------------------------------
but Stata return to me that error "invalid syntax" or "type mismatch" or "weights not allowed"... Where I fail? Someone could kindly help me?
Thank you so much in advance for your time !!
I need to perform the following command:
Code:
xtset IDpanel Time by IDpanel: replace Q49_14_TEXT = Q49_14_TEXT[_n-1] if Q49_14_TEXT =="" by IDpanel: replace Q49_14_TEXT = Q49_14_TEXT[_n+1] if Q49_14_TEXT == ""
Code:
xtset IDpanel Time by IDpanel: replace Q49_14 = Q49_14[_n-1] if Q49_14 == . by IDpanel: replace Q49_14 = Q49_14[_n+1] if Q49_14== .
Code:
xtset IDpanel Time by IDpanel: replace Q49_14 = Q49_14_TEXT[_n-1] if Q49_14 == "." by IDpanel: replace Q49_14 = Q49_14_TEXT[_n+1] if Q49_14== "."
Code:
xtset IDpanel Time by IDpanel: replace Q49_14 = Q49_14_TEXT[_n-1] if Q49_14 == by IDpanel: replace Q49_14 = Q49_14_TEXT[_n+1] if Q49_14==
Thank you so much in advance for your time !!
Comment