Data Manipulations

data %<>%
  mutate(Participant.ID = factor(Participant.ID),
         langstatus = factor(Lang.Stat),
         maternal.ed = factor(Maternal.Ed),
         celf.c = as.numeric(scale(CELF.std, center = TRUE, scale = FALSE)),
         wisc.c = as.numeric(scale(WISC.nonverbal.index, center = TRUE, scale = FALSE)),
         age.c = as.numeric(scale(Age, center = TRUE, scale = FALSE)),
         nir = as.numeric(scale(Needs.Income.ratio, center = TRUE, scale = FALSE)),
         child.ethnicity = factor(child.ethnicity),
         child.race = factor (child.race),
         free.red.lunch.c = as.numeric(free.or.reduced.lunch) - 1.5,
         gender.c = as.numeric(Gender) - 1.5)
str(data)
## 'data.frame':    32 obs. of  35 variables:
##  $ Participant.ID                   : Factor w/ 32 levels "031317_2m_10y_WLA",..: 25 26 18 5 6 14 19 20 21 7 ...
##  $ Age                              : int  9 11 12 10 13 14 13 11 14 9 ...
##  $ Gender                           : Factor w/ 2 levels "female","male": 1 1 1 1 1 1 1 2 2 2 ...
##  $ Language.History                 : Factor w/ 6 levels "bilingual simul",..: 3 3 4 3 3 3 3 3 3 3 ...
##  $ WISC.nonverbal.index             : int  120 113 88 106 105 119 88 94 90 114 ...
##  $ CELF.std                         : int  106 111 102 85 114 124 93 104 108 118 ...
##  $ CELF.WC                          : int  11 11 11 9 14 17 8 10 11 13 ...
##  $ Language.Status                  : Factor w/ 2 levels "TL","TL-H": 1 1 1 1 1 2 1 1 1 2 ...
##  $ Lang.Stat                        : Factor w/ 1 level "TL": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Comments.or.problems.with.session: Factor w/ 3 levels "","bilingual but mom says that they mostly speak in English??",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Maternal.Ed                      : Factor w/ 4 levels "college graduate",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Maternal.salary                  : Factor w/ 8 levels "< $10,000","$15,000-$20,000",..: 3 3 4 1 1 7 1 8 5 1 ...
##  $ Middle.value.for.maternal.salary : Factor w/ 8 levels "$0.00 ","$17,500.00 ",..: 3 3 4 6 6 8 6 1 5 6 ...
##  $ Paternal.salary                  : Factor w/ 8 levels "< $10,000","> $100,000",..: 2 2 6 2 2 7 7 2 6 7 ...
##  $ Middle.value.for.paternal.salary : Factor w/ 8 levels "$0.00 ","$100,000.00 ",..: 2 2 7 2 2 8 8 2 7 8 ...
##  $ Other.salary                     : Factor w/ 4 levels "","h","n/a","na ": 3 3 3 1 1 1 3 1 1 3 ...
##  $ Combined.salary                  : Factor w/ 16 levels "$10,000.00 ",..: 6 6 14 3 3 8 16 2 16 16 ...
##  $ Needs.Income.ratio               : num  4.31 4.31 2.18 3.22 3.22 ...
##  $ X.adults                         : int  2 2 3 2 2 2 2 3 4 2 ...
##  $ X.kids                           : int  3 3 4 4 4 2 5 3 2 1 ...
##  $ X..of.individuals.in.home        : int  5 5 7 6 6 4 7 6 6 3 ...
##  $ Poverty.guideline                : Factor w/ 5 levels "$20,160.00 ",..: 3 3 5 4 4 2 5 4 4 1 ...
##  $ free.or.reduced.lunch            : Factor w/ 2 levels "no","yes": 1 1 2 1 1 1 2 1 1 1 ...
##  $ free.lunch.                      : Factor w/ 3 levels "no","no ","yes": 1 1 1 1 1 1 3 1 1 1 ...
##  $ reduced.lunch.                   : Factor w/ 2 levels "no","yes": 1 1 2 1 1 1 1 1 1 1 ...
##  $ child.ethnicity                  : Factor w/ 3 levels "","Hispanic or Latino",..: 3 3 2 3 3 3 3 3 3 2 ...
##  $ child.race                       : Factor w/ 6 levels "","Black or African American",..: 6 6 5 6 6 3 6 1 1 3 ...
##  $ langstatus                       : Factor w/ 1 level "TL": 1 1 1 1 1 1 1 1 1 1 ...
##  $ maternal.ed                      : Factor w/ 4 levels "college graduate",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ celf.c                           : num  -3.94 1.06 -7.94 -24.94 4.06 ...
##  $ wisc.c                           : num  12 5 -20 -2 -3 11 -20 -14 -18 6 ...
##  $ age.c                            : num  -2.719 -0.719 0.281 -1.719 1.281 ...
##  $ nir                              : num  0.616 0.616 -1.513 -0.468 -0.468 ...
##  $ free.red.lunch.c                 : num  -0.5 -0.5 0.5 -0.5 -0.5 -0.5 0.5 -0.5 -0.5 -0.5 ...
##  $ gender.c                         : num  -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.5 0.5 0.5 ...
# Notes:
# For gender, female = -0.5 (after centering), male = 0.5 (after centering)
# For maternal education, college graduate = 1, graduate degree = 2, high school graduate = 3, partial college/associate's degree = 4

Participants

Demographics

# Age
data %>%
  distinct(Participant.ID, Age)%>%
  summarise_at('Age', 
               list(~mean(., na.rm=T), 
                    ~sd(., na.rm=T),
                    ~median(., na.rm=T),
                    ~min(., na.rm=T),
                    ~max(., na.rm=T),
                    ~sum(!is.na(.))))%>%
  dplyr::rename("n" = "sum")%>%
  dplyr::select(n, mean, sd, median, min, max)%>%
  mutate(total.n = sum(n))%>%
  knitr::kable()
n mean sd median min max total.n
32 11.71875 1.727097 12 9 14 32
# Gender
data %>%
  distinct(Participant.ID, Gender)%>%
  group_by(Gender)%>%
  summarise(n = n())%>%
  mutate(total.Gender.n = sum(n))%>%
  knitr::kable()
Gender n total.Gender.n
female 18 32
male 14 32
# Race
data %>%
  distinct(Participant.ID, child.race)%>%
  group_by(child.race)%>%
  summarise(n = n())%>%
  mutate(total.child.race.n = sum(n))%>%
  knitr::kable()
child.race n total.child.race.n
2 32
Black or African American 4 32
Multiple 6 32
n/a 1 32
Other 2 32
White 17 32
# Ethnicity
data %>%
  distinct(Participant.ID, child.ethnicity)%>%
  group_by(child.ethnicity)%>%
  summarise(n = n())%>%
  mutate(total.child.ethnicity.n = sum(n))%>%
  knitr::kable()
child.ethnicity n total.child.ethnicity.n
1 32
Hispanic or Latino 8 32
Not Hispanic or Latino 23 32

Descriptives

# CELF-4 standard scores
data %>%
  distinct(Participant.ID, CELF.std)%>%
  summarise_at('CELF.std', 
               list(~mean(., na.rm=T), 
                    ~sd(., na.rm=T),
                    ~median(., na.rm=T),
                    ~min(., na.rm=T),
                    ~max(., na.rm=T),
                    ~sum(!is.na(.))))%>%
  dplyr::rename("n" = "sum")%>%
  dplyr::select(n, mean, sd, median, min, max)%>%
  mutate(total.n = sum(n))%>%
  knitr::kable()
n mean sd median min max total.n
32 109.9375 12.99116 113 79 130 32
# CELF-4 WC standard scores
data %>%
  distinct(Participant.ID, CELF.WC)%>%
  summarise_at('CELF.WC', 
               list(~mean(., na.rm=T), 
                    ~sd(., na.rm=T),
                    ~median(., na.rm=T),
                    ~min(., na.rm=T),
                    ~max(., na.rm=T),
                    ~sum(!is.na(.))))%>%
  dplyr::rename("n" = "sum")%>%
  dplyr::select(n, mean, sd, median, min, max)%>%
  mutate(total.n = sum(n))%>%
  knitr::kable()
n mean sd median min max total.n
32 12.5625 3.311149 13 5 18 32
# WISC standard scores
data %>%
  distinct(Participant.ID, WISC.nonverbal.index)%>%
  summarise_at('WISC.nonverbal.index', 
               list(~mean(., na.rm=T), 
                    ~sd(., na.rm=T),
                    ~median(., na.rm=T),
                    ~min(., na.rm=T),
                    ~max(., na.rm=T),
                    ~sum(!is.na(.))))%>%
  dplyr::rename("n" = "sum")%>%
  dplyr::select(n, mean, sd, median, min, max)%>%
  mutate(total.n = sum(n))%>%
  knitr::kable()
n mean sd median min max total.n
32 108 14.19223 105.5 86 139 32
# Income-to-Needs Ratio
data %>%
  distinct(Participant.ID, Needs.Income.ratio)%>%
  summarise_at('Needs.Income.ratio', 
               list(~mean(., na.rm=T), 
                    ~sd(., na.rm=T),
                    ~median(., na.rm=T),
                    ~min(., na.rm=T),
                    ~max(., na.rm=T),
                    ~sum(!is.na(.))))%>%
  dplyr::rename("n" = "sum")%>%
  dplyr::select(n, mean, sd, median, min, max)%>%
  mutate(total.n = sum(n))%>%
  knitr::kable()
n mean sd median min max total.n
32 3.691064 1.766435 3.630218 0.1758087 7.510288 32
# Maternal Education
data %>%
  distinct(Participant.ID, maternal.ed)%>%
  group_by(maternal.ed)%>%
  summarise(n = n())%>%
  mutate(total.maternal.ed.n = sum(n))%>%
  knitr::kable()
maternal.ed n total.maternal.ed.n
college graduate 10 32
graduate degree 7 32
high school graduate 6 32
partial college/associate’s degree 9 32

Visualizations

agg_p <- data %>% 
  group_by(maternal.ed, Needs.Income.ratio) %>%
  #summarise(mean = mean(CELF.WC)) %>%
  ungroup()

plotlabels <- c("High School\nGraduate","Partial College/\nAssociate's Degree","College Degree","Graduate Degree")

ggplot(agg_p, aes(x=factor(maternal.ed, level=c('high school graduate',"partial college/associate's degree",'college graduate','graduate degree')), y=CELF.WC))+#, color = maternal.ed))+#, color =free.or.reduced.lunch)) +
  geom_point(color='#BA0412') + 
  geom_smooth(method="lm",se=FALSE, fullrange=FALSE) +
  labs(x="Maternal Education Level", y = "CELF-4 Word Classes Total Standard Score")+
  scale_x_discrete(labels= plotlabels)+
  theme(axis.text.x=element_text(color = "black", size=11, angle=0, vjust=.5, hjust=0.5),axis.title.x = element_text(face= "bold",margin = margin(t = 10, r = 0, b = 0, l = 0)),axis.title.y=element_text(face= "bold"))
## `geom_smooth()` using formula = 'y ~ x'

ggplot(agg_p, aes(x=Needs.Income.ratio, y=CELF.WC))+#, color = maternal.ed))+#, color =free.or.reduced.lunch)) +
  geom_point() + 
  geom_smooth(method="lm",se=FALSE, fullrange=FALSE, color = '#12567D') +
  labs(x="Income-to-Needs Ratio", y = "CELF-4 Word Classes Total Standard Score")+ theme(axis.title.x = element_text(face= "bold"),axis.title.y=element_text(face= "bold"))
## `geom_smooth()` using formula = 'y ~ x'

agg_p$maternal.ed <- factor(agg_p$maternal.ed, levels = c('high school graduate',"partial college/associate's degree",'college graduate','graduate degree'))

ggplot(agg_p, aes(x=Needs.Income.ratio, y=CELF.WC, color = maternal.ed))+#, color =free.or.reduced.lunch)) +
  geom_point() + 
  geom_smooth(method="lm",se=FALSE, fullrange=FALSE) +
  labs(x="Income-to-Needs Ratio", y = "CELF-4 Word Classes Total Standard Score", col="Maternal Education Level")+ scale_fill_discrete(limits=c('high school graduate',"partial college/associate's degree",'college graduate','graduate degree')) + theme(axis.title.x = element_text(face= "bold"),axis.title.y=element_text(face= "bold"),legend.position="none") + scale_color_hue(labels = c("High School Graduate","Partial College/Associate's Degree","College Degree","Graduate Degree"))
## `geom_smooth()` using formula = 'y ~ x'

allvarsplot <- ggplot(agg_p, aes(x=Needs.Income.ratio, y=CELF.WC, color = maternal.ed))+#, color =free.or.reduced.lunch)) +
  geom_point() + 
  geom_smooth(method="lm",se=FALSE, fullrange=FALSE) +
  labs(x="Income-to-Needs Ratio", y = "CELF-4 Word Classes Total Standard Score", col="Maternal Education Level")+ scale_fill_discrete(limits=c('high school graduate',"partial college/associate's degree",'college graduate','graduate degree')) + theme(axis.title.x = element_text(face= "bold"),axis.title.y=element_text(face= "bold"),legend.text =element_text( color = "black")) + scale_color_hue(labels = c("High School Graduate","Partial College/Associate's Degree","College Degree","Graduate Degree"))

legend <- cowplot::get_legend(allvarsplot)
## `geom_smooth()` using formula = 'y ~ x'
grid.newpage()
grid.draw(legend)

Analyses

data$maternal.ed <- relevel(data$maternal.ed, ref = "high school graduate")
#HcSum <- rbind(
  #cH1=c("out of category"=0.333333, "target meaning"=0, "within category"=-0.333333),
  #cH2=c("out of category"=-0.333333, "target meaning"=0.666667, "within category"=-0.333333)
#)

#contrasts(data$language.status)<-contr.helmert(3)/3
#contrasts(proportion_data$response)
#colnames(contrasts(proportion_data$response)) <- c("_target meaning", "_within category")

data.max <- lm (CELF.WC ~ gender.c + age.c + wisc.c + free.red.lunch.c + maternal.ed*nir, data=data) #converges and all that jazz
summary (data.max)
## 
## Call:
## lm(formula = CELF.WC ~ gender.c + age.c + wisc.c + free.red.lunch.c + 
##     maternal.ed * nir, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.8521 -1.6084  0.4474  1.0936  2.7256 
## 
## Coefficients:
##                                                   Estimate Std. Error t value
## (Intercept)                                       12.01327    1.00792  11.919
## gender.c                                          -0.67656    0.91191  -0.742
## age.c                                             -0.16533    0.31867  -0.519
## wisc.c                                            -0.01031    0.06694  -0.154
## free.red.lunch.c                                  -2.02760    1.16668  -1.738
## maternal.edcollege graduate                       -1.27383    1.26464  -1.007
## maternal.edgraduate degree                         3.52521    2.80676   1.256
## maternal.edpartial college/associate's degree     -0.10823    1.37327  -0.079
## nir                                                2.75604    0.96211   2.865
## maternal.edcollege graduate:nir                   -1.59371    0.97477  -1.635
## maternal.edgraduate degree:nir                    -3.14495    1.40453  -2.239
## maternal.edpartial college/associate's degree:nir -3.66958    1.27375  -2.881
##                                                   Pr(>|t|)    
## (Intercept)                                       1.53e-10 ***
## gender.c                                           0.46676    
## age.c                                              0.60958    
## wisc.c                                             0.87909    
## free.red.lunch.c                                   0.09760 .  
## maternal.edcollege graduate                        0.32584    
## maternal.edgraduate degree                         0.22360    
## maternal.edpartial college/associate's degree      0.93797    
## nir                                                0.00958 ** 
## maternal.edcollege graduate:nir                    0.11770    
## maternal.edgraduate degree:nir                     0.03667 *  
## maternal.edpartial college/associate's degree:nir  0.00924 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.149 on 20 degrees of freedom
## Multiple R-squared:  0.7283, Adjusted R-squared:  0.5789 
## F-statistic: 4.874 on 11 and 20 DF,  p-value: 0.001085
# Notes:
# For gender, female = -0.5 (after centering), male = 0.5 (after centering)
# For maternal education, college graduate = 1, graduate degree = 2, high school graduate = 3, partial college/associate's degree = 4

Exploring the interactions

emm_options(lm.df = "kenward-roger")
#emmeans(data.max, pairwise~ maternal.ed, adust = "bonferroni")
#emmeans(data.max, pairwise~ nir, adust = "bonferroni")
emmeans(data.max, pairwise~ maternal.ed | nir , adust = "bonferroni")
## $emmeans
## nir = -1.8e-16:
##  maternal.ed                        emmean    SE df lower.CL upper.CL
##  high school graduate                 12.0 1.008 20     9.91     14.1
##  college graduate                     10.7 0.914 20     8.83     12.6
##  graduate degree                      15.5 2.446 20    10.44     20.6
##  partial college/associate's degree   11.9 1.105 20     9.60     14.2
## 
## Results are averaged over the levels of: gender.c, free.red.lunch.c 
## Confidence level used: 0.95 
## 
## $contrasts
## nir = -1.8e-16:
##  contrast                                                    estimate   SE df
##  high school graduate - college graduate                        1.274 1.26 20
##  high school graduate - graduate degree                        -3.525 2.81 20
##  high school graduate - (partial college/associate's degree)    0.108 1.37 20
##  college graduate - graduate degree                            -4.799 2.80 20
##  college graduate - (partial college/associate's degree)       -1.166 1.20 20
##  graduate degree - (partial college/associate's degree)         3.633 3.07 20
##  t.ratio p.value
##    1.007  0.7470
##   -1.256  0.6001
##    0.079  0.9998
##   -1.717  0.3415
##   -0.970  0.7676
##    1.184  0.6433
## 
## Results are averaged over the levels of: gender.c, free.red.lunch.c 
## P value adjustment: tukey method for comparing a family of 4 estimates
#emmeans(data.max, pairwise~ nir |  maternal.ed, adust = "bonferroni")
High-level summary of these models:

There are no within-subject or within-item measures (only a single summary data point from each participant for each measure), so a LMER is not appropriate; a simple linear regression is. When controlling for the other variables and high school graduate as the reference level for maternal education, the effect of the income-to-needs ratio on on the CELF-4 Word Classes total standard score is significantly different from a maternal education of partial college/associate’s degree and graduate degree, but not college graduate. Income-to-needs ratio strongly predicts children’s semantic abilities for children with mothers with a high school degree. Specifically, for every 1 unit increase in the income-to-needs ratio, childrens’s CELF-4 Word Classes total standard score increases by 2.76 units. The semantic abilities of children with mothers with a college degree follow the same trajectory of higher income-to-needs ratio predicting higher CELF-4 Word Classes total standard scores as children with mothers with a high school degree. However, there is a different relationship between income-to-needs ratio and children’s semantic abilities for children with mothers with a partial college/associate’s degree or a graduate degree. For children with mothers with these education levels, a higher income-to-needs ratio is predictive of a lower CELF-4 Word Classes total standard score.

Not discussed in the paragraph above, but something we noted when looking at the graph together is the variability/spread of the data for each education level. Consider commenting on that too.