Dear all,
I'm very new to Stata, I'm more used to SPSS. I need to define missing values for time variable, but no matter what I try it doesn't work, and I can't seem to find answers in any material.
This is how I defined the variable (this part worked out well):
gen double SDf= SEf - SOf
format %tcHH:MM SDf
(this did not)
*Dealing with suspicious values
recode SDf (tc(31dec1959 00:00:00)/tc(31dec1959 03:27:00) = tc(31dec1959 00:00:00)) (tc(31dec1959 14:00:00)/max = tc(31dec1959 00:00:00)), copyrest
mvdecode SDf , mv(tc(31dec1959 00:00:00))
To cut a long story short, I need to define values up to 3:27 a.m. as missing and from 2 p.m. and higher as missing. Since I defined SDf variable as "tc" I thought I could work it out the same while recoding it and then marking as missing. However, I'm just getting "unknown el tc in rule".
Please, can anyone help me how to handle this? My life very much depends on it...
I'm very new to Stata, I'm more used to SPSS. I need to define missing values for time variable, but no matter what I try it doesn't work, and I can't seem to find answers in any material.
This is how I defined the variable (this part worked out well):
gen double SDf= SEf - SOf
format %tcHH:MM SDf
(this did not)
*Dealing with suspicious values
recode SDf (tc(31dec1959 00:00:00)/tc(31dec1959 03:27:00) = tc(31dec1959 00:00:00)) (tc(31dec1959 14:00:00)/max = tc(31dec1959 00:00:00)), copyrest
mvdecode SDf , mv(tc(31dec1959 00:00:00))
To cut a long story short, I need to define values up to 3:27 a.m. as missing and from 2 p.m. and higher as missing. Since I defined SDf variable as "tc" I thought I could work it out the same while recoding it and then marking as missing. However, I'm just getting "unknown el tc in rule".
Please, can anyone help me how to handle this? My life very much depends on it...
Comment