## Download of ATUS files using the lodown library

atus_cat = get_catalog("atus",output_dir = file.path(path.expand( "~" ) , "ATUS" ))
atus_cat = subset(atus_cat,directory == 2016)
atus_cat = lodown("atus",atus_cat)
## Load libraries

library(lodown)
library(psych)

## Data load 
## Parsing to read ATUS files 

atusact <- readRDS( file.path( path.expand( "~" ) , "ATUS" , "2016/atusact.rds" ) )
atusact <- atusact[ c( 'tucaseid' , 'tutier1code' , 'tutier2code' , 'tuactdur24' ) ]

atusresp <- readRDS( file.path( path.expand( "~" ) , "ATUS" , "2016/atusresp.rds" ) )
atusresp <- atusresp[ c( 'tucaseid' , 'telfs' , 'tulineno' ) ]

atusrost <- readRDS( file.path( path.expand( "~" ) , "ATUS" , "2016/atusrost.rds" ) )
atusrost <- atusrost[ , c( 'tucaseid' , 'tulineno' , 'teage' , 'tesex' ) ]

atuswgts <- readRDS( file.path( path.expand( "~" ) , "ATUS" , "2016/atuswgts.rds" ) )
atuswgts <- atuswgts[ , c( 1 , grep( 'finlwgt' , names( atuswgts ) ) ) ]

## Filter into two separate dfs

atusactF = atusact[atusact$tutier1code==5|atusact$tutier1code==12,]
atusact[atusact$tutier1code==5|atusact$tutier1code==12,'tutier1code']=
  atusact[atusact$tutier1code==5|atusact$tutier1code==12,'tutier2code']

agg_table = aggregate(tuactdur24~tucaseid+tutier1code,data = atusactF,sum)

wide_table = reshape(agg_table,idvar = 'tucaseid' , 
                     timevar = 'tutier1code' , direction = 'wide' )

wide_table[is.na(wide_table)] = 0
wide_table[,-1] = wide_table[,-1]/60

#####

merge_table_one_resp = merge(atusresp,wide_table)
merge_table_one_rost = merge(merge_table_one_resp,atusrost)

names(merge_table_one_rost) = gsub("\\.","_",names(merge_table_one_rost))

merge_table_one_rost$Gender = ifelse(merge_table_one_rost$tesex == 1,"male","female")
merge_table_one_rost$Employment_Status = 
  ifelse((merge_table_one_rost$telfs==1)|(merge_table_one_rost$telfs==2),"Employed",
         ifelse((merge_table_one_rost$telfs==3)|(merge_table_one_rost$telfs==4),"Unemployed","Out of Work Force"))

Research Question

Does working more than average affect your work life balance?

For the purpose of the project proposal, it is prudent to examine the general time spent on leisure relative to general hours worked to formulate a high level perspective on the most basic interpretation of “work life balance.” My intention for the final project is to expand the definition of “work life balance” to include all time spent outside of work and to examine key areas of interest at the 3rd tier level, or most detailed level according to the ATUS Lexicon. (i.e. religious activities, chores, communication, time spent alone; all of the aforementioned data points are provided in the ATUS data set)

Sampling

Given that the survey is a random sample of the population it would be prudent to create multiple strata to analyze homogenous data points without a strong skew.

Cases

Each case represents a household in the U.S. There are 10493 cases in the primary dataset (atusresp file).

Data Collection

Data collection is sponsored by the Bureau of Labor Statistics as part of the American Time Use Survey (ATUS) and is conducted by the U.S Census Bureau. “In ATUS, individuals are randomly selected from a subset of households that have completed their eighth and final month of interviews for the Current Population Survey(CPS). ATUS respondents are interviewed only one time about how they spent their time on the previous day, where they were, and whom they were with.” - Quoted from the ATUS User Guide

Type of Study

This is an observational study.

Data Source

Data is collected by the U.S Census Bureau and is available online at two sources, http://asdfree.com/american-time-use-survey-atus.html and https://www.bls.gov/tus/datafiles_2016.htm. In order to collect this data in an efficient and reproducible manner I utilized the lodown library to download the files.

(June 2018). American Time Use Survey User’s Guide. https://www.bls.gov/tus/atususersguide.pdf#page=33 (2003-2017). The American Time Use Survey (ATUS) is sponsored by the Bureau of Labor Statistics and conducted by the U.S. Census Bureau. Retrieved October 30th, 2018 from https://www.bls.gov/tus/datafiles_2016.htm

Response

The response variable is time dedicated to leisure and it is numerical.

Explanatory Variable

The explanatory variable is hours worked per day and it is numerical.

Relevant Summary Statistics

describe(merge_table_one_rost$tuactdur24_5)
describe(merge_table_one_rost$tuactdur24_12)
describe(merge_table_one_rost$teage)
table(merge_table_one_rost$Gender,useNA = "ifany")
## 
## female   male 
##   5701   4614
table(merge_table_one_rost$Employment_Status,useNA = "ifany")
## 
##          Employed Out of Work Force        Unemployed 
##              6282              3699               334
prop.table(table(merge_table_one_rost$Employment_Status,useNA = "ifany"))*100
## 
##          Employed Out of Work Force        Unemployed 
##         60.901600         35.860397          3.238003
## Description of general work hours by employment status
## Tier One Code of 5 composes the general working hours according to the Lexicon

describeBy(merge_table_one_rost$tuactdur24_5,group = 
             merge_table_one_rost$Employment_Status, mat = TRUE)
## Description of general work hours by employment status 
## Tier One Code of 12 composes the general leisure hours according to the Lexicon

describeBy(merge_table_one_rost$tuactdur24_12,group = 
             merge_table_one_rost$Employment_Status, mat = TRUE)
## Description of general work hours by age

describeBy(merge_table_one_rost$tuactdur24_5,group = merge_table_one_rost$teage, mat = TRUE)
## Description of general leisure hours by age

describeBy(merge_table_one_rost$tuactdur24_12,group = merge_table_one_rost$teage, mat = TRUE)
## Description of general work hours by gender

describeBy(merge_table_one_rost$tuactdur24_5,group = merge_table_one_rost$Gender, mat = TRUE)
## Description of general leisure hours by gender

describeBy(merge_table_one_rost$tuactdur24_12,group = merge_table_one_rost$Gender, mat = TRUE)
## Histograms

hist(merge_table_one_rost$tuactdur24_5)

hist(merge_table_one_rost$tuactdur24_12)

Appendix

Condensed estimates for activity by average hours per day from the 2016 survey can be found at https://www.bls.gov/tus/a1_2016.pdf