Thank you for showing your log, which may be answering your question. In particular, it includes the note
NOTE: Missing values were generated as a result of performing an operation on missing values.
Each place is given by: (Number of times) at (Line):(Column).
1497 at 2010:7 4256 at 2010:18 4256 at 2010:25 3266 at 2010:36 3266 at 2010:43 4253 at 2010:54
4253 at 2010:61 4279 at 2010:72 4279 at 2010:79 3383 at 2010:90 3383 at 2010:97 1497 at 2010:101
which says that at least 4,279 of your 5,569 observations have a missing value in columns 72 and 79. Using the statement copied below, I suspect that would be variables PAQ655 and/or PAD660.
2010 totPA=sum((PAQ610*PAD615*8),(PAQ625*PAD630*4),(PAQ640*PAD645*4),(PAQ655*PAD660*8),(PAQ670*PAD675*4))/60;
which means in turn that totPA will get assigned a missing value.
The raises the question of whether you should treat missing values for any of the PAQ variables in line 2010 as zeroes. After all, totPA can't be zero unless every one of the PAQ variables in the calculation are at zero. Do those variables ever have a zero value?
If not, perhaps you want to treat missing values as zero (look at the NHANES docs to see whether this is justified). If so, you could do something like
totPA=sum( (sum(0,PAQ610)*sum(0,PAD615)*8)
, (sum(0,PAQ625)*sum(0,PAD630)*4)
, (sum(0,PAQ640)*sum(0,PAD645)*4)
, (sum(0,PAQ655)*sum(0,PAD660)*8)
, (sum(0,PAQ670)*sum(0,PAD675)*4)
)
/60 ;
But I repeat, make sure, for your purposes, that it is valid to treating missing values as zeroes.
... View more