Hi, I am trying to run a panel data regression for waves 4 and above from my dataset:

xtset pidp UKHLSwave
xtlogit lifesat unemployment outoflaborforce newduration newdursq10 married goodhealth age agesq10 loghhincome, if UKHLSwave >= 3

but get the error message:

if UKHLSwave >= 3 invalid
r(198);

I have recoded many of the variables prior to trying to execute this command (a lot of code so will not post here), but do not see how this could interfere with STATAs ability to identify the wave. I have checked and the UKHLSwave is identified by STATA as floating. What could be the issue here? And if there is an alternative way to run the regression for specified waves please do let me know!