Skip to content
Snippets Groups Projects
Commit 4fa82a42 authored by Ben Anderson's avatar Ben Anderson
Browse files

Amended pooled 1983/87 test dataset name to avoid confusion later.

parent 28e43f4e
No related branches found
No related tags found
No related merge requests found
...@@ -213,17 +213,17 @@ Before we do this we test for significant differences on core time-use dimension ...@@ -213,17 +213,17 @@ Before we do this we test for significant differences on core time-use dimension
```{r tableDifferences1983_1985} ```{r tableDifferences1983_1985}
# Check distributions for 1st diary day # Check distributions for 1st diary day
t_dt <- MTUSW6UKsurvey_DT[(survey == 1983 | survey == 1987) & diary == "1st diary day"] subset1983_1987_DT <- MTUSW6UKsurvey_DT[(survey == 1983 | survey == 1987) & diary == "1st diary day"]
kable(caption = "Months data collected", kable(caption = "Months data collected",
table(t_dt$mtus_month, t_dt$survey) table(subset1983_1987_DT$mtus_month, subset1983_1987_DT$survey)
) )
# essentially 1983 = autumn/winter, 1987 = spring/summer # essentially 1983 = autumn/winter, 1987 = spring/summer
kable(caption = "Days data collected (day may be incorrect)", kable(caption = "Days data collected (day may be incorrect)",
table(t_dt$mtus_day, t_dt$survey) table(subset1983_1987_DT$mtus_day, subset1983_1987_DT$survey)
) )
kable(caption = "Mean minutes per day by 1983/87 survey - 1st diary day", kable(caption = "Mean minutes per day by 1983/87 survey - 1st diary day",
t_dt[, subset1983_1987_DT[,
.( .(
sleep = mean(main2), sleep = mean(main2),
wash_dress = mean(main4), wash_dress = mean(main4),
...@@ -405,25 +405,34 @@ kable(caption = "Survey year & pooled survey year (ba_survey)", ...@@ -405,25 +405,34 @@ kable(caption = "Survey year & pooled survey year (ba_survey)",
There do not appear to be large differences but we will test whether the survey year significantly predicts minutes per day in these activities given other characteristics (which may themselves have varied between the two samples). There do not appear to be large differences but we will test whether the survey year significantly predicts minutes per day in these activities given other characteristics (which may themselves have varied between the two samples).
The following analyses use a subset of the main data which only contains 1983 & 1987 data.
```{r testDifferences1983_1985} ```{r testDifferences1983_1985}
t_dt[, survey:= as.factor(survey)] kable(caption="Cases for 1983/87 pooling testing",
table(subset1983_1987_DT$survey,
subset1983_1987_DT$ba_survey,
useNA = "always"
)
)
subset1983_1987_DT[, survey:= as.factor(survey)]
# Transformations based on spreadlevel plot of original un-transformed data # Transformations based on spreadlevel plot of original un-transformed data
sleep <- lm((main2*main2) ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = t_dt) sleep <- lm((main2*main2) ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = subset1983_1987_DT)
wash_dress <- lm(sqrt(main4) ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = t_dt) wash_dress <- lm(sqrt(main4) ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = subset1983_1987_DT)
t_dt$eat <- t_dt$main5 + t_dt$main6 subset1983_1987_DT$eat <- subset1983_1987_DT$main5 + subset1983_1987_DT$main6
eat <- lm(eat ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = t_dt) eat <- lm(eat ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = subset1983_1987_DT)
t_dt$paid_work <- t_dt$main7 + t_dt$main8 subset1983_1987_DT$paid_work <- subset1983_1987_DT$main7 + subset1983_1987_DT$main8
paid_work <- lm(paid_work ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = t_dt) paid_work <- lm(paid_work ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = subset1983_1987_DT)
cook <- lm(main18 ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = t_dt) cook <- lm(main18 ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = subset1983_1987_DT)
laundry <- lm(main21 ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = t_dt) laundry <- lm(main21 ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = subset1983_1987_DT)
pub_etc <- lm(main39 ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = t_dt) pub_etc <- lm(main39 ~ survey + mtus_month + ba_age_r + ba_nchild + hhtype, data = subset1983_1987_DT)
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment