SPSS Date Function "Years" versus "Months"

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

SPSS Date Function "Years" versus "Months"

SUBSCRIBE SPSSX-JohnF
So I am generating age related data on a recurring basis, primarily on an annual basis and sometimes more frequently and entails "Mean" and "Median" ages.  Historically, I have calculated age in fractional amounts......e.g., using the SPSS datediff function using "months" and dividing by 12 for the fractional component as I believe a median of 6.8 years is a relevant comparison to a subsequent year's 6.1 years.  I have colleagues who believe the SPSS datediff function using "years" is adequate.  I suppose they believe the mean age will result in a fractional component and yield or present a meaningful change in age if it occurs.  Any thoughts would be appreciated.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Date Function "Years" versus "Months"

John F Hall
Any calculation based on age last birthday needs to add 0.5 years.

John F Hall  MA (Cantab) Dip Ed (Dunelm)
[Retired academic survey researcher]

Email:          [hidden email]
Website:     Journeys in Survey Research
Course:       Survey Analysis Workshop (SPSS)
Research:   Subjective Social Indicators (Quality of Life)

-----Original Message-----
From: SPSSX(r) Discussion <[hidden email]> On Behalf Of SUBSCRIBE SPSSX-JohnF
Sent: 02 July 2018 16:44
To: [hidden email]
Subject: SPSS Date Function "Years" versus "Months"

So I am generating age related data on a recurring basis, primarily on an annual basis and sometimes more frequently and entails "Mean" and "Median" ages.  Historically, I have calculated age in fractional amounts......e.g., using the SPSS datediff function using "months" and dividing by 12 for the fractional component as I believe a median of 6.8 years is a relevant comparison to a subsequent year's 6.1 years.  I have colleagues who believe the SPSS datediff function using "years" is adequate.  I suppose they believe the mean age will result in a fractional component and yield or present a meaningful change in age if it occurs.  Any thoughts would be appreciated.

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Date Function "Years" versus "Months"

Jon Peck
I designed DATEDIFF and DATESUM.

DATEDIFF calculates the difference between two dates truncating any fractional part, so, for example, a unit of "years" returns a whole number of years.  Think of it as the answer to "are you old enough to drink".  The reason for the truncation is that the fractional part would be ambiguous, because years and months vary in length, so what exactly does .5 years mean?

You can use "days" to get an exact difference, which will also have no fractional part assuming there is no time component.

On Mon, Jul 2, 2018 at 8:49 AM John F Hall <[hidden email]> wrote:
Any calculation based on age last birthday needs to add 0.5 years.

John F Hall  MA (Cantab) Dip Ed (Dunelm)
[Retired academic survey researcher]

Email:          [hidden email]
Website:     Journeys in Survey Research
Course:       Survey Analysis Workshop (SPSS)
Research:   Subjective Social Indicators (Quality of Life)

-----Original Message-----
From: SPSSX(r) Discussion <[hidden email]> On Behalf Of SUBSCRIBE SPSSX-JohnF
Sent: 02 July 2018 16:44
To: [hidden email]
Subject: SPSS Date Function "Years" versus "Months"

So I am generating age related data on a recurring basis, primarily on an annual basis and sometimes more frequently and entails "Mean" and "Median" ages.  Historically, I have calculated age in fractional amounts......e.g., using the SPSS datediff function using "months" and dividing by 12 for the fractional component as I believe a median of 6.8 years is a relevant comparison to a subsequent year's 6.1 years.  I have colleagues who believe the SPSS datediff function using "years" is adequate.  I suppose they believe the mean age will result in a fractional component and yield or present a meaningful change in age if it occurs.  Any thoughts would be appreciated.

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Date Function "Years" versus "Months"

John F Hall

I think we're at cross-purposes here.  Many surveys collect age last birthday: age 59 can be anywhere between 59 and 60 minus one day. A common error is to calculate the mean, and assume it is accurate, but it is more accurate to add 0.5.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jon Peck
Sent: 02 July 2018 18:20
To: [hidden email]
Subject: Re: SPSS Date Function "Years" versus "Months"

 

I designed DATEDIFF and DATESUM.

 

DATEDIFF calculates the difference between two dates truncating any fractional part, so, for example, a unit of "years" returns a whole number of years.  Think of it as the answer to "are you old enough to drink".  The reason for the truncation is that the fractional part would be ambiguous, because years and months vary in length, so what exactly does .5 years mean?

 

You can use "days" to get an exact difference, which will also have no fractional part assuming there is no time component.

 

On Mon, Jul 2, 2018 at 8:49 AM John F Hall <[hidden email]> wrote:

Any calculation based on age last birthday needs to add 0.5 years.

John F Hall  MA (Cantab) Dip Ed (Dunelm)
[Retired academic survey researcher]

Email:          [hidden email]
Website:     Journeys in Survey Research
Course:       Survey Analysis Workshop (SPSS)
Research:   Subjective Social Indicators (Quality of Life)

-----Original Message-----
From: SPSSX(r) Discussion <[hidden email]> On Behalf Of SUBSCRIBE SPSSX-JohnF
Sent: 02 July 2018 16:44
To: [hidden email]
Subject: SPSS Date Function "Years" versus "Months"

So I am generating age related data on a recurring basis, primarily on an annual basis and sometimes more frequently and entails "Mean" and "Median" ages.  Historically, I have calculated age in fractional amounts......e.g., using the SPSS datediff function using "months" and dividing by 12 for the fractional component as I believe a median of 6.8 years is a relevant comparison to a subsequent year's 6.1 years.  I have colleagues who believe the SPSS datediff function using "years" is adequate.  I suppose they believe the mean age will result in a fractional component and yield or present a meaningful change in age if it occurs.  Any thoughts would be appreciated.

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


 

--

Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Date Function "Years" versus "Months"

Art Kendall
Over the years there have been many discussions on this list. (archives
before some year in the 90s are lost.)

In many circumstances if one has control over the data gathering, it is
better to ask data of birth.  Except for children, there is often less
retrieval time to answer date of birth than there is to answer age.

Many of us have to first recall what year it is now and then count on our
fingers.



-----
Art Kendall
Social Research Consultants
--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Date Function "Years" versus "Months"

SUBSCRIBE SPSSX-JohnF
In reply to this post by SUBSCRIBE SPSSX-JohnF
Perhaps I got this wrong, but if you are describing a finite group, e.g., in a rural county, juveniles who experience court and their median age is 12.75 in year 1 and the median of those experiencing court in year 2 is 12.50 and year 3 the age decreases again to 12.25 and finally in year 4 the median is 12.0.  One could surmise that it is likely those experiencing court appear to be getting younger opposed to whole ages of 12.0 every year which presents no change.  If nothing else the fractional ages present that there is some age change related to those juveniles experiencing court.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Date Function "Years" versus "Months"

Ki Park
Sometimes, I use the function 'round' or 'truncate' to get the integer of
age.

compute round_age = rnd(age).
exe.

compute trunc_age = trunc(age).
exe.

You can round or truncate in different ways like closest integer or closes
quarter, etc. The variable 'age' could be a computed value of your data.

I like the explanation of
https://www.spss-tutorials.com/spss-main-numeric-functions/

Ki



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD