TAS Descriptive statistics

We will be going through

Step 1: Loading Packages

library(tidyverse)
library(readxl)
library(ggplot2)
library (reshape2)
library(writexl)
library (lmerTest)
library(lme4)

Step 2: Import the data

TAS_data_long_format_age <- read_excel("TAS_data_long_format_age.xlsx")

Step 3: Preview the data

view(TAS_data_long_format_age)
head(TAS_data_long_format_age)
## # A tibble: 6 × 42
##     TAS TAS05 TAS09 TAS15 `1968 Interview Number` `Person Number` Gender
##   <dbl> <dbl> <dbl> <dbl>                   <dbl>           <dbl>  <dbl>
## 1     2     1     1    NA                       4             180      2
## 2     2     1     1    NA                       5              32      2
## 3     2     1     1    NA                       6              34      1
## 4     2     1     1    NA                      14              30      1
## 5     1     1    NA    NA                      18              38      2
## 6     2     1     1    NA                      47              34      2
## # ℹ 35 more variables: `Individual is sample` <dbl>, `Year ID Number` <dbl>,
## #   `Sequence Number` <dbl>, `Relationship to Head` <dbl>,
## #   `Release Number` <dbl>, B5A <dbl>, B5D <dbl>, B6C <dbl>, C2D <dbl>,
## #   C2E <dbl>, C2F <dbl>, D2D3_month <dbl>, D2D3_year <dbl>,
## #   E1_1st_mention <dbl>, E1_2nd_mention <dbl>, E1_3rd_mention <dbl>, E3 <dbl>,
## #   G1 <dbl>, G2_month <dbl>, G2_year <dbl>, G10 <dbl>, G11 <dbl>, G30A <dbl>,
## #   G41A <dbl>, G41B <dbl>, G41C <dbl>, G41H <dbl>, G41P <dbl>, H1 <dbl>, …

2005 & 2009

Step 5: Regression (2005 & 2009)

Filter the data (2005 & 2009)

ids_to_remove_05_09 <- c("656_31" , "2516_31", "672_172", "1168_35", "2047_30", "2526_33", "2672_30", "3197_5")
Long_format_2005_2009 <-  TAS_data_long_format_age %>% filter(TAS05 == 1 & TAS09 ==1) %>% filter(Age_18_graduate< 50) %>% unite("TAS_ID", c("1968 Interview Number", "Person Number")) %>% mutate(year_new = case_when(year == 2005 ~ -1, year == 2009 ~ 0,year == 2015 ~ 1)) %>% add_count(TAS_ID, name = "TAS_ID_count") %>% filter(TAS_ID_count == 2) %>% filter(!TAS_ID %in% ids_to_remove_05_09)
knitr::kable(head(Long_format_2005_2009[, 1:43]))
TAS TAS05 TAS09 TAS15 TAS_ID Gender Individual is sample Year ID Number Sequence Number Relationship to Head Release Number B5A B5D B6C C2D C2E C2F D2D3_month D2D3_year E1_1st_mention E1_2nd_mention E1_3rd_mention E3 G1 G2_month G2_year G10 G11 G30A G41A G41B G41C G41H G41P H1 L7_1st_mention L7_2nd_mention L7_3rd_mention Age_17_graduate Age_18_graduate year year_new TAS_ID_count
2 1 1 NA 5_32 2 2 624 3 30 5 5 5 5 7 7 7 0 0 1 7 0 0 1 5 2002 1 1 7 7 6 6 7 5 2 1 0 0 20 21 2005 -1 2
2 1 1 NA 6_34 1 2 1202 51 30 5 2 2 6 1 1 1 0 0 7 0 0 5 1 5 2002 1 1 0 7 5 7 5 3 1 1 0 0 20 21 2005 -1 2
2 1 1 NA 14_30 1 2 736 51 30 5 4 4 4 2 1 1 0 0 2 0 0 0 1 6 2003 1 5 6 5 6 6 5 5 2 1 0 0 19 20 2005 -1 2
2 1 1 NA 47_34 2 2 2516 3 30 5 4 5 6 4 5 2 0 0 1 0 0 0 1 5 2005 5 0 6 3 6 4 7 4 1 1 0 0 17 18 2005 -1 2
2 1 1 NA 53_35 2 2 1392 3 33 5 4 5 5 3 1 1 0 0 1 0 0 0 1 6 2002 1 1 7 6 7 7 7 5 1 1 0 0 20 21 2005 -1 2
2 1 1 NA 53_36 2 2 1616 3 30 5 4 5 7 4 1 1 0 0 6 0 0 1 1 6 2005 1 5 7 7 7 5 7 6 2 1 0 0 17 18 2005 -1 2
testing <- Long_format_2005_2009 %>% mutate(Age_18_graduate_new = ifelse(year == 2005, Age_18_graduate + 4, Age_18_graduate))
comparison_data <- testing %>% filter(year %in% c(2005, 2009)) %>% group_by(TAS_ID) %>% filter(n_distinct(year) == 2) %>% mutate(age_difference = ifelse(year == 2009, Age_18_graduate - Age_18_graduate_new[year == 2005], 0)) %>% ungroup() 
Long_format_2005_2009_new <- comparison_data %>% filter(age_difference == 0)
view(Long_format_2005_2009)

Age count - 2005

Long_format_2005_2009 %>% filter(year == 2005) %>% count(Age_18_graduate)
## # A tibble: 5 × 2
##   Age_18_graduate     n
##             <dbl> <int>
## 1              18   158
## 2              19   144
## 3              20   138
## 4              21    74
## 5              22     1

Age count - 2009

Long_format_2005_2009 %>% filter(year == 2009) %>% count(Age_18_graduate)
## # A tibble: 6 × 2
##   Age_18_graduate     n
##             <dbl> <int>
## 1              22   156
## 2              23   142
## 3              24   137
## 4              25    77
## 5              26     2
## 6              27     1

B5A: Responsibility for self

B5A_Regression_05_09 <- (lmer(B5A ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009))
B5A_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: B5A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 3044.666
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.5721  
##  Residual             0.9114  
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  1.66590                   0.11385                   2.24869  
## Age_18_graduate:year_new  
##                 -0.09734
summary(B5A_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: B5A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 3044.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.2819 -0.4738  0.1861  0.5566  1.8311 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.3273   0.5721  
##  Residual             0.8307   0.9114  
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)   
## (Intercept)                1.66590    1.02713 961.78726   1.622  0.10515   
## Age_18_graduate            0.11385    0.04407 961.81142   2.583  0.00993 **
## year_new                   2.24869    1.14724 531.14171   1.960  0.05051 . 
## Age_18_graduate:year_new  -0.09734    0.05361 518.99049  -1.816  0.07001 . 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.685 -0.685       
## Ag_18_grd:_ -0.588  0.589 -0.991
Long_format_2005_2009$predicted_B5A <- predict(B5A_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_B5A <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = B5A, color = year_factor_B5A)) + geom_point(aes(shape = year_factor_B5A), alpha = 0.5) + geom_line(aes(y = predicted_B5A), size = 1) +  labs(title = "Responsibility for Self (B5A) by Age and Year",x = "Age", y = "Responsibility for Self (B5A)", color = "Year", shape = "Year") + theme_minimal()
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

B5D: Managing own money

B5D_Regression_05_09 <- lmer(B5D ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
B5D_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: B5D ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 2482.523
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.3138  
##  Residual             0.7425  
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  4.44118                   0.01216                   1.40866  
## Age_18_graduate:year_new  
##                 -0.05755
summary(B5D_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: B5D ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 2482.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.4659 -0.3877  0.2144  0.6232  1.4116 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.09847  0.3138  
##  Residual             0.55124  0.7425  
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)                 4.44118    0.77033 1006.48090   5.765 1.08e-08 ***
## Age_18_graduate             0.01216    0.03305 1006.48810   0.368    0.713    
## year_new                    1.40866    0.93240  530.14313   1.511    0.131    
## Age_18_graduate:year_new   -0.05755    0.04363  520.81411  -1.319    0.188    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.722 -0.722       
## Ag_18_grd:_ -0.642  0.642 -0.993
Long_format_2005_2009$predicted_B5D <- predict(B5D_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_B5D <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = B5D, color = factor(year_factor_B5D))) + geom_point(aes(shape = year_factor_B5D), alpha = 0.5) + geom_line(aes(y = predicted_B5D), size = 1) +  labs(title = "Responsibility for Others (B5D) by Age and Year", x = "Age",y = "Managing own money (B5D)", color = "Year", shape = "Year") + theme_minimal()

B6C: Money management skills

B6C_Regression_05_09 <- lmer(B6C ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
B6C_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: B6C ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 3391.09
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.9231  
##  Residual             0.9606  
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  6.01603                  -0.02671                  -1.63186  
## Age_18_graduate:year_new  
##                  0.09538
summary(B6C_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: B6C ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 3391.1
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -3.09254 -0.50969  0.05855  0.55934  2.40143 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.8521   0.9231  
##  Residual             0.9227   0.9606  
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                6.01603    1.26627 865.18646   4.751 2.37e-06 ***
## Age_18_graduate           -0.02671    0.05433 865.25272  -0.492   0.6231    
## year_new                  -1.63186    1.21459 535.87436  -1.344   0.1797    
## Age_18_graduate:year_new   0.09538    0.05657 517.00541   1.686   0.0924 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.627 -0.627       
## Ag_18_grd:_ -0.498  0.498 -0.986
Long_format_2005_2009$predicted_B6C <- predict(B6C_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_B6C <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = B6C, color = factor(year_factor_B6C))) + geom_point(aes(shape = year_factor_B6C), alpha = 0.5) + geom_line(aes(y = predicted_B6C), size = 1) +  labs(title = "Money management skills (B6C) by Age and Year", x = "Age",y = "Money Management skills (B6C)", color = "Year", shape = "Year") + theme_minimal()

C2D: Worry about expenses

C2D_Regression_05_09 <- lmer(C2D ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
C2D_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: C2D ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 4144.878
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 1.036   
##  Residual             1.531   
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                   7.2042                   -0.1422                    3.5872  
## Age_18_graduate:year_new  
##                  -0.1431
summary(C2D_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: C2D ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 4144.9
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.05352 -0.67428 -0.03819  0.66087  2.15265 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 1.073    1.036   
##  Residual             2.345    1.531   
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                7.20420    1.76404 948.21934   4.084  4.8e-05 ***
## Age_18_graduate           -0.14222    0.07569 948.24886  -1.879   0.0606 .  
## year_new                   3.58723    1.92893 531.64194   1.860   0.0635 .  
## Age_18_graduate:year_new  -0.14315    0.09010 518.66847  -1.589   0.1127    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.676 -0.676       
## Ag_18_grd:_ -0.575  0.576 -0.990
Long_format_2005_2009$predicted_C2D <- predict(C2D_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_C2D <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = C2D, color = factor(year_factor_C2D))) + geom_point(aes(shape = year_factor_C2D), alpha = 0.5) + geom_line(aes(y = predicted_C2D), size = 1) +  labs(title = "Worry about expenses (C2D) by Age and Year", x = "Age",y = "Worry about expenses (C2D)", color = "Year", shape = "Year") + theme_minimal()

C2E: Worry about future job

C2E_Regression_05_09 <- lmer(C2E ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
C2E_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: C2E ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 4168.965
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 1.138   
##  Residual             1.507   
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                   6.8657                   -0.1364                    3.2851  
## Age_18_graduate:year_new  
##                  -0.1322
summary(C2E_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: C2E ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 4169
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.94644 -0.68646 -0.06599  0.68139  2.18580 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 1.295    1.138   
##  Residual             2.271    1.507   
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                6.86567    1.80024 925.16971   3.814 0.000146 ***
## Age_18_graduate           -0.13643    0.07724 925.20861  -1.766 0.077676 .  
## year_new                   3.28513    1.90012 532.54458   1.729 0.084406 .  
## Age_18_graduate:year_new  -0.13220    0.08870 518.12430  -1.490 0.136706    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.662 -0.661       
## Ag_18_grd:_ -0.553  0.554 -0.989
Long_format_2005_2009$predicted_C2E <- predict(C2E_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_C2E <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = C2E, color = factor(year_factor_C2E))) + geom_point(aes(shape = year_factor_C2E), alpha = 0.5) + geom_line(aes(y = predicted_C2E), size = 1) +  labs(title = "Worry about future job (C2E) by Age and Year", x = "Age",y = "Worry about future job (C2E)", color = "Year", shape = "Year") + theme_minimal()

C2F: Discouraged about future

C2F_Regression_05_09 <- lmer(C2F ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
C2F_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: C2F ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 3930.281
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 1.048   
##  Residual             1.325   
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  5.43407                  -0.09738                   2.61108  
## Age_18_graduate:year_new  
##                 -0.10546
summary(C2F_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: C2F ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 3930.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0405 -0.6416 -0.1266  0.5595  2.6536 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 1.099    1.048   
##  Residual             1.755    1.325   
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                5.43407    1.60951 914.34658   3.376 0.000766 ***
## Age_18_graduate           -0.09738    0.06906 914.39005  -1.410 0.158862    
## year_new                   2.61108    1.67087 532.97268   1.563 0.118715    
## Age_18_graduate:year_new  -0.10546    0.07797 517.83867  -1.353 0.176758    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.656 -0.655       
## Ag_18_grd:_ -0.543  0.544 -0.989
Long_format_2005_2009$predicted_C2F <- predict(C2F_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_C2F <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = C2F, color = factor(year_factor_C2F))) + geom_point(aes(shape = year_factor_C2F), alpha = 0.5) + geom_line(aes(y = predicted_C2F), size = 1) +  labs(title = "Discouraged about future (C2F) by Age and Year", x = "Age",y = "Discouraged about future (C2F)", color = "Year", shape = "Year") + theme_minimal()

E3: Work for money

E3_Regression_05_09 <- lmer(E3 ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
E3_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: E3 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 4526.603
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.7878  
##  Residual             2.0320  
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                   3.8885                   -0.1180                   -2.4061  
## Age_18_graduate:year_new  
##                   0.1157
summary(E3_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: E3 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 4526.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.1202 -0.6522 -0.4059  1.1511  3.0815 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.6206   0.7878  
##  Residual             4.1290   2.0320  
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)                 3.88846    2.08302 1011.40856   1.867   0.0622 .
## Age_18_graduate            -0.11798    0.08938 1011.41393  -1.320   0.1871  
## year_new                   -2.40609    2.55094  530.13546  -0.943   0.3460  
## Age_18_graduate:year_new    0.11565    0.11940  521.18160   0.969   0.3332  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.728 -0.727       
## Ag_18_grd:_ -0.650  0.650 -0.993
Long_format_2005_2009$predicted_E3 <- predict(E3_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_E3 <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = E3, color = factor(year_factor_E3))) + geom_point(aes(shape = year_factor_E3), alpha = 0.5) + geom_line(aes(y = predicted_E3), size = 1) +  labs(title = "Work for money (E3) by Age and Year", x = "Age",y = "Work for money (E3)", color = "Year", shape = "Year") + theme_minimal()

G10: Attended college

G10_Regression_05_09 <- lmer(G10 ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
G10_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G10 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 3571.999
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 1.2035  
##  Residual             0.9522  
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  2.42092                  -0.03434                  -4.14838  
## Age_18_graduate:year_new  
##                  0.21255
summary(G10_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G10 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 3572
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.2583 -0.3188 -0.1355  0.0173  4.8833 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 1.4483   1.2035  
##  Residual             0.9067   0.9522  
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                2.42092    1.44992 795.48040   1.670 0.095374 .  
## Age_18_graduate           -0.03434    0.06221 795.59128  -0.552 0.581069    
## year_new                  -4.14838    1.20985 542.94897  -3.429 0.000652 ***
## Age_18_graduate:year_new   0.21255    0.05611 515.95251   3.788 0.000170 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.587 -0.587       
## Ag_18_grd:_ -0.425  0.425 -0.981
Long_format_2005_2009$predicted_G10 <- predict(G10_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_G10 <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = G10, color = factor(year_factor_G10))) + geom_point(aes(shape = year_factor_G10), alpha = 0.5) + geom_line(aes(y = predicted_G10), size = 1) +  labs(title = "Attended college (G10) by Age and Year", x = "Age",y = "Attended college (G10)", color = "Year", shape = "Year") + theme_minimal()

G11: Attending college

G11_Regression_05_09 <- lmer(G11 ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
G11_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G11 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 4187.066
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.652   
##  Residual             1.727   
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  -0.8742                    0.1656                    3.8530  
## Age_18_graduate:year_new  
##                  -0.1480
summary(G11_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G11 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 4187.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8823 -0.7252 -0.2515  1.0132  2.2792 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.4251   0.652   
##  Residual             2.9837   1.727   
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)                -0.87418    1.76473 1012.68931  -0.495   0.6205  
## Age_18_graduate             0.16557    0.07572 1012.69421   2.187   0.0290 *
## year_new                    3.85301    2.16826  530.10042   1.777   0.0761 .
## Age_18_graduate:year_new   -0.14801    0.10149  521.25057  -1.458   0.1453  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.730 -0.729       
## Ag_18_grd:_ -0.652  0.653 -0.993
Long_format_2005_2009$predicted_G11 <- predict(G11_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_G11 <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = G11, color = factor(year_factor_G11))) + geom_point(aes(shape = year_factor_G11), alpha = 0.5) + geom_line(aes(y = predicted_G11), size = 1) +  labs(title = "Attending college (G11) by Age and Year", x = "Age",y = "Attending college (G11)", color = "Year", shape = "Year") + theme_minimal()

G30A: Likelihood of well-paying job

G30A_Regression_05_09 <- lmer(G30A ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
G30A_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G30A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 3950.965
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.4703  
##  Residual             1.5731  
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  5.35813                   0.02315                  -1.15446  
## Age_18_graduate:year_new  
##                  0.08033
summary(G30A_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G30A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 3951
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.2759 -0.2934  0.2836  0.6042  1.1950 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.2212   0.4703  
##  Residual             2.4748   1.5731  
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)                 5.35813    1.56970 1020.18601   3.413 0.000667 ***
## Age_18_graduate             0.02315    0.06735 1020.18815   0.344 0.731130    
## year_new                   -1.15446    1.97333  530.09541  -0.585 0.558774    
## Age_18_graduate:year_new    0.08033    0.09240  521.95151   0.869 0.385054    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.741 -0.741       
## Ag_18_grd:_ -0.668  0.669 -0.994
Long_format_2005_2009$predicted_G30A <- predict(G30A_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_G30A <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = G30A, color = factor(year_factor_G30A))) + geom_point(aes(shape = year_factor_G30A), alpha = 0.5) + geom_line(aes(y = predicted_G30A), size = 1) +  labs(title = "Likelihood of well-paying job (G30A) by Age and Year", x = "Age",y = "Likelihood of well-paying job (G30A)", color = "Year", shape = "Year") + theme_minimal()

G41A: Importance of job status

G41A_Regression_05_09 <- lmer(G41A ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
G41A_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G41A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 3919.711
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 1.254   
##  Residual             1.213   
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  7.04478                  -0.10568                   1.17726  
## Age_18_graduate:year_new  
##                 -0.07101
summary(G41A_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G41A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 3919.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.51544 -0.49192  0.08004  0.58992  2.24588 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 1.573    1.254   
##  Residual             1.471    1.213   
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                7.04478    1.65629 845.65850   4.253 2.34e-05 ***
## Age_18_graduate           -0.10568    0.07106 845.73516  -1.487    0.137    
## year_new                   1.17726    1.53532 537.08503   0.767    0.444    
## Age_18_graduate:year_new  -0.07101    0.07144 516.41723  -0.994    0.321    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.616 -0.616       
## Ag_18_grd:_ -0.479  0.479 -0.985
Long_format_2005_2009$predicted_G41A <- predict(G41A_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_G41A <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = G41A, color = factor(year_factor_G41A))) + geom_point(aes(shape = year_factor_G41A), alpha = 0.5) + geom_line(aes(y = predicted_G41A), size = 1) +  labs(title = "Importance of job status (G41A) by Age and Year", x = "Age",y = "Importance of job status (G41A)", color = "Year", shape = "Year") + theme_minimal()

G41B: Importance of decision-making

G41B_Regression_05_09 <- lmer(G41B ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
G41B_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G41B ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 3203.244
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.6522  
##  Residual             0.9691  
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  6.76995                  -0.04942                   1.83844  
## Age_18_graduate:year_new  
##                 -0.09059
summary(G41B_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G41B ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 3203.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.0434 -0.5194  0.1352  0.6767  2.2311 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.4253   0.6522  
##  Residual             0.9391   0.9691  
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                6.76995    1.11446 949.21255   6.075  1.8e-09 ***
## Age_18_graduate           -0.04942    0.04782 949.24167  -1.033    0.302    
## year_new                   1.83844    1.22050 531.61437   1.506    0.133    
## Age_18_graduate:year_new  -0.09059    0.05701 518.70145  -1.589    0.113    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.677 -0.676       
## Ag_18_grd:_ -0.576  0.577 -0.990
Long_format_2005_2009$predicted_G41A <- predict(G41A_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_G41A <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = G41A, color = factor(year_factor_G41A))) + geom_point(aes(shape = year_factor_G41A), alpha = 0.5) + geom_line(aes(y = predicted_G41A), size = 1) +  labs(title = "Importance of decision-making (G41A) by Age and Year", x = "Age",y = "Importance of decision-making (G41A)", color = "Year", shape = "Year") + theme_minimal()

G41C: Importance of challending work

G41C_Regression_05_09 <- lmer(G41C ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
G41C_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G41C ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 3174.302
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.7018  
##  Residual             0.9277  
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  6.04100                  -0.01944                   1.28671  
## Age_18_graduate:year_new  
##                 -0.05893
summary(G41C_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G41C ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 3174.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.7996 -0.5155  0.0239  0.6544  2.1193 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.4925   0.7018  
##  Residual             0.8607   0.9277  
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                6.04100    1.10888 924.76945   5.448 6.54e-08 ***
## Age_18_graduate           -0.01944    0.04758 924.80852  -0.409    0.683    
## year_new                   1.28671    1.16969 532.55863   1.100    0.272    
## Age_18_graduate:year_new  -0.05893    0.05460 518.11246  -1.079    0.281    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.662 -0.661       
## Ag_18_grd:_ -0.553  0.553 -0.989
Long_format_2005_2009$predicted_G41C <- predict(G41C_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_G41C <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = G41C, color = factor(year_factor_G41C))) + geom_point(aes(shape = year_factor_G41C), alpha = 0.5) + geom_line(aes(y = predicted_G41C), size = 1) +  labs(title = "Importance of challenging work (G41C) by Age and Year", x = "Age",y = "Importance of challenging work (G41C)", color = "Year", shape = "Year") + theme_minimal()

G41H: Importance of healthcare benefits

G41H_Regression_05_09 <- lmer(G41H ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
G41H_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G41H ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 3005.093
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.5851  
##  Residual             0.8831  
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  7.46418                  -0.05113                   1.51063  
## Age_18_graduate:year_new  
##                 -0.07159
summary(G41H_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G41H ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 3005.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.8123 -0.4241  0.3822  0.4934  2.0014 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.3423   0.5851  
##  Residual             0.7799   0.8831  
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                7.46418    1.01082 952.19046   7.384 3.34e-13 ***
## Age_18_graduate           -0.05113    0.04337 952.21840  -1.179    0.239    
## year_new                   1.51063    1.11212 531.51172   1.358    0.175    
## Age_18_graduate:year_new  -0.07159    0.05196 518.78005  -1.378    0.169    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.679 -0.678       
## Ag_18_grd:_ -0.579  0.579 -0.991
Long_format_2005_2009$predicted_G41H <- predict(G41H_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_G41H <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = G41H, color = factor(year_factor_G41H))) + geom_point(aes(shape = year_factor_G41H), alpha = 0.5) + geom_line(aes(y = predicted_G41H), size = 1) +  labs(title = "Importance of healthcare benefits (G41H) by Age and Year", x = "Age",y = "Importance of healthcare benefits (G41H)", color = "Year", shape = "Year") + theme_minimal()

G41P: Importance of job central to identity

G41P_Regression_05_09 <- lmer(G41P ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
G41P_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G41P ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 3885.689
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.9854  
##  Residual             1.3156  
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                   8.6667                   -0.1837                    3.7573  
## Age_18_graduate:year_new  
##                  -0.1887
summary(G41P_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G41P ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 3885.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.71354 -0.54639  0.08629  0.60167  2.13141 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.9711   0.9854  
##  Residual             1.7307   1.3156  
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                8.66674    1.56701 926.95710   5.531 4.15e-08 ***
## Age_18_graduate           -0.18368    0.06723 926.99526  -2.732  0.00642 ** 
## year_new                   3.75726    1.65853 532.41854   2.265  0.02389 *  
## Age_18_graduate:year_new  -0.18869    0.07742 518.11486  -2.437  0.01514 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.663 -0.663       
## Ag_18_grd:_ -0.555  0.555 -0.990
Long_format_2005_2009$predicted_G41P <- predict(G41P_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_G41P <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = G41P, color = factor(year_factor_G41P))) + geom_point(aes(shape = year_factor_G41P), alpha = 0.5) + geom_line(aes(y = predicted_G41P), size = 1) +  labs(title = "Importance of job central to identity (G41P) by Age and Year", x = "Age",y = "Importance of job central to identity (G41P)", color = "Year", shape = "Year") + theme_minimal()

H1: General Health

H1_Regression_05_09 <- lmer(H1 ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2005_2009)
H1_Regression_05_09
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: H1 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## REML criterion at convergence: 2572.206
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.5770  
##  Residual             0.6656  
## Number of obs: 1030, groups:  TAS_ID, 515
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  1.28369                   0.03819                  -0.42058  
## Age_18_graduate:year_new  
##                  0.01668
summary(H1_Regression_05_09)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: H1 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2005_2009
## 
## REML criterion at convergence: 2572.2
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.07297 -0.64053 -0.05106  0.50366  3.10299 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.3329   0.5770  
##  Residual             0.4430   0.6656  
## Number of obs: 1030, groups:  TAS_ID, 515
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                1.28369    0.83847 891.92235   1.531    0.126
## Age_18_graduate            0.03819    0.03598 891.97574   1.062    0.289
## year_new                  -0.42058    0.84044 534.13397  -0.500    0.617
## Age_18_graduate:year_new   0.01668    0.03919 517.41345   0.426    0.671
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.999              
## year_new     0.643 -0.642       
## Ag_18_grd:_ -0.523  0.523 -0.988
Long_format_2005_2009$predicted_H1 <- predict(H1_Regression_05_09, re.form = NA)
Long_format_2005_2009$year_factor_H1 <- factor(Long_format_2005_2009$year)
ggplot(Long_format_2005_2009, aes(x = Age_18_graduate, y = H1, color = factor(year_factor_H1))) + geom_point(aes(shape = year_factor_H1), alpha = 0.5) + geom_line(aes(y = predicted_H1), size = 1) +  labs(title = "General Health (H1) by Age and Year", x = "Age",y = "General Health (H1)", color = "Year", shape = "Year") + theme_minimal()


2009 & 2015

Step 6: Regression (2009 & 2015)

Filter the data (2009 & 2015)

ids_to_remove_09_15 <- c("1315_34", "5379_32", "565_32", "2109_31", "2921_33", "3211_3","6820_36")
Long_format_2009_2015 <-  TAS_data_long_format_age %>% filter(TAS09 == 1 & TAS15 ==1) %>% filter(Age_18_graduate < 3000) %>% unite("TAS_ID", c("1968 Interview Number", "Person Number")) %>% mutate(year_new = case_when(year == 2005 ~ -1, year == 2009 ~ 0,year == 2015 ~ 1)) %>% add_count(TAS_ID, name = "TAS_ID_count") %>% filter(TAS_ID_count == 2) %>% filter(!TAS_ID %in% ids_to_remove_09_15)
change_error_age <- Long_format_2009_2015 %>% group_by(TAS_ID) %>% mutate(Age_18_graduate = case_when(Age_18_graduate == 2033 ~ Age_18_graduate[year == 2009] + 6, Age_18_graduate == 2027 ~ Age_18_graduate[year == 2015] - 6, TRUE ~ Age_18_graduate)) %>% ungroup() %>% filter(Age_18_graduate < 100)
Long_format_2009_2015_new <-change_error_age %>% group_by(TAS_ID) %>% mutate(age_difference = ifelse(all(c(2009, 2015) %in% year), Age_18_graduate[year == 2015] - Age_18_graduate[year == 2009], NA)) %>% ungroup()
view(Long_format_2009_2015_new)
knitr::kable(head(Long_format_2009_2015_new[, 1:44]))
TAS TAS05 TAS09 TAS15 TAS_ID Gender Individual is sample Year ID Number Sequence Number Relationship to Head Release Number B5A B5D B6C C2D C2E C2F D2D3_month D2D3_year E1_1st_mention E1_2nd_mention E1_3rd_mention E3 G1 G2_month G2_year G10 G11 G30A G41A G41B G41C G41H G41P H1 L7_1st_mention L7_2nd_mention L7_3rd_mention Age_17_graduate Age_18_graduate year year_new TAS_ID_count age_difference
2 NA 1 1 4_39 2 2 13 3 60 3 4 5 4 6 7 5 0 0 1 0 0 0 1 5 2008 1 5 5 6 5 2 7 6 2 1 0 0 18 19 2009 0 2 6
2 NA 1 1 7_40 2 2 3836 2 22 3 2 2 7 7 3 4 0 0 6 0 0 5 1 6 2007 5 0 5 5 2 5 6 5 3 1 0 0 19 20 2009 0 2 6
2 NA 1 1 7_41 1 2 576 2 30 3 3 4 7 4 5 4 0 0 3 0 0 5 1 5 2009 5 0 7 5 6 5 7 5 2 1 0 0 17 18 2009 0 2 6
2 NA 1 1 10_34 2 2 3276 3 30 3 4 5 6 4 1 1 0 0 1 0 0 0 1 6 2008 1 5 7 7 5 4 7 5 2 2 0 0 18 19 2009 0 2 6
2 NA 1 1 14_31 2 2 713 1 10 3 5 5 7 4 4 4 0 0 1 0 0 0 1 6 2005 5 0 6 5 7 6 7 2 4 1 0 0 21 22 2009 0 2 6
2 NA 1 1 22_30 2 2 907 2 30 3 5 1 4 3 1 1 0 0 1 0 0 0 1 5 2006 1 1 7 6 6 6 6 6 1 2 0 0 20 21 2009 0 2 6
Long_format_2009_2015_new %>% filter(year == 2009) %>% count(Age_18_graduate)
## # A tibble: 6 × 2
##   Age_18_graduate     n
##             <dbl> <int>
## 1              15     1
## 2              18   153
## 3              19   132
## 4              20   135
## 5              21    87
## 6              22     2
Long_format_2009_2015_new %>% filter(year == 2015) %>% count(Age_18_graduate)
## # A tibble: 6 × 2
##   Age_18_graduate     n
##             <dbl> <int>
## 1              21     1
## 2              24   153
## 3              25   132
## 4              26   135
## 5              27    87
## 6              28     2

B5A: Responsibility for self

B5A_Regression_09_15 <- lmer(B5A ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
B5A_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: B5A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 3080.791
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.3952  
##  Residual             1.0192  
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                   0.2485                    0.1660                    3.4163  
## Age_18_graduate:year_new  
##                  -0.1325
summary(B5A_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: B5A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 3080.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.2417 -0.5044  0.2942  0.5022  5.0538 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.1562   0.3952  
##  Residual             1.0387   1.0192  
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                0.24851    0.84838 998.92782   0.293 0.769643    
## Age_18_graduate            0.16605    0.04386 998.92782   3.786 0.000162 ***
## year_new                   3.41627    1.30696 531.82584   2.614 0.009205 ** 
## Age_18_graduate:year_new  -0.13251    0.05784 507.99991  -2.291 0.022367 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.538  0.537       
## Ag_18_grd:_  0.658 -0.659 -0.987
Long_format_2009_2015_new$predicted_B5A <- predict(B5A_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_B5A <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = B5A, color = year_factor_B5A)) + geom_point(aes(shape = year_factor_B5A), alpha = 0.5) + geom_line(aes(y = predicted_B5A), size = 1) +  labs(title = "Responsibility for Self (B5A) by Age and Year",x = "Age", y = "Responsibility for Self (B5A)", color = "Year", shape = "Year") + theme_minimal()

#### B5D: Managing own money

B5D_Regression_09_15 <- lmer(B5D ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
B5D_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: B5D ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 2597.364
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.3068  
##  Residual             0.8050  
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                   2.1950                    0.1139                    2.3322  
## Age_18_graduate:year_new  
##                  -0.1055
summary(B5D_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: B5D ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 2597.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.2157 -0.2926  0.2141  0.5456  5.3594 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.09414  0.3068  
##  Residual             0.64798  0.8050  
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)   
## (Intercept)                2.19499    0.66859 999.90890   3.283  0.00106 **
## Age_18_graduate            0.11389    0.03457 999.90890   3.295  0.00102 **
## year_new                   2.33215    1.03218 531.63902   2.259  0.02426 * 
## Age_18_graduate:year_new  -0.10551    0.04568 507.99987  -2.310  0.02131 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.540  0.539       
## Ag_18_grd:_  0.660 -0.661 -0.987
Long_format_2009_2015_new$predicted_B5D <- predict(B5D_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_B5D <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = B5D, color = factor(year_factor_B5D))) + geom_point(aes(shape = year_factor_B5D), alpha = 0.5) + geom_line(aes(y = predicted_B5D), size = 1) +  labs(title = "Responsibility for Others (B5D) by Age and Year", x = "Age",y = "Managing own money (B5D)", color = "Year", shape = "Year") + theme_minimal()

B6C: Money Management Skills

B6C_Regression_09_15 <- lmer(B6C ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
B6C_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: B6C ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 3270.6
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.8448  
##  Residual             0.9395  
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  5.03415                   0.02331                  -0.67400  
## Age_18_graduate:year_new  
##                  0.01762
summary(B6C_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: B6C ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 3270.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.7025 -0.5537  0.1037  0.5922  2.5653 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.7137   0.8448  
##  Residual             0.8827   0.9395  
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                5.03415    0.98062 846.75339   5.134 3.53e-07 ***
## Age_18_graduate            0.02331    0.05070 846.75339   0.460    0.646    
## year_new                  -0.67400    1.21872 555.85654  -0.553    0.580    
## Age_18_graduate:year_new   0.01762    0.05332 507.99993   0.330    0.741    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.333  0.333       
## Ag_18_grd:_  0.525 -0.526 -0.976
Long_format_2009_2015_new$predicted_B6C <- predict(B6C_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_B6C <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = B6C, color = factor(year_factor_B6C))) + geom_point(aes(shape = year_factor_B6C), alpha = 0.5) + geom_line(aes(y = predicted_B6C), size = 1) +  labs(title = "Money management skills (B6C) by Age and Year", x = "Age",y = "Money Management skills (B6C)", color = "Year", shape = "Year") + theme_minimal()

C2D: Worry about expenses

C2D_Regression_09_15 <- lmer(C2D ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
C2D_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: C2D ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 4156.593
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 1.058   
##  Residual             1.573   
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  4.32784                  -0.03099                   3.28991  
## Age_18_graduate:year_new  
##                 -0.13472
summary(C2D_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: C2D ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 4156.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.86947 -0.71075 -0.04325  0.66788  2.19759 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 1.119    1.058   
##  Residual             2.475    1.573   
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)   
## (Intercept)                4.32784    1.47134 926.26952   2.941  0.00335 **
## Age_18_graduate           -0.03099    0.07607 926.26952  -0.407  0.68382   
## year_new                   3.28991    2.02830 542.84889   1.622  0.10538   
## Age_18_graduate:year_new  -0.13472    0.08928 507.99996  -1.509  0.13194   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.430  0.429       
## Ag_18_grd:_  0.586 -0.587 -0.982
Long_format_2009_2015_new$predicted_C2D <- predict(C2D_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_C2D <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = C2D, color = factor(year_factor_C2D))) + geom_point(aes(shape = year_factor_C2D), alpha = 0.5) + geom_line(aes(y = predicted_C2D), size = 1) +  labs(title = "Worry about expenses (C2D) by Age and Year", x = "Age",y = "Worry about expenses (C2D)", color = "Year", shape = "Year") + theme_minimal()

C2E: Worry about future job

C2E_Regression_09_15 <- lmer(C2E ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
C2E_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: C2E ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 4089.805
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 1.174   
##  Residual             1.450   
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  4.60717                  -0.05064                   0.97752  
## Age_18_graduate:year_new  
##                 -0.04490
summary(C2E_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: C2E ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 4089.8
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.04384 -0.66022 -0.09101  0.59767  2.50769 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 1.379    1.174   
##  Residual             2.104    1.450   
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)   
## (Intercept)                4.60717    1.44839 878.31825   3.181  0.00152 **
## Age_18_graduate           -0.05064    0.07489 878.31825  -0.676  0.49911   
## year_new                   0.97752    1.87653 550.27657   0.521  0.60263   
## Age_18_graduate:year_new  -0.04490    0.08231 507.99997  -0.546  0.58564   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.372  0.371       
## Ag_18_grd:_  0.549 -0.550 -0.979
Long_format_2009_2015_new$predicted_C2E <- predict(C2E_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_C2E <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = C2E, color = factor(year_factor_C2E))) + geom_point(aes(shape = year_factor_C2E), alpha = 0.5) + geom_line(aes(y = predicted_C2E), size = 1) +  labs(title = "Worry about future job (C2E) by Age and Year", x = "Age",y = "Worry about future job (C2E)", color = "Year", shape = "Year") + theme_minimal()

C2F: Discouraged about future

C2F_Regression_09_15 <- lmer(C2F ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
C2F_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: C2F ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 3880.697
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 1.101   
##  Residual             1.288   
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  3.77834                  -0.03594                   1.71397  
## Age_18_graduate:year_new  
##                 -0.06834
summary(C2F_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: C2F ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 3880.7
## 
## Scaled residuals: 
##    Min     1Q Median     3Q    Max 
## -1.978 -0.620 -0.159  0.497  2.570 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 1.213    1.101   
##  Residual             1.659    1.288   
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)   
## (Intercept)                3.77834    1.31523 862.27274   2.873  0.00417 **
## Age_18_graduate           -0.03594    0.06800 862.27273  -0.529  0.59726   
## year_new                   1.71397    1.66866 553.02446   1.027  0.30480   
## Age_18_graduate:year_new  -0.06834    0.07310 508.00004  -0.935  0.35028   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.352  0.351       
## Ag_18_grd:_  0.537 -0.537 -0.977
Long_format_2009_2015_new$predicted_C2F <- predict(C2F_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_C2F <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = C2F, color = factor(year_factor_C2F))) + geom_point(aes(shape = year_factor_C2F), alpha = 0.5) + geom_line(aes(y = predicted_C2F), size = 1) +  labs(title = "Discouraged about future (C2F) by Age and Year", x = "Age",y = "Discouraged about future (C2F)", color = "Year", shape = "Year") + theme_minimal()

E3: Work for money

E3_Regression_09_15 <- lmer(E3 ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
E3_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: E3 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 4452.719
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.7646  
##  Residual             2.0060  
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  11.0610                   -0.4656                   -6.1822  
## Age_18_graduate:year_new  
##                   0.3087
summary(E3_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: E3 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 4452.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9954 -0.6227 -0.3117  1.0886  1.9997 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.5845   0.7646  
##  Residual             4.0239   2.0060  
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)               11.06097    1.66610 999.91254   6.639 5.18e-11 ***
## Age_18_graduate           -0.46559    0.08614 999.91254  -5.405 8.11e-08 ***
## year_new                  -6.18217    2.57217 531.63826  -2.403  0.01658 *  
## Age_18_graduate:year_new   0.30869    0.11384 507.99983   2.712  0.00692 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.540  0.539       
## Ag_18_grd:_  0.660 -0.661 -0.987
Long_format_2009_2015_new$predicted_E3 <- predict(E3_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_E3 <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = E3, color = factor(year_factor_E3))) + geom_point(aes(shape = year_factor_E3), alpha = 0.5) + geom_line(aes(y = predicted_E3), size = 1) +  labs(title = "Work for money (E3) by Age and Year", x = "Age",y = "Work for money (E3)", color = "Year", shape = "Year") + theme_minimal()

G10: Attended college

G10_Regression_09_15 <- lmer(G10 ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
G10_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G10 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 3744.484
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 1.439   
##  Residual             1.003   
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                   5.1366                   -0.1627                   -2.9257  
## Age_18_graduate:year_new  
##                   0.1077
summary(G10_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G10 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 3744.5
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.36686 -0.28770 -0.11102 -0.04614  2.93267 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 2.071    1.439   
##  Residual             1.007    1.003   
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                5.13662    1.36150 699.37754   3.773 0.000175 ***
## Age_18_graduate           -0.16274    0.07039 699.37754  -2.312 0.021074 *  
## year_new                  -2.92569    1.32926 600.91936  -2.201 0.028116 *  
## Age_18_graduate:year_new   0.10769    0.05694 508.00012   1.891 0.059153 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.122  0.121       
## Ag_18_grd:_  0.404 -0.404 -0.956
Long_format_2009_2015_new$predicted_G10 <- predict(G10_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_G10 <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = G10, color = factor(year_factor_G10))) + geom_point(aes(shape = year_factor_G10), alpha = 0.5) + geom_line(aes(y = predicted_G10), size = 1) +  labs(title = "Attended college (G10) by Age and Year", x = "Age",y = "Attended college (G10)", color = "Year", shape = "Year") + theme_minimal()

G11: Attending college

G11_Regression_09_15 <- lmer(G11 ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
G11_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G11 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 4086.155
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.8189  
##  Residual             1.6081  
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  -4.1693                    0.2799                    4.4798  
## Age_18_graduate:year_new  
##                  -0.1515
summary(G11_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G11 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 4086.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2601 -0.4800 -0.1032  0.7430  2.4904 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.6705   0.8189  
##  Residual             2.5860   1.6081  
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)               -4.16925    1.40055 974.67650  -2.977 0.002984 ** 
## Age_18_graduate            0.27989    0.07241 974.67650   3.865 0.000118 ***
## year_new                   4.47981    2.06613 535.80994   2.168 0.030582 *  
## Age_18_graduate:year_new  -0.15155    0.09126 508.00001  -1.661 0.097399 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.495  0.494       
## Ag_18_grd:_  0.629 -0.630 -0.985
Long_format_2009_2015_new$predicted_G11 <- predict(G11_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_G11 <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = G11, color = factor(year_factor_G11))) + geom_point(aes(shape = year_factor_G11), alpha = 0.5) + geom_line(aes(y = predicted_G11), size = 1) +  labs(title = "Attending college (G11) by Age and Year", x = "Age",y = "Attending college (G11)", color = "Year", shape = "Year") + theme_minimal()

G30A: Likelihood of well-paying job

G30A_Regression_09_15 <- lmer(G30A ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
G30A_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G30A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 2928.213
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.6287  
##  Residual             0.8356  
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                 5.808168                  0.012067                 -0.171941  
## Age_18_graduate:year_new  
##                 0.002538
summary(G30A_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G30A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 2928.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.7023 -0.5416  0.0197  0.5630  2.4352 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.3952   0.6287  
##  Residual             0.6982   0.8356  
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)                5.808168   0.811544 898.600460   7.157 1.71e-12 ***
## Age_18_graduate            0.012067   0.041959 898.600459   0.288    0.774    
## year_new                  -0.171941   1.079342 547.016659  -0.159    0.873    
## Age_18_graduate:year_new   0.002538   0.047417 508.000104   0.054    0.957    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.396  0.395       
## Ag_18_grd:_  0.564 -0.565 -0.980
Long_format_2009_2015_new$predicted_G30A <- predict(G30A_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_G30A <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = G30A, color = factor(year_factor_G30A))) + geom_point(aes(shape = year_factor_G30A), alpha = 0.5) + geom_line(aes(y = predicted_G30A), size = 1) +  labs(title = "Likelihood of well-paying job (G30A) by Age and Year", x = "Age",y = "Likelihood of well-paying job (G30A)", color = "Year", shape = "Year") + theme_minimal()

G41A: Importance of job status

G41A_Regression_09_15 <- lmer(G41A ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
G41A_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G41A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 3963.687
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 1.306   
##  Residual             1.262   
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  10.0791                   -0.2561                   -4.1094  
## Age_18_graduate:year_new  
##                   0.1972
summary(G41A_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G41A ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 3963.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7577 -0.5103  0.1394  0.5547  2.4062 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 1.707    1.306   
##  Residual             1.594    1.262   
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)               10.07906    1.40998 801.60773   7.148 1.98e-12 ***
## Age_18_graduate           -0.25612    0.07290 801.60773  -3.513 0.000467 ***
## year_new                  -4.10938    1.64490 565.40070  -2.498 0.012764 *  
## Age_18_graduate:year_new   0.19721    0.07164 507.99992   2.753 0.006120 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.277  0.276       
## Ag_18_grd:_  0.491 -0.491 -0.972
Long_format_2009_2015_new$predicted_G41A <- predict(G41A_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_G41A <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = G41A, color = factor(year_factor_G41A))) + geom_point(aes(shape = year_factor_G41A), alpha = 0.5) + geom_line(aes(y = predicted_G41A), size = 1) +  labs(title = "Importance of job status (G41A) by Age and Year", x = "Age",y = "Importance of job status (G41A)", color = "Year", shape = "Year") + theme_minimal()

G41B: Importance of decision-making

G41B_Regression_09_15 <- lmer(G41B ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
G41B_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G41B ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 3296.467
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.8679  
##  Residual             0.9455  
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  7.64953                  -0.09984                  -1.63733  
## Age_18_graduate:year_new  
##                  0.07930
summary(G41B_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G41B ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 3296.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.6607 -0.4440  0.1445  0.6113  2.3327 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.7532   0.8679  
##  Residual             0.8940   0.9455  
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                7.64953    0.99606 840.29978   7.680 4.43e-14 ***
## Age_18_graduate           -0.09984    0.05150 840.29978  -1.939   0.0529 .  
## year_new                  -1.63733    1.22717 557.09282  -1.334   0.1827    
## Age_18_graduate:year_new   0.07930    0.05365 508.00008   1.478   0.1401    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.326  0.325       
## Ag_18_grd:_  0.520 -0.521 -0.975
Long_format_2009_2015_new$predicted_G41A <- predict(G41A_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_G41A <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = G41A, color = factor(year_factor_G41A))) + geom_point(aes(shape = year_factor_G41A), alpha = 0.5) + geom_line(aes(y = predicted_G41A), size = 1) +  labs(title = "Importance of decision-making (G41A) by Age and Year", x = "Age",y = "Importance of decision-making (G41A)", color = "Year", shape = "Year") + theme_minimal()

G41C: Importance of challenging work

G41C_Regression_09_15 <- lmer(G41C ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
## boundary (singular) fit: see help('isSingular')
G41C_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G41C ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 3898.309
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.000   
##  Residual             1.628   
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  6.64091                  -0.05644                  29.44731  
## Age_18_graduate:year_new  
##                 -1.31627  
## optimizer (nloptwrap) convergence code: 0 (OK) ; 0 optimizer warnings; 1 lme4 warnings
summary(G41C_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G41C ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 3898.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.8471 -0.3840 -0.2443  0.5991  3.2133 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.000    0.000   
##  Residual             2.649    1.628   
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)                 6.64091    1.26313 1016.00000   5.258 1.78e-07 ***
## Age_18_graduate            -0.05644    0.06531 1016.00000  -0.864    0.388    
## year_new                   29.44731    2.08154 1016.00000  14.147  < 2e-16 ***
## Age_18_graduate:year_new   -1.31627    0.09236 1016.00000 -14.252  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.607  0.606       
## Ag_18_grd:_  0.706 -0.707 -0.990
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
Long_format_2009_2015_new$predicted_G41C <- predict(G41C_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_G41C <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = G41C, color = factor(year_factor_G41C))) + geom_point(aes(shape = year_factor_G41C), alpha = 0.5) + geom_line(aes(y = predicted_G41C), size = 1) +  labs(title = "Importance of challenging work (G41C) by Age and Year", x = "Age",y = "Importance of challenging work (G41C)", color = "Year", shape = "Year") + theme_minimal()

G41H: Importance of healthcare benefits

G41H_Regression_09_15 <- lmer(G41H ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
G41H_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G41H ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 3270.427
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.6937  
##  Residual             1.0127  
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  7.15402                  -0.04149                   1.33838  
## Age_18_graduate:year_new  
##                 -0.05544
summary(G41H_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G41H ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 3270.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.0083 -0.2572  0.2522  0.5450  1.7022 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.4812   0.6937  
##  Residual             1.0255   1.0127  
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                7.15402    0.95265 921.96165   7.510  1.4e-13 ***
## Age_18_graduate           -0.04149    0.04925 921.96165  -0.842    0.400    
## year_new                   1.33838    1.30589 543.48217   1.025    0.306    
## Age_18_graduate:year_new  -0.05544    0.05747 508.00010  -0.965    0.335    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.424  0.423       
## Ag_18_grd:_  0.582 -0.583 -0.982
Long_format_2009_2015_new$predicted_G41H <- predict(G41H_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_G41H <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = G41H, color = factor(year_factor_G41H))) + geom_point(aes(shape = year_factor_G41H), alpha = 0.5) + geom_line(aes(y = predicted_G41H), size = 1) +  labs(title = "Importance of healthcare benefits (G41H) by Age and Year", x = "Age",y = "Importance of healthcare benefits (G41H)", color = "Year", shape = "Year") + theme_minimal()

G41P: Importance of job central to identity

G41P_Regression_09_15 <- lmer(G41P ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
G41P_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: G41P ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 3885.828
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 1.012   
##  Residual             1.336   
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                   8.8934                   -0.2062                   -1.6773  
## Age_18_graduate:year_new  
##                   0.1135
summary(G41P_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: G41P ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 3885.8
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.55286 -0.50768  0.09858  0.69027  2.23831 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 1.024    1.012   
##  Residual             1.786    1.336   
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                8.89339    1.30095 896.83234   6.836  1.5e-11 ***
## Age_18_graduate           -0.20620    0.06726 896.83234  -3.066  0.00224 ** 
## year_new                  -1.67733    1.72630 547.29278  -0.972  0.33166    
## Age_18_graduate:year_new   0.11353    0.07583 507.99999   1.497  0.13498    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.394  0.393       
## Ag_18_grd:_  0.563 -0.564 -0.980
Long_format_2009_2015_new$predicted_G41P <- predict(G41P_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_G41P <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = G41P, color = factor(year_factor_G41P))) + geom_point(aes(shape = year_factor_G41P), alpha = 0.5) + geom_line(aes(y = predicted_G41P), size = 1) +  labs(title = "Importance of job central to identity (G41P) by Age and Year", x = "Age",y = "Importance of job central to identity (G41P)", color = "Year", shape = "Year") + theme_minimal()

H1: General Health

H1_Regression_09_15 <- lmer(H1 ~ Age_18_graduate + year_new + Age_18_graduate*year_new + (1 | TAS_ID), data = Long_format_2009_2015_new)
H1_Regression_09_15
## Linear mixed model fit by REML ['lmerModLmerTest']
## Formula: H1 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## REML criterion at convergence: 2591.558
## Random effects:
##  Groups   Name        Std.Dev.
##  TAS_ID   (Intercept) 0.5568  
##  Residual             0.6963  
## Number of obs: 1020, groups:  TAS_ID, 510
## Fixed Effects:
##              (Intercept)           Age_18_graduate                  year_new  
##                  0.78685                   0.06963                   2.10813  
## Age_18_graduate:year_new  
##                 -0.09461
summary(H1_Regression_09_15)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: H1 ~ Age_18_graduate + year_new + Age_18_graduate * year_new +  
##     (1 | TAS_ID)
##    Data: Long_format_2009_2015_new
## 
## REML criterion at convergence: 2591.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4233 -0.6347 -0.0865  0.5028  3.4160 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  TAS_ID   (Intercept) 0.3100   0.5568  
##  Residual             0.4849   0.6963  
## Number of obs: 1020, groups:  TAS_ID, 510
## 
## Fixed effects:
##                           Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)                0.78685    0.69194 881.87428   1.137   0.2558  
## Age_18_graduate            0.06963    0.03578 881.87428   1.946   0.0519 .
## year_new                   2.10813    0.90062 549.68931   2.341   0.0196 *
## Age_18_graduate:year_new  -0.09461    0.03952 507.99996  -2.394   0.0170 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) Ag_18_ yer_nw
## Age_18_grdt -0.998              
## year_new    -0.376  0.375       
## Ag_18_grd:_  0.551 -0.552 -0.979
Long_format_2009_2015_new$predicted_H1 <- predict(H1_Regression_09_15, re.form = NA)
Long_format_2009_2015_new$year_factor_H1 <- factor(Long_format_2009_2015_new$year)
ggplot(Long_format_2009_2015_new, aes(x = Age_18_graduate, y = H1, color = factor(year_factor_H1))) + geom_point(aes(shape = year_factor_H1), alpha = 0.5) + geom_line(aes(y = predicted_H1), size = 1) +  labs(title = "General Health (H1) by Age and Year", x = "Age",y = "General Health (H1)", color = "Year", shape = "Year") + theme_minimal()


Gender: 2005 & 2015

Step 4: Regression (2005 & 2015)

Filter the data (2005 & 2015)

Long_format_2005_2015 <-  TAS_data_long_format_age %>% filter(year==2005| year==2015) %>% filter(Age_18_graduate< 50) %>% mutate(year_new = case_when(year == 2005 ~ -1, year == 2009 ~ 0,year == 2015 ~ 1))
knitr::kable(head(Long_format_2005_2015[, 1:43]))
TAS TAS05 TAS09 TAS15 1968 Interview Number Person Number Gender Individual is sample Year ID Number Sequence Number Relationship to Head Release Number B5A B5D B6C C2D C2E C2F D2D3_month D2D3_year E1_1st_mention E1_2nd_mention E1_3rd_mention E3 G1 G2_month G2_year G10 G11 G30A G41A G41B G41C G41H G41P H1 L7_1st_mention L7_2nd_mention L7_3rd_mention Age_17_graduate Age_18_graduate year year_new
2 1 1 NA 5 32 2 2 624 3 30 5 5 5 5 7 7 7 0 0 1 7 0 0 1 5 2002 1 1 7 7 6 6 7 5 2 1 0 0 20 21 2005 -1
2 1 1 NA 6 34 1 2 1202 51 30 5 2 2 6 1 1 1 0 0 7 0 0 5 1 5 2002 1 1 0 7 5 7 5 3 1 1 0 0 20 21 2005 -1
2 1 1 NA 14 30 1 2 736 51 30 5 4 4 4 2 1 1 0 0 2 0 0 0 1 6 2003 1 5 6 5 6 6 5 5 2 1 0 0 19 20 2005 -1
1 1 NA NA 18 38 2 2 5647 3 98 5 3 4 3 4 2 2 0 0 3 7 0 5 1 6 2004 1 5 6 5 5 5 7 5 2 1 0 0 18 19 2005 -1
2 1 1 NA 47 34 2 2 2516 3 30 5 4 5 6 4 5 2 0 0 1 0 0 0 1 5 2005 5 0 6 3 6 4 7 4 1 1 0 0 17 18 2005 -1
2 1 1 NA 53 35 2 2 1392 3 33 5 4 5 5 3 1 1 0 0 1 0 0 0 1 6 2002 1 1 7 6 7 7 7 5 1 1 0 0 20 21 2005 -1

B5A: Responsibility for self

coef(summary(lm(B5A ~ Gender + year_new, data = Long_format_2005_2015)))
##               Estimate Std. Error   t value      Pr(>|t|)
## (Intercept)  4.0315954  0.1018711 39.575457 2.803596e-225
## Gender      -0.1979421  0.0638855 -3.098388  1.987583e-03
## year_new     0.2047267  0.0320330  6.391119  2.291367e-10

B5D: Managing own money

coef(summary(lm(B5D ~ Gender + year_new, data = Long_format_2005_2015)))
##                Estimate Std. Error   t value     Pr(>|t|)
## (Intercept)  4.56326308 0.08011094 56.961793 0.0000000000
## Gender      -0.06503111 0.05023925 -1.294428 0.1957479412
## year_new     0.08376591 0.02519060  3.325285 0.0009079731

B6C: Money management skills

coef(summary(lm(B6C ~ Gender + year_new, data = Long_format_2005_2015)))
##                Estimate Std. Error    t value      Pr(>|t|)
## (Intercept)  5.38049049 0.12029882 44.7260459 4.563815e-265
## Gender      -0.03713145 0.07544191 -0.4921860  6.226712e-01
## year_new     0.03260448 0.03782753  0.8619247  3.888883e-01

C2D: Worry about expenses

coef(summary(lm(C2D ~ Gender + year_new, data = Long_format_2005_2015)))
##                Estimate Std. Error   t value     Pr(>|t|)
## (Intercept)  3.47868097 0.16322806 21.311782 1.194268e-86
## Gender       0.08747606 0.10236374  0.854561 3.929520e-01
## year_new    -0.06054635 0.05132647 -1.179632 2.383629e-01

C2E: Worry about future job

coef(summary(lm(C2E ~ Gender + year_new, data = Long_format_2005_2015)))
##                Estimate Std. Error    t value     Pr(>|t|)
## (Intercept)  3.05782814 0.17001859 17.9852572 9.625869e-65
## Gender       0.29525591 0.10662222  2.7691780 5.699871e-03
## year_new    -0.01327876 0.05346173 -0.2483788 8.038807e-01

C2F: Discouraged about future

coef(summary(lm(C2F ~ Gender + year_new, data = Long_format_2005_2015)))
##               Estimate Std. Error   t value     Pr(>|t|)
## (Intercept) 2.70300273 0.15328352 17.634007 1.489996e-62
## Gender      0.20155433 0.09612731  2.096744 3.620954e-02
## year_new    0.03962929 0.04819945  0.822194 4.111176e-01

E3: Work for money

coef(summary(lm(E3 ~ Gender + year_new, data = Long_format_2005_2015)))
##                Estimate Std. Error    t value     Pr(>|t|)
## (Intercept)  1.44293314 0.19689620  7.3283952 4.082580e-13
## Gender       0.04978551 0.12347773  0.4031943 6.868718e-01
## year_new    -0.25138842 0.06191329 -4.0603303 5.193669e-05

G10: Attended college

coef(summary(lm(G10 ~ Gender + year_new, data = Long_format_2005_2015)))
##                Estimate Std. Error   t value     Pr(>|t|)
## (Intercept)  2.20322884 0.15242429 14.454578 5.087477e-44
## Gender      -0.27530220 0.09558847 -2.880078 4.041110e-03
## year_new    -0.09047707 0.04792927 -1.887721 5.928652e-02

G11: Attending college

coef(summary(lm(G11 ~ Gender + year_new, data = Long_format_2005_2015)))
##              Estimate Std. Error    t value     Pr(>|t|)
## (Intercept) 1.8481899 0.16943878 10.9077145 1.448750e-26
## Gender      0.0232750 0.10625861  0.2190411 8.266525e-01
## year_new    0.5452727 0.05327941 10.2342115 1.077770e-23

G30A: Likelihood of well-paying job

coef(summary(lm(G30A ~ Gender + year_new, data = Long_format_2005_2015)))
##               Estimate Std. Error    t value      Pr(>|t|)
## (Intercept) 5.67676303 0.13936409 40.7333270 2.759724e-234
## Gender      0.04920755 0.08739814  0.5630274  5.735135e-01
## year_new    0.31877671 0.04382253  7.2742650  6.008737e-13

G41A: Importance of job status

coef(summary(lm(G41A ~ Gender + year_new, data = Long_format_2005_2015)))
##                Estimate Std. Error   t value      Pr(>|t|)
## (Intercept)  4.91622778 0.15069224 32.624293 5.831102e-171
## Gender       0.08934479 0.09450226  0.945425  3.446181e-01
## year_new    -0.19273169 0.04738463 -4.067389  5.040812e-05

G41B: Importance of decision-making

coef(summary(lm(G41B ~ Gender + year_new, data = Long_format_2005_2015)))
##                Estimate Std. Error   t value      Pr(>|t|)
## (Intercept)  5.55242121 0.10837947 51.231303 6.452355e-314
## Gender       0.09262916 0.06796703  1.362854  1.731650e-01
## year_new    -0.05062620 0.03407953 -1.485531  1.376462e-01

G41C: Importance of healthcare benefits

coef(summary(lm(G41C ~ Gender + year_new, data = Long_format_2005_2015)))
##                Estimate Std. Error    t value      Pr(>|t|)
## (Intercept)  5.05045819 0.16259746 31.0611133 8.107273e-159
## Gender       0.04782299 0.10196827  0.4689987  6.391494e-01
## year_new    -0.37811595 0.05112818 -7.3954509  2.520449e-13

G41H: Importance of healthcare benefits

coef(summary(lm(G41H ~ Gender + year_new, data = Long_format_2005_2015)))
##                Estimate Std. Error   t value     Pr(>|t|)
## (Intercept)  5.88255589 0.09269561 63.461000 0.000000e+00
## Gender       0.26887442 0.05813136  4.625291 4.114766e-06
## year_new    -0.04569501 0.02914780 -1.567700 1.171950e-01

G41P: Importance of job central to identity

coef(summary(lm(G41P ~ Gender + year_new, data = Long_format_2005_2015)))
##                Estimate Std. Error   t value      Pr(>|t|)
## (Intercept)  4.92899976 0.14075490 35.018318 1.170615e-189
## Gender       0.01793715 0.08827034  0.203207  8.390051e-01
## year_new    -0.05829606 0.04425987 -1.317131  1.880272e-01

H1: General Health

coef(summary(lm(H1 ~ Gender + year_new, data = Long_format_2005_2015)))
##               Estimate Std. Error   t value      Pr(>|t|)
## (Intercept) 1.96972544 0.08295675 23.744003 8.884067e-104
## Gender      0.14983206 0.05202392  2.880061  4.041321e-03
## year_new    0.07781306 0.02608545  2.983006  2.907658e-03