## Summarizing years working

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

0101
Posts: 52
Joined: Fri Mar 04, 2011 9:42 pm

### Summarizing years working

I have data on how many years and months people have worked in their current position.

A person who has worked for 7 months has WorkYears = 0 and WorkMonths = 7.
A person who has worked for 20 years and 7 months has WorkYears = 20 and WorkMonths = 7.
etc.

I would like to calculate descriptive stats (mean, median, and min and max) for time worked, with meaningful values like .7 = 7 month, 20.7 = 20 yrs, 7 months, etc.

What's the best way to combine the month and year variables to arrive at total time worked?

This is what I've done:

Code: Select all

``````* Convert WorkYears to months.
COMPUTE WorkYearsInMonths=WorkYears*12.
* Calculate total time worked, in months (sum the original month variable and the new one).
COMPUTE WorkMonths_Total = sum (WorkYearsInMonths, WorkMonths).
* Divide by 12.
COMPUTE WorkFinal=WorkMonths_Total/12.
EXECUTE.``````
But this means a person who has worked 7 months has a WorkFinal = .58 (i.e., 7/12).
And a person who has worked 20 years and 7 months has a WorkFinal = 20.58 (i.e., 240 + 7 = 247/12).

Any suggestions?
0101
Posts: 52
Joined: Fri Mar 04, 2011 9:42 pm

Anyone?

### Who is online

Users browsing this forum: No registered users and 1 guest