s$condition[s$Area_type == 2] <- 0
s$condition[s$Area_type == 1] <- 1
table(s$condition)
##
## 0 1
## 373 382
summary(lm(overall.health ~ condition, s))
##
## Call:
## lm(formula = overall.health ~ condition, data = s)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5420 -1.5157 0.4580 0.4843 2.4843
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.54201 0.06866 37.022 <2e-16 ***
## condition -0.02630 0.09627 -0.273 0.785
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.319 on 749 degrees of freedom
## (15 observations deleted due to missingness)
## Multiple R-squared: 9.962e-05, Adjusted R-squared: -0.001235
## F-statistic: 0.07462 on 1 and 749 DF, p-value: 0.7848
summary(lm(symptoms ~ condition, s))
##
## Call:
## lm(formula = symptoms ~ condition, data = s)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.7355 -1.7290 0.2645 1.2710 4.2710
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.73554 0.09315 29.37 <2e-16 ***
## condition -0.00654 0.13120 -0.05 0.96
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.775 on 730 degrees of freedom
## (34 observations deleted due to missingness)
## Multiple R-squared: 3.404e-06, Adjusted R-squared: -0.001366
## F-statistic: 0.002485 on 1 and 730 DF, p-value: 0.9603
library(psych)
## Warning: package 'psych' was built under R version 3.2.5
alpha(s[,c(33:35)], na.rm=TRUE)
##
## Reliability analysis
## Call: alpha(x = s[, c(33:35)], na.rm = TRUE)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd
## 0.6 0.58 0.54 0.32 1.4 0.02 2.3 1.8
##
## lower alpha upper 95% confidence boundaries
## 0.56 0.6 0.64
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se
## qE2 0.17 0.21 0.12 0.12 0.27 0.047
## qE3 0.36 0.45 0.29 0.29 0.80 0.035
## qE4 0.70 0.70 0.54 0.54 2.39 0.021
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## qE2 292 0.88 0.83 0.73 0.59 3.1 3.1
## qE3 707 0.87 0.75 0.59 0.49 2.2 3.0
## qE4 758 0.52 0.64 0.30 0.23 2.2 1.4
##
## Non missing response frequency for each item
## 0 1 2 3 4 5 6 7 miss
## qE2 0.43 0.03 0.07 0.04 0.03 0.04 0.02 0.34 0.62
## qE3 0.58 0.03 0.04 0.04 0.04 0.04 0.00 0.24 0.08
## qE4 0.00 0.53 0.04 0.25 0.06 0.12 0.00 0.00 0.01
s$econ<-(s$qE2 + s$qE3 + s$qE4)/3
summary(lm(econ~condition, s))
##
## Call:
## lm(formula = econ ~ condition, data = s)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2174 -1.9475 -0.5507 1.4493 3.9891
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.3443 0.1761 13.309 <2e-16 ***
## condition 0.2065 0.2335 0.884 0.377
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.946 on 281 degrees of freedom
## (483 observations deleted due to missingness)
## Multiple R-squared: 0.002774, Adjusted R-squared: -0.0007749
## F-statistic: 0.7816 on 1 and 281 DF, p-value: 0.3774
s$unable.to.work<-s$qE2
s$unable.do.chores<-s$qE3
s$money.stress<-s$qE4
summary(lm(unable.to.work~condition, s))
##
## Call:
## lm(formula = unable.to.work ~ condition, data = s)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2147 -2.9048 -0.9048 3.7853 4.0952
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.9048 0.2799 10.379 <2e-16 ***
## condition 0.3100 0.3727 0.832 0.406
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.141 on 287 degrees of freedom
## (477 observations deleted due to missingness)
## Multiple R-squared: 0.002405, Adjusted R-squared: -0.001071
## F-statistic: 0.6919 on 1 and 287 DF, p-value: 0.4062
summary(lm(unable.do.chores~condition, s))
##
## Call:
## lm(formula = unable.do.chores ~ condition, data = s)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.339 -2.339 -2.059 2.941 4.941
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.0593 0.1610 12.790 <2e-16 ***
## condition 0.2795 0.2232 1.252 0.211
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.956 on 701 degrees of freedom
## (63 observations deleted due to missingness)
## Multiple R-squared: 0.002232, Adjusted R-squared: 0.0008087
## F-statistic: 1.568 on 1 and 701 DF, p-value: 0.2109
summary(lm(money.stress~condition, s))
##
## Call:
## lm(formula = money.stress ~ condition, data = s)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3605 -1.0699 -1.0699 0.9301 2.9301
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.06989 0.07453 27.772 < 2e-16 ***
## condition 0.29063 0.10485 2.772 0.00571 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.437 on 750 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.01014, Adjusted R-squared: 0.008822
## F-statistic: 7.684 on 1 and 750 DF, p-value: 0.005709
s$hopeful<-s$qM1
s$depressed<-s$qM2
alpha(s[,c(54:55)], na.rm=TRUE, check.keys=TRUE)
## Warning in matrix(unlist(drop.item), ncol = 8, byrow = TRUE): data length
## [12] is not a sub-multiple or multiple of the number of columns [8]
##
## Reliability analysis
## Call: alpha(x = s[, c(54:55)], na.rm = TRUE, check.keys = TRUE)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd
## 0.21 0.21 0.12 0.12 0.26 0.057 2.7 1.1
##
## lower alpha upper 95% confidence boundaries
## 0.09 0.21 0.32
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se
## hopeful 0.116 0.12 0.013 0.12 NA NA
## depressed 0.013 0.12 NA NA 0.12 0.012
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## hopeful 760 0.80 0.75 0.25 0.12 3.0 1.6
## depressed 758 0.69 0.75 0.25 0.12 2.4 1.3
##
## Non missing response frequency for each item
## 1 2 3 4 5 miss
## hopeful 0.3 0.06 0.28 0.07 0.3 0.01
## depressed 0.4 0.07 0.38 0.05 0.1 0.01
summary(lm(hopeful~condition, s))
##
## Call:
## lm(formula = hopeful ~ condition, data = s)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.1774 -1.8534 0.1466 1.8226 2.1466
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.17742 0.08207 38.72 < 2e-16 ***
## condition -0.32402 0.11530 -2.81 0.00508 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.583 on 752 degrees of freedom
## (12 observations deleted due to missingness)
## Multiple R-squared: 0.01039, Adjusted R-squared: 0.009077
## F-statistic: 7.897 on 1 and 752 DF, p-value: 0.005079
summary(lm(depressed~condition, s))
##
## Call:
## lm(formula = depressed ~ condition, data = s)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4368 -1.3226 0.5632 0.6774 2.6774
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.32258 0.06875 33.782 <2e-16 ***
## condition 0.11426 0.09672 1.181 0.238
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.326 on 750 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.001858, Adjusted R-squared: 0.0005266
## F-statistic: 1.396 on 1 and 750 DF, p-value: 0.2378
table(m$Area_Type)
##
## 1 2
## 232 216
m$condition[m$Area_Type==2]<-0
m$condition[m$Area_Type==1]<-1
summary(lm(health1_rating~condition, m))
##
## Call:
## lm(formula = health1_rating ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5129 -1.4259 -0.4259 0.5741 2.5741
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.42593 0.08828 27.480 <2e-16 ***
## condition 0.08701 0.12267 0.709 0.479
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.297 on 446 degrees of freedom
## Multiple R-squared: 0.001127, Adjusted R-squared: -0.001113
## F-statistic: 0.503 on 1 and 446 DF, p-value: 0.4786
m$symptoms<-(m$health2_coughing + m$health2_fever + m$health2_appetite+m$health2_fatigue + m$health2_sputum + m$health2_sweats + m$health2_breathing)
table(m$symptoms)
##
## 0 1 2 3 4 5 6 7 889 890 894
## 41 77 68 87 67 49 47 8 2 1 1
m$symptoms[m$symptoms>7]<-NA
summary(lm(symptoms~condition, m))
##
## Call:
## lm(formula = symptoms ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.048 -1.916 -0.048 1.084 4.084
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.9163 0.1280 22.783 <2e-16 ***
## condition 0.1318 0.1782 0.739 0.46
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.877 on 442 degrees of freedom
## (4 observations deleted due to missingness)
## Multiple R-squared: 0.001235, Adjusted R-squared: -0.001025
## F-statistic: 0.5465 on 1 and 442 DF, p-value: 0.4602
Very low reliability for economic outcomes, so analyze them separately. No effects of condition on any of the economic outcomes.
alpha(m[,c(53:55)], na.rm=TRUE, check.keys=TRUE)
##
## Reliability analysis
## Call: alpha(x = m[, c(53:55)], na.rm = TRUE, check.keys = TRUE)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd
## 0.0071 0.25 0.21 0.1 0.33 0.011 3.4 24
##
## lower alpha upper 95% confidence boundaries
## -0.01 0.01 0.03
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N
## econ2_missed_work_days -0.00051 -0.0084 -0.0042 -0.0042 -0.0083
## econ3_missed_chore_days 0.35101 0.4292 0.2732 0.2732 0.7518
## econ4_worry_money 0.00789 0.0607 0.0313 0.0313 0.0647
## alpha se
## econ2_missed_work_days 0.0057
## econ3_missed_chore_days 0.0470
## econ4_worry_money 0.0118
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## econ2_missed_work_days 173 0.897 0.69 0.438 0.040 2.3 3.0
## econ3_missed_chore_days 448 0.999 0.54 0.033 0.024 4.2 47.2
## econ4_worry_money 448 0.026 0.67 0.396 0.013 2.5 1.4
m$econ<-(m$econ2_missed_work_days + m$econ3_missed_chore_days + m$econ4_worry_money)
m$econ3_missed_chore_days[m$econ3_missed_chore_days>7]<-NA
summary(lm(econ2_missed_work_days ~ condition, m))
##
## Call:
## lm(formula = econ2_missed_work_days ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.670 -2.670 -1.951 3.049 5.049
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.9512 0.3292 5.927 1.66e-08 ***
## condition 0.7191 0.4539 1.584 0.115
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.981 on 171 degrees of freedom
## (275 observations deleted due to missingness)
## Multiple R-squared: 0.01446, Adjusted R-squared: 0.008699
## F-statistic: 2.509 on 1 and 171 DF, p-value: 0.115
summary(lm(econ3_missed_chore_days ~ condition, m))
##
## Call:
## lm(formula = econ3_missed_chore_days ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.100 -2.100 -1.903 2.097 5.097
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.9028 0.1958 9.720 <2e-16 ***
## condition 0.1968 0.2723 0.723 0.47
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.877 on 445 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.001172, Adjusted R-squared: -0.001072
## F-statistic: 0.5222 on 1 and 445 DF, p-value: 0.4703
summary(lm(econ4_worry_money ~ condition, m))
##
## Call:
## lm(formula = econ4_worry_money ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5862 -1.4861 0.4138 1.4138 2.5139
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.48611 0.09763 25.465 <2e-16 ***
## condition 0.10010 0.13567 0.738 0.461
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.435 on 446 degrees of freedom
## Multiple R-squared: 0.001219, Adjusted R-squared: -0.00102
## F-statistic: 0.5443 on 1 and 446 DF, p-value: 0.461
alpha(m[,c(56:63)], na.rm=TRUE, check.keys=TRUE)
## Warning in alpha(m[, c(56:63)], na.rm = TRUE, check.keys = TRUE): Some items were negatively correlated with total scale and were automatically reversed.
## This is indicated by a negative sign for the variable name.
##
## Reliability analysis
## Call: alpha(x = m[, c(56:63)], na.rm = TRUE, check.keys = TRUE)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd
## 0.02 0.57 0.59 0.14 1.3 0.061 376 10
##
## lower alpha upper 95% confidence boundaries
## -0.1 0.02 0.14
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se
## mental1_hopeful- 0.010 0.60 0.61 0.18 1.49 0.055
## mental2_depressed 0.016 0.45 0.46 0.10 0.82 0.063
## mental3_calm- 0.017 0.46 0.48 0.11 0.86 0.063
## mental4_nervous 0.017 0.48 0.49 0.12 0.92 0.063
## mental5_concentrating 0.017 0.50 0.53 0.13 1.01 0.063
## mental6_sharp- 0.017 0.52 0.54 0.13 1.07 0.063
## mental7_control 0.021 0.60 0.61 0.18 1.51 0.054
## mental8_confidence 0.023 0.61 0.62 0.18 1.54 0.054
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## mental1_hopeful- 448 0.581 0.31 0.082 0.0121 993.9 47.0
## mental2_depressed 448 0.120 0.69 0.698 0.1041 2.5 1.3
## mental3_calm- 448 0.098 0.66 0.644 0.0834 996.6 1.2
## mental4_nervous 448 0.094 0.63 0.599 0.0773 2.5 1.4
## mental5_concentrating 448 0.095 0.57 0.476 0.0790 2.3 1.3
## mental6_sharp- 448 0.106 0.54 0.429 0.0907 996.5 1.3
## mental7_control 448 0.576 0.30 0.068 0.0055 5.7 47.1
## mental8_confidence 448 0.576 0.29 0.052 0.0044 4.4 47.1
m$mental1_hopeful[m$mental1_hopeful>7]<-NA
m$mental7_control[m$mental1_control>7]<-NA
m$mental8_confidence[m$mental8_confidence>7]<-NA
m$mental<-(m$mental1_hopeful + (6-m$mental2_depressed) + m$mental3_calm +(6-m$mental4_nervous) + m$mental5_concentrating + m$mental6_sharp +m$mental8_confidence)/7
summary(lm(mental~condition, data=m))
##
## Call:
## lm(formula = mental ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.57702 -0.37235 -0.00559 0.34193 1.70870
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.22950 0.03568 90.515 <2e-16 ***
## condition -0.08105 0.04968 -1.631 0.104
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.5244 on 444 degrees of freedom
## (2 observations deleted due to missingness)
## Multiple R-squared: 0.005958, Adjusted R-squared: 0.003719
## F-statistic: 2.661 on 1 and 444 DF, p-value: 0.1035
#LESS hopeful in the intervention condition.
summary(lm(m$mental1_hopeful~condition, data=m))
##
## Call:
## lm(formula = m$mental1_hopeful ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.98148 -0.77056 0.01852 1.01852 1.22944
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.98148 0.07431 53.58 <2e-16 ***
## condition -0.21092 0.10337 -2.04 0.0419 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.092 on 445 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.009269, Adjusted R-squared: 0.007043
## F-statistic: 4.163 on 1 and 445 DF, p-value: 0.0419
summary(lm(m$mental2_depressed~condition, data=m))
##
## Call:
## lm(formula = m$mental2_depressed ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5474 -1.4167 0.4526 0.5833 2.5833
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.41667 0.08952 26.997 <2e-16 ***
## condition 0.13075 0.12440 1.051 0.294
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.316 on 446 degrees of freedom
## Multiple R-squared: 0.002471, Adjusted R-squared: 0.0002342
## F-statistic: 1.105 on 1 and 446 DF, p-value: 0.2938
summary(lm(m$mental3_calm~condition, data=m))
##
## Call:
## lm(formula = m$mental3_calm ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.4306 -0.4306 -0.4181 0.8288 1.5819
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.43056 0.08348 41.093 <2e-16 ***
## condition -0.01245 0.11601 -0.107 0.915
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.227 on 446 degrees of freedom
## Multiple R-squared: 2.583e-05, Adjusted R-squared: -0.002216
## F-statistic: 0.01152 on 1 and 446 DF, p-value: 0.9146
summary(lm(m$mental4_nervous~condition, data=m))
##
## Call:
## lm(formula = m$mental4_nervous ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4698 -1.4676 0.5302 0.5324 2.5324
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.467593 0.092235 26.753 <2e-16 ***
## condition 0.002235 0.128172 0.017 0.986
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.356 on 446 degrees of freedom
## Multiple R-squared: 6.818e-07, Adjusted R-squared: -0.002241
## F-statistic: 0.0003041 on 1 and 446 DF, p-value: 0.9861
summary(lm(m$mental5_concentrating~condition, data=m))
##
## Call:
## lm(formula = m$mental5_concentrating ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3621 -1.3056 -0.3056 0.6944 2.6944
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.30556 0.09121 25.278 <2e-16 ***
## condition 0.05651 0.12674 0.446 0.656
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.34 on 446 degrees of freedom
## Multiple R-squared: 0.0004456, Adjusted R-squared: -0.001796
## F-statistic: 0.1988 on 1 and 446 DF, p-value: 0.6559
#LESS sharp in the intervention condition.
summary(lm(m$mental6_sharp~condition, data=m))
##
## Call:
## lm(formula = m$mental6_sharp ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.6852 -0.6852 0.3148 1.3148 1.7586
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.68519 0.08688 42.419 < 2e-16 ***
## condition -0.44381 0.12072 -3.676 0.000266 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.277 on 446 degrees of freedom
## Multiple R-squared: 0.02941, Adjusted R-squared: 0.02723
## F-statistic: 13.51 on 1 and 446 DF, p-value: 0.0002655
summary(lm(m$mental7_control~condition, data=m))
##
## Call:
## lm(formula = m$mental7_control ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.61 -4.61 -2.61 0.44 991.39
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.556 3.202 1.110 0.267
## condition 4.057 4.450 0.912 0.363
##
## Residual standard error: 47.07 on 446 degrees of freedom
## Multiple R-squared: 0.00186, Adjusted R-squared: -0.0003785
## F-statistic: 0.8309 on 1 and 446 DF, p-value: 0.3625
summary(lm(m$mental8_confidence~condition, data=m))
##
## Call:
## lm(formula = m$mental8_confidence ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.2511 -1.0880 -0.2511 0.9120 2.9120
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.08796 0.08861 23.563 <2e-16 ***
## condition 0.16312 0.12327 1.323 0.186
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.302 on 445 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.00392, Adjusted R-squared: 0.001681
## F-statistic: 1.751 on 1 and 445 DF, p-value: 0.1864
m$comprehension1[m$comprehension1==2 |m$comprehension1==888]<-0
m$comprehension1[m$comprehension1==999]<-NA
m$comprehension2[m$comprehension2==1 |m$comprehension2==888]<-0
m$comprehension2[m$comprehension2==2 ]<-1
m$comprehension3[m$comprehension3==2 |m$comprehension3==888]<-0
m$comprehension4[m$comprehension4==1 |m$comprehension4==888]<-0
m$comprehension4[m$comprehension4==2 ]<-1
m$comprehension5[m$comprehension5==1 |m$comprehension5==888]<-0
m$comprehension5[m$comprehension5==2 ]<-1
m$comprehension5[m$comprehension5==999 ]<-NA
m$comprehension6[m$comprehension6==2 | m$comprehension6==888]<-0
m$comprehension6[m$comprehension6==999 ]<-NA
m$comprehension7[m$comprehension7==999 ]<-NA
m$comprehension7[m$comprehension7==2 | m$comprehension7==888]<-0
m$comprehension8[m$comprehension8==1 |m$comprehension8==888]<-0
m$comprehension8[m$comprehension8==2 ]<-1
m$comprehension8[m$comprehension8==999 ]<-NA
m$comprehension9[m$comprehension9==1 |m$comprehension9==888]<-0
m$comprehension9[m$comprehension9==2 ]<-1
m$comprehension9[m$comprehension9==999 ]<-NA
m$comp<-(m$comprehension1 + m$comprehension2+m$comprehension4+m$comprehension3+m$comprehension5+m$comprehension6+m$comprehension7+m$comprehension8+m$comprehension9)
summary(lm(comp~condition, data=m))
##
## Call:
## lm(formula = comp ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -14.34 -8.34 -7.34 0.08 986.66
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.920 4.598 1.722 0.0857 .
## condition 8.422 6.387 1.319 0.1880
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 66.95 on 438 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.003954, Adjusted R-squared: 0.00168
## F-statistic: 1.739 on 1 and 438 DF, p-value: 0.188
alpha(m[,c(189:195)], na.rm=TRUE, check.keys=TRUE)
##
## Reliability analysis
## Call: alpha(x = m[, c(189:195)], na.rm = TRUE, check.keys = TRUE)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd
## 0.91 0.92 0.98 0.62 12 0.0069 8.5 57
##
## lower alpha upper 95% confidence boundaries
## 0.89 0.91 0.92
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N
## engagement1_interest 0.89 0.90 0.96 0.61 9.2
## engagement2_participate 0.89 0.90 0.96 0.61 9.2
## engagement3_attention 0.89 0.91 0.97 0.62 9.6
## engagment4_engrossed 0.88 0.90 0.97 0.61 9.4
## engagment5_entertaining 0.88 0.90 0.97 0.61 9.4
## engagement6_focus 0.89 0.91 0.96 0.64 10.5
## engagement7_questions 0.92 0.93 0.98 0.68 12.8
## alpha se
## engagement1_interest 0.0079
## engagement2_participate 0.0079
## engagement3_attention 0.0083
## engagment4_engrossed 0.0089
## engagment5_entertaining 0.0089
## engagement6_focus 0.0081
## engagement7_questions 0.0059
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## engagement1_interest 448 0.82 0.87 0.88 0.78 6.0 47
## engagement2_participate 448 0.82 0.87 0.88 0.78 5.8 47
## engagement3_attention 448 0.83 0.84 0.83 0.77 8.3 66
## engagment4_engrossed 448 0.88 0.86 0.87 0.82 10.4 81
## engagment5_entertaining 448 0.88 0.86 0.87 0.82 10.3 81
## engagement6_focus 448 0.81 0.79 0.77 0.73 10.2 81
## engagement7_questions 448 0.68 0.67 0.62 0.54 8.6 81
m$engaged<-(m$engagement1_interest+m$engagement2_participate+m$engagement3_attention+m$engagment4_engrossed+m$engagment5_entertaining+m$engagement6_focus+m$engagement7_questions)/7
summary(lm(engaged~condition, m))
##
## Call:
## lm(formula = engaged ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -11.07 -8.36 -3.42 -1.63 986.93
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 12.073 3.864 3.124 0.0019 **
## condition -6.871 5.370 -1.279 0.2014
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 56.79 on 446 degrees of freedom
## Multiple R-squared: 0.003657, Adjusted R-squared: 0.001423
## F-statistic: 1.637 on 1 and 446 DF, p-value: 0.2014
alpha(m[,c(196:201)], na.rm=TRUE, check.keys=TRUE)
## Warning in alpha(m[, c(196:201)], na.rm = TRUE, check.keys = TRUE): Some items were negatively correlated with total scale and were automatically reversed.
## This is indicated by a negative sign for the variable name.
##
## Reliability analysis
## Call: alpha(x = m[, c(196:201)], na.rm = TRUE, check.keys = TRUE)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd
## 0.0058 0.16 0.14 0.03 0.19 0.068 335 19
##
## lower alpha upper 95% confidence boundaries
## -0.13 0.01 0.14
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N
## desensitize1_worry 0.00917 0.165 0.141 0.038 0.198
## desensitize2_cure 0.00649 0.155 0.133 0.035 0.184
## desensitize3_afraid 0.00393 0.081 0.068 0.017 0.088
## desensitize4_identity 0.00467 0.146 0.125 0.033 0.170
## desensitize5_healthy- 0.00428 0.079 0.067 0.017 0.086
## desensitize6_threatened- 0.00032 0.177 0.152 0.041 0.215
## alpha se
## desensitize1_worry 0.066
## desensitize2_cure 0.066
## desensitize3_afraid 0.071
## desensitize4_identity 0.067
## desensitize5_healthy- 0.071
## desensitize6_threatened- 0.066
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## desensitize1_worry 448 0.406 0.41 0.079 -0.0017 4.8 47.09
## desensitize2_cure 448 0.576 0.42 0.108 0.0015 8.0 66.45
## desensitize3_afraid 448 0.087 0.49 0.308 0.0757 2.5 1.31
## desensitize4_identity 448 0.410 0.43 0.134 0.0024 4.2 47.12
## desensitize5_healthy- 448 0.095 0.49 0.312 0.0872 995.8 0.95
## desensitize6_threatened- 448 0.580 0.40 0.044 0.0050 993.0 66.51
m$desensitize1_worry[m$desensitize1_worry>5]<-NA
m$desensitize2_cure[m$desensitize2_cure>5]<-NA
m$desensitize4_identity[m$desensitize4_identity>5]<-NA
m$desensitize6_threatened[m$desensitize6_threatened>5]<-NA
#Marginally higher worry in the intervention condition.
summary(lm(m$desensitize1_worry ~ m$condition))
##
## Call:
## lm(formula = m$desensitize1_worry ~ m$condition)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6897 -1.4930 0.3103 1.3103 2.5070
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.49302 0.08513 29.284 <2e-16 ***
## m$condition 0.19663 0.11817 1.664 0.0968 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.248 on 445 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.006184, Adjusted R-squared: 0.00395
## F-statistic: 2.769 on 1 and 445 DF, p-value: 0.09682
summary(lm(m$desensitize2_cure ~ m$condition))
##
## Call:
## lm(formula = m$desensitize2_cure ~ m$condition)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.5694 -0.5694 0.4306 0.5000 1.5000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.56944 0.07939 44.961 <2e-16 ***
## m$condition -0.06944 0.11055 -0.628 0.53
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.167 on 444 degrees of freedom
## (2 observations deleted due to missingness)
## Multiple R-squared: 0.0008879, Adjusted R-squared: -0.001362
## F-statistic: 0.3946 on 1 and 444 DF, p-value: 0.5302
#Marginally more afraid in the intervention condition.
summary(lm(m$desensitize3_afraid ~ m$condition))
##
## Call:
## lm(formula = m$desensitize3_afraid ~ m$condition)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5862 -1.3657 -0.3657 0.8291 2.6343
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.36574 0.08896 26.593 <2e-16 ***
## m$condition 0.22047 0.12362 1.783 0.0752 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.307 on 446 degrees of freedom
## Multiple R-squared: 0.007081, Adjusted R-squared: 0.004855
## F-statistic: 3.181 on 1 and 446 DF, p-value: 0.0752
summary(lm(m$desensitize4_identity ~ m$condition))
##
## Call:
## lm(formula = m$desensitize4_identity ~ m$condition)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.0000 -1.0000 -0.8657 1.0000 3.1343
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.86574 0.07987 23.361 <2e-16 ***
## m$condition 0.13426 0.11110 1.208 0.228
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.174 on 445 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.003271, Adjusted R-squared: 0.001031
## F-statistic: 1.46 on 1 and 445 DF, p-value: 0.2275
summary(lm(m$desensitize5_healthy ~ m$condition))
##
## Call:
## lm(formula = m$desensitize5_healthy ~ m$condition)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2315 -0.2315 -0.1552 0.8448 0.8448
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.23148 0.06499 65.114 <2e-16 ***
## m$condition -0.07631 0.09031 -0.845 0.399
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9551 on 446 degrees of freedom
## Multiple R-squared: 0.001598, Adjusted R-squared: -0.0006401
## F-statistic: 0.714 on 1 and 446 DF, p-value: 0.3986
summary(lm(m$desensitize6_threatened ~ m$condition))
##
## Call:
## lm(formula = m$desensitize6_threatened ~ m$condition)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6652 -1.5093 -0.5093 1.3348 2.4907
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.50926 0.08563 29.304 <2e-16 ***
## m$condition 0.15596 0.11924 1.308 0.192
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.258 on 444 degrees of freedom
## (2 observations deleted due to missingness)
## Multiple R-squared: 0.003838, Adjusted R-squared: 0.001594
## F-statistic: 1.711 on 1 and 444 DF, p-value: 0.1916
alpha(m[,c(202:207)], na.rm=TRUE, check.keys=TRUE)
##
## Reliability analysis
## Call: alpha(x = m[, c(202:207)], na.rm = TRUE, check.keys = TRUE)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd
## 0.83 0.87 0.89 0.54 6.9 0.012 8.5 53
##
## lower alpha upper 95% confidence boundaries
## 0.81 0.83 0.86
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se
## storytelling1 0.83 0.88 0.90 0.59 7.1 0.013
## storytelling2 0.78 0.82 0.81 0.47 4.4 0.016
## storytelling3 0.83 0.88 0.89 0.59 7.0 0.013
## storytelling4 0.80 0.86 0.88 0.56 6.3 0.015
## storytelling5 0.81 0.86 0.88 0.55 6.1 0.014
## storytelling6 0.78 0.82 0.81 0.47 4.4 0.016
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## storytelling1 448 0.68 0.67 0.56 0.50 9.6 81
## storytelling2 448 0.88 0.93 0.98 0.85 5.6 47
## storytelling3 448 0.73 0.68 0.58 0.54 12.3 94
## storytelling4 448 0.76 0.74 0.65 0.62 10.5 81
## storytelling5 448 0.73 0.76 0.69 0.60 8.2 66
## storytelling6 448 0.88 0.93 0.98 0.84 4.8 47
m$storytelling1[m$storytelling1>5]<-NA
m$storytelling2[m$storytelling2>5]<-NA
m$storytelling3[m$storytelling3>5]<-NA
m$storytelling4[m$storytelling4>5]<-NA
m$storytelling5[m$storytelling5>5]<-NA
m$storytelling6[m$storytelling6>5]<-NA
m$story<-(m$storytelling1+m$storytelling2+m$storytelling3+m$storytelling4+m$storytelling5+m$storytelling6)/6
summary(lm(story~condition, m))
##
## Call:
## lm(formula = story ~ condition, data = m)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.1580 -0.4716 0.1019 0.5087 1.6950
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.32464 0.04767 69.742 <2e-16 ***
## condition -0.01970 0.06608 -0.298 0.766
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6925 on 438 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.0002028, Adjusted R-squared: -0.00208
## F-statistic: 0.08884 on 1 and 438 DF, p-value: 0.7658
#merge
summary(lm(overall.health ~ condition * Age + condition*Gender + condition*education, all))
summary(lm(symptoms ~ condition * Age + condition*Gender + condition*education, all))
summary(lm(unable.to.work ~ condition * Age + condition*Gender + condition*education, all))
summary(lm(unable.do.chores ~ condition * Age + condition*Gender + condition*education, all))
summary(lm(money.stress ~ condition * Age + condition*Gender + condition*education, all))
summary(lm(depressed ~ condition * Age + condition*Gender + condition*education, all))
summary(lm(hopeful ~ condition * Age + condition*Gender + condition*education, all))
summary(lm(social ~ condition * Age + condition*Gender + condition*education, all))
summary(lm(rejected ~ condition * Age + condition*Gender + condition*education, all))
m$tech2_computer[m$tech2_computer>1]<-NA
m$tech6_tablet_freq[m$tech6_tablet_freq>4]<-NA
m$drink_alcohol[m$drink_alcohol>1]<-NA
summary(lm(overall.health ~ condition * tech1_watch_tv + condition*tech2_computer + condition*tech3_smartphone + condition*tech5_tablet + condition * smoker + condition*drink_alcohol , all))
#some interactions are significant here
summary(lm(symptoms ~ condition * tech1_watch_tv + condition*tech2_computer + condition*tech3_smartphone + condition*tech5_tablet + condition * smoker + condition*drink_alcohol , all))
#here too
summary(lm(unable.to.work ~ condition * tech1_watch_tv + condition*tech2_computer + condition*tech3_smartphone + condition*tech5_tablet + condition * smoker + condition*drink_alcohol , all))
#here too
summary(lm(unable.do.chores ~ condition * tech1_watch_tv + condition*tech2_computer + condition*tech3_smartphone + condition*tech5_tablet + condition * smoker + condition*drink_alcohol , all))
#here too
summary(lm(money.stress~ condition * tech1_watch_tv + condition*tech2_computer + condition*tech3_smartphone + condition*tech5_tablet + condition * smoker + condition*drink_alcohol , all))
#here too
summary(lm(depressed ~ condition * tech1_watch_tv + condition*tech2_computer + condition*tech3_smartphone + condition*tech5_tablet + condition * smoker + condition*drink_alcohol , all))
summary(lm(hopeful ~ condition * tech1_watch_tv + condition*tech2_computer + condition*tech3_smartphone + condition*tech5_tablet + condition * smoker + condition*drink_alcohol , all))
summary(lm(social ~ condition * tech1_watch_tv + condition*tech2_computer + condition*tech3_smartphone + condition*tech5_tablet + condition * smoker + condition*drink_alcohol , all))
summary(lm(rejected ~ condition * tech1_watch_tv + condition*tech2_computer + condition*tech3_smartphone + condition*tech5_tablet + condition * smoker + condition*drink_alcohol , all))
table(m$tech1_watch_tv)
TVeveryday<-subset(all, tech1_watch_tv==1)
TVnoteveryday<-subset(all, tech1_watch_tv!=1)
summary(lm(money.stress ~ condition, data=TVeveryday))
summary(lm(money.stress ~ condition, data=TVnoteveryday))
#condition had the desired effect among people who don't watch TV every day (although the sample is small, about 75)
summary(lm(unable.do.chores ~ condition, data=TVeveryday))
summary(lm(unable.do.chores ~ condition, data=TVnoteveryday))
Social outcomes. Very low reliability so analyze them separately.