Discussion:
Enter age in year and month in SPSS
(too old to reply)
s***@gmail.com
2017-04-30 20:07:49 UTC
Permalink
Hello. Is is possible to enter a person's chronological age into SPSS using year, month, and day? I am entering data about children. For example, let's say I have a child who was 12 years, 3 months, and 2 days at the time of my study. How do I enter that into SPSS? Do I have to convert the age into months? I'm using SPSS version 24.
Rich Ulrich
2017-05-01 04:13:35 UTC
Permalink
On Sun, 30 Apr 2017 13:07:49 -0700 (PDT),
Post by s***@gmail.com
Hello. Is is possible to enter a person's chronological age into SPSS using year, month, and day? I am entering data about children. For example, let's say I have a child who was 12 years, 3 months, and 2 days at the time of my study. How do I enter that into SPSS? Do I have to convert the age into months? I'm using SPSS version 24.
Look up the Date functions and formats.
The easy way to describe:

Each record should have the date for "today" and for subject's birth.

Use a function to convert today's Year-mo-day to an SPSS date.
Use the same function, ditto, for the Birth Year-mo-day.

Use the available function to obtain the difference in Months or days,
whichever you prefer.
--
Rich Ulrich
a***@mesrobian.org
2019-05-01 03:22:35 UTC
Permalink
Post by s***@gmail.com
Hello. Is is possible to enter a person's chronological age into SPSS using year, month, and day? I am entering data about children. For example, let's say I have a child who was 12 years, 3 months, and 2 days at the time of my study. How do I enter that into SPSS? Do I have to convert the age into months? I'm using SPSS version 24.
i have to convert age in number of complete years plus complete months to a single number to Spss ? I am entering data about children. For example, let's say I have a child who was 12 years, 3 months, at the time of my study. How do I enter that into SPSS? Do I have to convert the age into months? I'm using SPSS version 24.
Bruce Weaver
2019-05-01 13:01:52 UTC
Permalink
Post by a***@mesrobian.org
Post by s***@gmail.com
Hello. Is is possible to enter a person's chronological age into SPSS using year, month, and day? I am entering data about children. For example, let's say I have a child who was 12 years, 3 months, and 2 days at the time of my study. How do I enter that into SPSS? Do I have to convert the age into months? I'm using SPSS version 24.
i have to convert age in number of complete years plus complete months to a single number to Spss ? I am entering data about children. For example, let's say I have a child who was 12 years, 3 months, at the time of my study. How do I enter that into SPSS? Do I have to convert the age into months? I'm using SPSS version 24.
Perhaps something like this will do the trick.

* Generate a small data set to illustrate.
NEW FILE.
DATASET CLOSE ALL.
DATA LIST LIST / ID years months (3F5.0).
BEGIN DATA
1 12 3
2 11 10
3 12 0
END DATA.

COMPUTE AgeMos = years*12 + months.
COMPUTE AgeYrs = AgeMos/12.
FORMATS AgeMos(F5.0).
VARIABLE LABELS
AgeMos "Age in months"
AgeYrs "Age in years"
.
LIST.

If all subjects are children, age in months might be preferable. But that's up to you.

HTH.

Loading...