Exercise

Compute a variable

For each pregnancy in the NSFG dataset, the variable 'agecon' encodes the respondent's age at conception, and 'agepreg' the respondent's age at the end of the pregnancy.

Both variables are recorded as integers with two implicit decimal places, so the value 2575 means that the respondent's age was 25.75.

Instructions 1/3

undefined XP
    1
    2
    3
  • Select 'agecon' and 'agepreg', divide them by 100, and assign them to the local variables agecon and agepreg.