Stata keeps deleting observations from a variable?

#1
Hi all,

I am creating one variable from several dummy variables using

gen newvarname=0
replace varname=1 if varname==1
replace varname=2 if varname==1
replace varname=3 if varname==1

and so on. The values range from 0-7.


For some reason, after I hit tab newvarname, newvarname is missing several hundred observations from each value. The same happens when I try to create a large table using the table command.

Does anyone know why this is happening?