Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: A quick question


From   "Albert Newton" <[email protected]>
To   statalist <[email protected]>
Subject   st: A quick question
Date   Thu, 11 May 2006 15:34:30 -0700

Hi folks,

   I have two varibles: weight and height of respondents in 1989.

weight1998      float  %9.0g
height1998      float  %9.0g

I want to create a new variable:

gen BMI = weight1998/(height1998^2)

My little problem is that:  BMI takes strange values if weight1998 is
missing.  Could anyone tell me why?  Thanks a lot!

height1998	weight1998	BMI1989
1.5748                  290                        53.04115
1.4732                  256                        53.50351
1.5494                  285                        53.84973
1.5494                  306                        57.8176
1.6764                  375                        60.52597
1.905                   .                          124.4902
1.778                   .                          142.9097
1.778                   .                          142.9097
1.6764                  .                          160.757
1.6764                  .                          160.757
1.6764                  .                          160.757



Albert

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index