##
## Attaching package: 'olsrr'
## The following object is masked from 'package:datasets':
##
## rivers
## Loading required package: lattice
## Loading required package: survival
## Loading required package: Formula
## Loading required package: ggplot2
##
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:base':
##
## format.pval, units
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:Hmisc':
##
## src, summarize
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
##
## Attaching package: 'reshape'
## The following object is masked from 'package:dplyr':
##
## rename
##
## Attaching package: 'tidyr'
## The following objects are masked from 'package:reshape':
##
## expand, smiths
## The following object is masked from 'package:mice':
##
## complete
##
## Attaching package: 'psych'
## The following object is masked from 'package:Hmisc':
##
## describe
## The following objects are masked from 'package:ggplot2':
##
## %+%, alpha
##
## Attaching package: 'matrixStats'
## The following object is masked from 'package:dplyr':
##
## count
##
## Attaching package: 'e1071'
## The following object is masked from 'package:Hmisc':
##
## impute
## corrplot 0.84 loaded
## -------------------------------------------------------------------------
## You have loaded plyr after dplyr - this is likely to cause problems.
## If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
## library(plyr); library(dplyr)
## -------------------------------------------------------------------------
##
## Attaching package: 'plyr'
## The following object is masked from 'package:purrr':
##
## compact
## The following object is masked from 'package:matrixStats':
##
## count
## The following objects are masked from 'package:reshape':
##
## rename, round_any
## The following objects are masked from 'package:dplyr':
##
## arrange, count, desc, failwith, id, mutate, rename, summarise,
## summarize
## The following objects are masked from 'package:Hmisc':
##
## is.discrete, summarize
ptq_rrall <- lm(all4$ptq_total ~ all4$nd_resprate)
summary(ptq_rrall)
##
## Call:
## lm(formula = all4$ptq_total ~ all4$nd_resprate)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.713 -8.399 -0.764 6.146 36.647
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 28.530 4.348 6.562 7.33e-10 ***
## all4$nd_resprate -8.962 5.492 -1.632 0.105
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.65 on 157 degrees of freedom
## Multiple R-squared: 0.01668, Adjusted R-squared: 0.01041
## F-statistic: 2.663 on 1 and 157 DF, p-value: 0.1047
hist(all4$ptq_total, main = "Distribution of ptq scores for all subjects enrolled", xlab = "ptq total score")
ggplot(all4, aes(x=all4$ptq_total, y=all4$nd_resprate)) +
geom_point(shape=1) +
geom_smooth(color= "#CC0066", method=lm) +
labs(x = "PTQ score", y = "response rate",
title = "Relationship between total PTQ score and response rate") +
theme_classic()
ptq_rr75 <- lm(all_75$ptq_total ~ all_75$nd_resprate)
summary(ptq_rr75)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$nd_resprate)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.727 -7.954 -0.940 5.453 33.381
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 13.802 12.859 1.073 0.286
## all_75$nd_resprate 9.084 14.975 0.607 0.545
##
## Residual standard error: 11.51 on 106 degrees of freedom
## Multiple R-squared: 0.00346, Adjusted R-squared: -0.005942
## F-statistic: 0.368 on 1 and 106 DF, p-value: 0.5454
hist(all_75$ptq_total, xlab = "ptq score", main ="Hist of ptq score distribution for 75% response rate")
ggplot(all_75, aes(x=all_75$ptq_total, y=all_75$nd_resprate)) +
geom_point(shape=1) +
geom_smooth(color= "blue", method=lm) +
labs(x = "PTQ score", y = "response rate",
title = "Relationship between total PTQ score and response rate for 75% responders") +
theme_classic()
ptq_rr70 <- lm(all_70$ptq_total ~ all_70$nd_resprate)
summary(ptq_rr70)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$nd_resprate)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.605 -7.868 -1.862 4.976 32.997
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.195 10.089 0.911 0.364
## all_70$nd_resprate 14.226 12.037 1.182 0.239
##
## Residual standard error: 11.34 on 128 degrees of freedom
## Multiple R-squared: 0.0108, Adjusted R-squared: 0.003067
## F-statistic: 1.397 on 1 and 128 DF, p-value: 0.2394
hist(all_70$ptq_total, xlab = "ptq score", main ="Hist of ptq score distribution for 70% response rate")
ggplot(all_70, aes(x=all_70$ptq_total, y=all_70$nd_resprate)) +
geom_point(shape=1) +
geom_smooth(color= "green", method=lm) +
labs(x = "PTQ score", y = "response rate",
title = "Relationship between total PTQ score and response rate for 70% response rate") +
theme_classic()
skewness(all_70$ptq_total, na.rm=T)
## [1] 0.617506
skewness(all_70$PA_R_Mean)
## [1] 0.4981497
skewness(all_70$PA_R_MSSD)
## [1] 1.387316
skewness(all_70$NA_R_Mean)
## [1] -0.2691784
skewness(all_70$NA_R_MSSD)
## [1] 1.229989
kurtosis(all_70$ptq_total, na.rm = T)
## [1] 0.1395027
kurtosis(all_70$PA_R_Mean)
## [1] 0.4459975
kurtosis(all_70$PA_R_MSSD)
## [1] 2.023582
kurtosis(all_70$NA_R_Mean)
## [1] -0.4356086
kurtosis(all_70$NA_R_MSSD)
## [1] 1.263268
sd(all_70$ptq_total)
## [1] 11.35867
sd(all_70$PA_R_Mean)
## [1] 10.13314
sd(all_70$NA_R_Mean)
## [1] 12.9577
sd(all_70$PA_R_MSSD)
## [1] 257.7285
sd(all_70$NA_R_MSSD)
## [1] 278.3159
mean(all_70$ptq_total)
## [1] 21.06154
mean(all_70$PA_R_Mean)
## [1] 56.03002
mean(all_70$NA_R_Mean)
## [1] 37.70309
mean(all_70$PA_R_MSmean)
## Warning in mean.default(all_70$PA_R_MSmean): argument is not numeric or
## logical: returning NA
## [1] NA
sd(all_70$NA_R_MSSD)
## [1] 278.3159
col_means <- colMeans(all_70, na.rm=T)
col_sd <- apply(all_70,2, sd, na.rm=TRUE)
m.ptq2 <- lm(all_70$ptq_total ~ all_70$NA_R_Mean)
summary(m.ptq2)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$NA_R_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.747 -7.743 -1.659 5.664 32.574
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.62165 2.92963 3.626 0.000415 ***
## all_70$NA_R_Mean 0.27690 0.07351 3.767 0.000251 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.82 on 128 degrees of freedom
## Multiple R-squared: 0.09978, Adjusted R-squared: 0.09275
## F-statistic: 14.19 on 1 and 128 DF, p-value: 0.0002513
confint(m.ptq2, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 4.8248741 16.4184183
## all_70$NA_R_Mean 0.1314378 0.4223573
summary(influence.measures(m.ptq2))
## Potentially influential observations of
## lm(formula = all_70$ptq_total ~ all_70$NA_R_Mean) :
##
## dfb.1_ dfb.a_70 dffit cov.r cook.d hat
## 1 -0.28 0.26 -0.28 1.06_* 0.04 0.06_*
## 14 -0.04 0.12 0.27 0.91_* 0.04 0.01
## 29 0.45 -0.38 0.46_* 0.92_* 0.10 0.03
## 33 0.02 -0.02 0.02 1.05_* 0.00 0.03
## 47 -0.02 0.02 -0.02 1.07_* 0.00 0.05_*
## 49 -0.02 0.02 0.03 1.06_* 0.00 0.04
## 76 0.20 -0.14 0.25 0.95_* 0.03 0.01
## 108 -0.04 0.05 0.06 1.05_* 0.00 0.03
## 110 -0.01 0.01 -0.01 1.09_* 0.00 0.06_*
## 113 -0.08 0.18 0.33 0.89_* 0.05 0.01
## 120 0.07 -0.07 0.08 1.05_* 0.00 0.03
m.ptq4 <- lm(all_70$ptq_total ~ all_70$PA_R_Mean)
summary(m.ptq4)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$PA_R_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.444 -8.290 -1.089 6.398 34.960
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 32.62162 5.54436 5.884 3.3e-08 ***
## all_70$PA_R_Mean -0.20632 0.09739 -2.119 0.0361 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.21 on 128 degrees of freedom
## Multiple R-squared: 0.03388, Adjusted R-squared: 0.02633
## F-statistic: 4.488 on 1 and 128 DF, p-value: 0.03606
confint(m.ptq4, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 21.6511594 43.59207306
## all_70$PA_R_Mean -0.3990133 -0.01362536
summary(influence.measures(m.ptq4))
## Potentially influential observations of
## lm(formula = all_70$ptq_total ~ all_70$PA_R_Mean) :
##
## dfb.1_ dfb.a_70 dffit cov.r cook.d hat
## 1 0.41 -0.44 -0.46_* 1.12_* 0.10 0.12_*
## 3 0.01 -0.01 -0.01 1.07_* 0.00 0.05_*
## 9 0.04 -0.05 -0.05 1.05_* 0.00 0.04
## 14 -0.15 0.20 0.33 0.90_* 0.05 0.01
## 70 -0.09 0.12 0.23 0.95_* 0.03 0.01
## 76 -0.39 0.43 0.48_* 0.97 0.11 0.04
## 85 0.37 -0.35 0.38_* 1.01 0.07 0.04
## 103 -0.08 0.12 0.25 0.93_* 0.03 0.01
## 113 0.05 0.00 0.29 0.87_* 0.04 0.01
m.ptq1 <- lm(all_70$ptq_total ~ all_70$NA_R_MSSD)
summary(m.ptq1)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$NA_R_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.441 -8.283 -1.288 6.467 29.126
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 16.853431 1.713226 9.837 < 2e-16 ***
## all_70$NA_R_MSSD 0.010382 0.003489 2.976 0.00349 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.03 on 128 degrees of freedom
## Multiple R-squared: 0.06471, Adjusted R-squared: 0.0574
## F-statistic: 8.856 on 1 and 128 DF, p-value: 0.003494
confint(m.ptq1, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 13.46352198 20.24334083
## all_70$NA_R_MSSD 0.00347878 0.01728459
summary(influence.measures(m.ptq1))
## Potentially influential observations of
## lm(formula = all_70$ptq_total ~ all_70$NA_R_MSSD) :
##
## dfb.1_ dfb.a_70 dffit cov.r cook.d hat
## 14 -0.09 0.27 0.35 0.93_* 0.06 0.02
## 19 0.29 -0.21 0.30 0.94_* 0.04 0.02
## 29 0.23 -0.14 0.25 0.94_* 0.03 0.01
## 76 -0.18 0.31 0.33 1.04 0.05 0.05_*
## 85 0.20 -0.10 0.23 0.94_* 0.03 0.01
## 87 0.04 -0.07 -0.07 1.09_* 0.00 0.07_*
## 93 0.17 -0.28 -0.29 1.07_* 0.04 0.06_*
## 103 0.17 -0.05 0.23 0.93_* 0.03 0.01
## 106 -0.04 0.07 0.07 1.09_* 0.00 0.07_*
## 113 -0.27 0.50 0.56_* 0.94_* 0.15 0.04
## 118 0.21 -0.32 -0.33 1.10_* 0.05 0.09_*
## 122 0.03 -0.05 -0.06 1.06_* 0.00 0.04
## 123 0.00 0.00 0.00 1.06_* 0.00 0.04
## 124 0.15 -0.24 -0.25 1.09_* 0.03 0.08_*
m.ptq3 <- lm(all_70$ptq_total ~ all_70$PA_R_MSSD)
summary(m.ptq3)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$PA_R_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.790 -8.493 -0.740 6.508 32.585
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.390229 1.725584 10.657 <2e-16 ***
## all_70$PA_R_MSSD 0.007250 0.003842 1.887 0.0615 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.25 on 128 degrees of freedom
## Multiple R-squared: 0.02706, Adjusted R-squared: 0.01946
## F-statistic: 3.56 on 1 and 128 DF, p-value: 0.06145
confint(m.ptq3, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 14.9758649027 21.80459219
## all_70$PA_R_MSSD -0.0003530751 0.01485264
summary(influence.measures(m.ptq3))
## Potentially influential observations of
## lm(formula = all_70$ptq_total ~ all_70$PA_R_MSSD) :
##
## dfb.1_ dfb.a_70 dffit cov.r cook.d hat
## 2 0.21 -0.31 -0.32 1.12_* 0.05 0.11_*
## 14 -0.15 0.34 0.41_* 0.94_* 0.08 0.02
## 29 0.12 -0.02 0.19 0.95_* 0.02 0.01
## 32 0.10 -0.18 -0.20 1.05_* 0.02 0.04
## 76 -0.25 0.41 0.43_* 1.06_* 0.09 0.07_*
## 85 0.30 -0.22 0.30 0.95_* 0.04 0.02
## 93 0.11 -0.18 -0.20 1.07_* 0.02 0.06_*
## 103 0.24 -0.13 0.26 0.93_* 0.03 0.01
## 106 -0.09 0.14 0.14 1.10_* 0.01 0.08_*
## 113 -0.12 0.34 0.43_* 0.90_* 0.09 0.02
## 118 0.09 -0.14 -0.15 1.08_* 0.01 0.07_*
## 123 -0.02 0.04 0.04 1.06_* 0.00 0.04
## 124 0.11 -0.17 -0.18 1.11_* 0.02 0.09_*
m.NA_all <- lm(all_70$ptq_total ~ all_70$NA_R_MSSD + all_70$NA_R_Mean)
summary(m.NA_all)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$NA_R_MSSD + all_70$NA_R_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.679 -7.507 -1.719 5.869 30.859
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.263466 3.082049 2.357 0.019967 *
## all_70$NA_R_MSSD 0.009562 0.003338 2.865 0.004881 **
## all_70$NA_R_Mean 0.263163 0.071688 3.671 0.000354 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.53 on 127 degrees of freedom
## Multiple R-squared: 0.1544, Adjusted R-squared: 0.1411
## F-statistic: 11.6 on 2 and 127 DF, p-value: 2.366e-05
confint(m.NA_all, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 1.164646581 13.3622854
## all_70$NA_R_MSSD 0.002957848 0.0161669
## all_70$NA_R_Mean 0.121305879 0.4050204
m.PA_all <- lm(all_70$ptq_total ~ all_70$PA_R_MSSD + all_70$PA_R_Mean)
summary(m.PA_all)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$PA_R_MSSD + all_70$PA_R_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.240 -8.127 -1.593 6.442 32.453
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 30.387013 5.585791 5.440 2.64e-07 ***
## all_70$PA_R_MSSD 0.007724 0.003788 2.039 0.0435 *
## all_70$PA_R_Mean -0.217234 0.096355 -2.255 0.0259 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.07 on 127 degrees of freedom
## Multiple R-squared: 0.0645, Adjusted R-squared: 0.04977
## F-statistic: 4.378 on 2 and 127 DF, p-value: 0.0145
confint(m.PA_all, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 19.3337399920 41.44028593
## all_70$PA_R_MSSD 0.0002277189 0.01522085
## all_70$PA_R_Mean -0.4079033429 -0.02656460
m_all <-lm(all_70$ptq_total ~ all_70$PA_R_MSSD + all_70$PA_R_Mean + all_70$NA_R_MSSD + all_70$NA_R_Mean)
summary(m_all)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$PA_R_MSSD + all_70$PA_R_Mean +
## all_70$NA_R_MSSD + all_70$NA_R_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.345 -6.963 -1.990 6.074 30.477
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 11.643253 8.153949 1.428 0.15581
## all_70$PA_R_MSSD -0.003932 0.006084 -0.646 0.51926
## all_70$PA_R_Mean -0.057586 0.107369 -0.536 0.59268
## all_70$NA_R_MSSD 0.012643 0.005645 2.240 0.02687 *
## all_70$NA_R_Mean 0.237886 0.084093 2.829 0.00544 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.58 on 125 degrees of freedom
## Multiple R-squared: 0.1593, Adjusted R-squared: 0.1324
## F-statistic: 5.922 on 4 and 125 DF, p-value: 0.0002136
confint(m_all, level=0.95)
## 2.5 % 97.5 %
## (Intercept) -4.494423560 27.780928892
## all_70$PA_R_MSSD -0.015973766 0.008109051
## all_70$PA_R_Mean -0.270082829 0.154910920
## all_70$NA_R_MSSD 0.001471469 0.023814656
## all_70$NA_R_Mean 0.071454743 0.404317494
#### Correlation matrix of the individual item mssd
#### Correlation matrix of the individual item means and mssd
means.pca <- prcomp(na.omit(indiv_means),
center = TRUE,
scale = TRUE)
print(means.pca)
## Standard deviations (1, .., p=10):
## [1] 2.4314404 1.4560817 0.8282742 0.6657619 0.5304782 0.4939907 0.3839744
## [8] 0.2750958 0.2233084 0.2005800
##
## Rotation (n x k) = (10 x 10):
## PC1 PC2 PC3 PC4 PC5
## anxious_mean 0.3288094 -0.3162490 0.251999500 -0.37479636 0.14788507
## nervous_mean 0.3291338 -0.3326932 0.224616318 -0.16367606 0.09674457
## upset_mean 0.3428561 -0.2704493 -0.003171761 0.48517546 -0.05170728
## sluggish_mean 0.3018074 -0.2095316 -0.613274781 -0.19606325 0.12240297
## irritable_mean 0.3444031 -0.2761856 -0.178622381 0.26653394 0.12332698
## content_mean -0.3403434 -0.3094750 -0.126066245 -0.31309278 0.21995902
## relaxed_mean -0.3274357 -0.1575449 -0.459800059 0.39729640 0.25862471
## excited_mean -0.2104801 -0.5095268 0.006499109 0.06413939 -0.79977709
## happy_mean -0.3396801 -0.3249538 -0.094695226 -0.32434484 0.11799716
## attentive_mean -0.2712409 -0.3319176 0.491633576 0.35025206 0.40874123
## PC6 PC7 PC8 PC9
## anxious_mean -0.19218768 0.02887847 -0.40139279 -0.26993827
## nervous_mean -0.39526389 0.36301498 0.14659770 0.33977975
## upset_mean -0.16981279 -0.13475205 0.60574012 -0.33361373
## sluggish_mean 0.51781077 0.39352968 0.10012930 -0.04173951
## irritable_mean 0.13240365 -0.62407196 -0.40652534 0.24277066
## content_mean -0.06541904 -0.30833760 0.39282730 0.50463524
## relaxed_mean -0.49586590 0.28915957 -0.30339555 -0.01782858
## excited_mean 0.08903964 0.10741780 -0.14717361 0.09169001
## happy_mean -0.04270792 -0.25431502 0.06987057 -0.61336254
## attentive_mean 0.48210018 0.22359914 -0.04773894 0.01048353
## PC10
## anxious_mean -0.542468428
## nervous_mean 0.519066180
## upset_mean -0.214509289
## sluggish_mean -0.026793660
## irritable_mean 0.236125370
## content_mean -0.343173637
## relaxed_mean -0.099775777
## excited_mean -0.052414976
## happy_mean 0.450928800
## attentive_mean -0.001875378
biplot(means.pca, scale = 0)
screeplot(means.pca)
#### PCA for item mssd
mssd.pca <- prcomp(na.omit(indiv_mssd),
center = TRUE,
scale. = TRUE)
print(mssd.pca)
## Standard deviations (1, .., p=10):
## [1] 2.4459791 1.2642974 0.7374592 0.6525924 0.6378996 0.5651048 0.4925840
## [8] 0.4468800 0.4174235 0.3258416
##
## Rotation (n x k) = (10 x 10):
## PC1 PC2 PC3 PC4 PC5
## anxious_mssd 0.3546079 -0.04611443 0.01898725 -0.277634466 0.46200992
## nervous_mssd 0.1781945 -0.63727121 0.32467451 -0.140119744 0.03304126
## upset_mssd 0.3245190 0.22020145 0.33296354 0.516243494 -0.17141724
## sluggish_mssd 0.1582614 -0.66860405 0.02272665 0.197739199 -0.06954507
## irritable_mssd 0.3419508 0.04746217 -0.09204012 0.647395461 0.27156888
## content_mssd 0.3639421 0.12472986 0.25313005 -0.199876382 -0.37944890
## relaxed_mssd 0.3434314 0.14959138 -0.10369632 -0.197001435 0.57070530
## excited_mssd 0.3574752 0.06779624 -0.15494906 -0.200009642 -0.16930006
## happy_mssd 0.3543192 0.18650605 0.25519473 -0.244458107 -0.26164847
## attentive_mssd 0.3024578 -0.12911310 -0.78128870 0.005725822 -0.33268096
## PC6 PC7 PC8 PC9
## anxious_mssd -0.35852032 0.242072789 -0.20582851 -0.58544330
## nervous_mssd -0.33964052 -0.100023263 -0.23064157 0.50728384
## upset_mssd -0.33297756 -0.496817195 0.06918617 -0.18201683
## sluggish_mssd 0.45246366 -0.032825697 0.33850803 -0.39936396
## irritable_mssd 0.15978642 0.460616220 -0.22426101 0.25208364
## content_mssd -0.03932306 0.163236568 0.19855328 -0.08190800
## relaxed_mssd 0.17607491 -0.376696049 0.46600508 0.29592554
## excited_mssd 0.46285885 -0.374454493 -0.64698275 -0.04356097
## happy_mssd 0.19088505 0.403141792 0.18711210 0.20044482
## attentive_mssd -0.36297972 0.006196424 0.15681177 0.08599333
## PC10
## anxious_mssd -0.0947989560
## nervous_mssd 0.0100267606
## upset_mssd -0.2093432058
## sluggish_mssd -0.0598999017
## irritable_mssd 0.1671432739
## content_mssd 0.7277753549
## relaxed_mssd 0.0823121705
## excited_mssd 0.0009152523
## happy_mssd -0.6100654663
## attentive_mssd -0.0833678625
biplot(mssd.pca, scale = 0)
screeplot(mssd.pca)
circum_group<- all_70[c("NAD_Mean", "NAA_Mean", "PAA_Mean", "PAD_Mean", "NAD_MSSD", "NAA_MSSD",
"PAA_MSSD", "PAD_MSSD")]
circum_group <- data.frame(circum_group)
View(indiv_means)
circum_group_cor <- cor(circum_group, y= NULL, use="complete.obs", method = "pearson")
corrplot(circum_group_cor, type = "upper", order = "hclust",
tl.col = "black")
View(circum_group_cor)
ptq_paa <- lm(all_70$ptq_total ~ all_70$PAA_Mean)
summary(ptq_paa)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$PAA_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.547 -8.838 -0.792 6.441 34.679
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 31.1772 5.2973 5.885 3.27e-08 ***
## all_70$PAA_Mean -0.1850 0.0952 -1.944 0.0541 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.24 on 128 degrees of freedom
## Multiple R-squared: 0.02866, Adjusted R-squared: 0.02108
## F-statistic: 3.777 on 1 and 128 DF, p-value: 0.05415
confint(ptq_paa, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 20.6955422 41.658804746
## all_70$PAA_Mean -0.3733804 0.003346216
ptq_pad <- lm(all_70$ptq_total ~ all_70$PAD_Mean)
summary(ptq_pad)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$PAD_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.187 -8.497 -1.647 6.000 35.365
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 31.55340 5.17972 6.092 1.22e-08 ***
## all_70$PAD_Mean -0.18069 0.08758 -2.063 0.0411 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.22 on 128 degrees of freedom
## Multiple R-squared: 0.03218, Adjusted R-squared: 0.02462
## F-statistic: 4.256 on 1 and 128 DF, p-value: 0.04112
confint(ptq_pad, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 21.304430 41.802369501
## all_70$PAD_Mean -0.353993 -0.007396728
ptq_naa <- lm(all_70$ptq_total ~ all_70$NAA_Mean)
summary(ptq_naa)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$NAA_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.010 -7.530 -1.885 5.465 32.211
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.49141 2.76439 3.795 0.000227 ***
## all_70$NAA_Mean 0.28757 0.07072 4.067 8.28e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.73 on 128 degrees of freedom
## Multiple R-squared: 0.1144, Adjusted R-squared: 0.1075
## F-statistic: 16.54 on 1 and 128 DF, p-value: 8.281e-05
confint(ptq_naa, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 5.0215925 15.9612371
## all_70$NAA_Mean 0.1476497 0.4274956
ptq_nad <- lm(all_70$ptq_total ~ all_70$NAD_Mean)
summary(ptq_nad)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$NAD_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.199 -8.879 -1.868 6.472 31.247
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 14.41464 3.99031 3.612 0.000518 ***
## all_70$NAD_Mean 0.12159 0.08862 1.372 0.173761
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.57 on 83 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.02218, Adjusted R-squared: 0.0104
## F-statistic: 1.882 on 1 and 83 DF, p-value: 0.1738
confint(ptq_nad, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 6.47806010 22.3512118
## all_70$NAD_Mean -0.05467812 0.2978649
ptq_paa_mssd <- lm(all_70$ptq_total ~ all_70$PAA_MSSD)
summary(ptq_paa_mssd)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$PAA_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.139 -7.964 -0.903 6.694 33.900
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.859352 1.765708 10.681 <2e-16 ***
## all_70$PAA_MSSD 0.005396 0.003580 1.507 0.134
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.3 on 128 degrees of freedom
## Multiple R-squared: 0.01744, Adjusted R-squared: 0.009761
## F-statistic: 2.272 on 1 and 128 DF, p-value: 0.1342
confint(ptq_paa_mssd, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 15.365596337 22.35310672
## all_70$PAA_MSSD -0.001688138 0.01248028
ptq_pad_mssd <- lm(all_70$ptq_total ~ all_70$PAD_MSSD)
summary(ptq_pad_mssd)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$PAD_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.930 -8.044 -1.068 6.144 32.222
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.069991 1.763150 10.249 <2e-16 ***
## all_70$PAD_MSSD 0.005336 0.002609 2.045 0.0429 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.22 on 128 degrees of freedom
## Multiple R-squared: 0.03164, Adjusted R-squared: 0.02407
## F-statistic: 4.182 on 1 and 128 DF, p-value: 0.04291
confint(ptq_pad_mssd, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 1.458130e+01 21.55868494
## all_70$PAD_MSSD 1.728478e-04 0.01049818
ptq_naa_mssd <- lm(all_70$ptq_total ~ all_70$NAA_MSSD)
summary(ptq_naa_mssd)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$NAA_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.352 -8.277 -1.453 6.491 30.716
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 17.326331 1.808940 9.578 <2e-16 ***
## all_70$NAA_MSSD 0.008244 0.003360 2.454 0.0155 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.14 on 128 degrees of freedom
## Multiple R-squared: 0.04493, Adjusted R-squared: 0.03747
## F-statistic: 6.022 on 1 and 128 DF, p-value: 0.01548
confint(ptq_naa_mssd, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 13.747034510 20.9056267
## all_70$NAA_MSSD 0.001596512 0.0148917
ptq_nad_mssd <- lm(all_70$ptq_total ~ all_70$NAD_MSSD)
summary(ptq_nad_mssd)
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$NAD_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -18.637 -7.295 -1.542 5.883 30.226
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 16.927566 2.404211 7.041 5.09e-10 ***
## all_70$NAD_MSSD 0.002841 0.002170 1.309 0.194
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.58 on 83 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.02023, Adjusted R-squared: 0.008429
## F-statistic: 1.714 on 1 and 83 DF, p-value: 0.1941
confint(ptq_nad_mssd, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 12.145687294 21.70944436
## all_70$NAD_MSSD -0.001475257 0.00715817
ptq_circumplex_mean <- lm(all_70$ptq_total ~ all_70$NAD_Mean + all_70$NAA_Mean + all_70$PAA_Mean + all_70$PAD_Mean)
summary(ptq_circumplex_mean )
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$NAD_Mean + all_70$NAA_Mean +
## all_70$PAA_Mean + all_70$PAD_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.863 -7.844 -1.970 5.664 30.340
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.16487 10.56336 0.773 0.44183
## all_70$NAD_Mean -0.15790 0.13208 -1.195 0.23543
## all_70$NAA_Mean 0.43724 0.16106 2.715 0.00812 **
## all_70$PAA_Mean -0.06709 0.23111 -0.290 0.77235
## all_70$PAD_Mean 0.10995 0.23351 0.471 0.63904
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.15 on 80 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.1242, Adjusted R-squared: 0.0804
## F-statistic: 2.836 on 4 and 80 DF, p-value: 0.02966
confint(ptq_circumplex_mean, level=0.95)
## 2.5 % 97.5 %
## (Intercept) -12.8568901 29.1866232
## all_70$NAD_Mean -0.4207388 0.1049447
## all_70$NAA_Mean 0.1167243 0.7577618
## all_70$PAA_Mean -0.5270186 0.3928419
## all_70$PAD_Mean -0.3547627 0.5746549
ptq_circumplex_mssd <- lm(all_70$ptq_total ~ all_70$NAD_MSSD + all_70$NAA_MSSD + all_70$PAA_MSSD + all_70$PAD_MSSD)
summary(ptq_circumplex_mssd )
##
## Call:
## lm(formula = all_70$ptq_total ~ all_70$NAD_MSSD + all_70$NAA_MSSD +
## all_70$PAA_MSSD + all_70$PAD_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.912 -8.210 -1.764 6.832 29.447
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 15.7377527 2.8333837 5.554 3.53e-07 ***
## all_70$NAD_MSSD 0.0023547 0.0028763 0.819 0.415
## all_70$NAA_MSSD 0.0059701 0.0086314 0.692 0.491
## all_70$PAA_MSSD -0.0026433 0.0086458 -0.306 0.761
## all_70$PAD_MSSD 0.0003792 0.0063676 0.060 0.953
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.73 on 80 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.03012, Adjusted R-squared: -0.01837
## F-statistic: 0.6211 on 4 and 80 DF, p-value: 0.6487
confint(ptq_circumplex_mssd, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 10.09913941 21.376365963
## all_70$NAD_MSSD -0.00336928 0.008078686
## all_70$NAA_MSSD -0.01120704 0.023147193
## all_70$PAA_MSSD -0.01984896 0.014562450
## all_70$PAD_MSSD -0.01229277 0.013051226
skewness(all_75$ptq_total, na.rm=T)
## [1] 0.5481804
skewness(all_75$PA_R_Mean)
## [1] 0.6161088
skewness(all_75$PA_R_MSSD)
## [1] 1.352792
skewness(all_75$NA_R_Mean)
## [1] -0.2841484
skewness(all_75$NA_R_MSSD)
## [1] 1.080293
kurtosis(all_75$ptq_total, na.rm = T)
## [1] 0.1651424
kurtosis(all_75$PA_R_Mean)
## [1] 0.7519026
kurtosis(all_75$PA_R_MSSD)
## [1] 1.649127
kurtosis(all_75$NA_R_Mean)
## [1] -0.3973586
kurtosis(all_75$NA_R_MSSD)
## [1] 0.7081455
sd(all_75$ptq_total)
## [1] 11.48034
sd(all_75$PA_R_Mean)
## [1] 9.971135
sd(all_75$NA_R_Mean)
## [1] 13.16381
sd(all_75$PA_R_MSSD)
## [1] 270.7738
sd(all_75$NA_R_MSSD)
## [1] 293.6723
mean(all_75$ptq_total)
## [1] 21.57407
mean(all_75$PA_R_Mean)
## [1] 55.97847
mean(all_75$NA_R_Mean)
## [1] 37.73603
mean(all_75$PA_R_MSmean)
## Warning in mean.default(all_75$PA_R_MSmean): argument is not numeric or
## logical: returning NA
## [1] NA
sd(all_75$NA_R_MSSD)
## [1] 293.6723
col_means <- colMeans(all_75, na.rm=T)
col_sd <- apply(all_75,2, sd, na.rm=TRUE)
m.ptq2 <- lm(all_75$ptq_total ~ all_75$NA_R_Mean)
summary(m.ptq2)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$NA_R_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.234 -7.228 -1.929 5.351 31.854
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.16317 3.17381 3.202 0.001801 **
## all_75$NA_R_Mean 0.30239 0.07945 3.806 0.000237 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.82 on 106 degrees of freedom
## Multiple R-squared: 0.1202, Adjusted R-squared: 0.1119
## F-statistic: 14.48 on 1 and 106 DF, p-value: 0.0002368
confint(m.ptq2, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 3.8707830 16.4555589
## all_75$NA_R_Mean 0.1448655 0.4599095
summary(influence.measures(m.ptq2))
## Potentially influential observations of
## lm(formula = all_75$ptq_total ~ all_75$NA_R_Mean) :
##
## dfb.1_ dfb.a_75 dffit cov.r cook.d hat
## 1 -0.30 0.28 -0.30 1.07_* 0.04 0.07_*
## 12 -0.04 0.13 0.29 0.90_* 0.04 0.01
## 23 0.49 -0.42 0.50_* 0.91_* 0.12 0.03
## 38 -0.02 0.01 -0.02 1.08_* 0.00 0.06
## 40 0.00 0.00 0.00 1.07_* 0.00 0.05
## 60 0.21 -0.15 0.27 0.94_* 0.03 0.01
## 86 -0.03 0.04 0.04 1.06_* 0.00 0.04
## 88 0.00 0.00 0.00 1.10_* 0.00 0.08_*
## 91 -0.09 0.19 0.36 0.87_* 0.06 0.01
m.ptq4 <- lm(all_75$ptq_total ~ all_75$PA_R_Mean)
summary(m.ptq4)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$PA_R_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.835 -8.067 -1.279 6.182 34.448
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 29.6691 6.3073 4.704 7.73e-06 ***
## all_75$PA_R_Mean -0.1446 0.1109 -1.303 0.195
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.44 on 106 degrees of freedom
## Multiple R-squared: 0.01578, Adjusted R-squared: 0.00649
## F-statistic: 1.699 on 1 and 106 DF, p-value: 0.1952
confint(m.ptq4, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 17.1641854 42.17401416
## all_75$PA_R_Mean -0.3645672 0.07534791
summary(influence.measures(m.ptq4))
## Potentially influential observations of
## lm(formula = all_75$ptq_total ~ all_75$PA_R_Mean) :
##
## dfb.1_ dfb.a_75 dffit cov.r cook.d hat
## 1 0.57 -0.61 -0.63_* 1.14_* 0.19 0.14_*
## 3 0.04 -0.05 -0.05 1.08_* 0.00 0.06_*
## 12 -0.16 0.21 0.35 0.89_* 0.06 0.01
## 48 -0.04 0.04 0.05 1.06_* 0.00 0.04
## 60 -0.40 0.45 0.50_* 0.98 0.12 0.05
## 81 -0.08 0.13 0.27 0.92_* 0.03 0.01
## 91 0.05 0.00 0.30 0.86_* 0.04 0.01
m.ptq1 <- lm(all_75$ptq_total ~ all_75$NA_R_MSSD)
summary(m.ptq1)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$NA_R_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.517 -8.018 -1.041 6.403 29.203
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 17.406770 1.907097 9.127 5.16e-15 ***
## all_75$NA_R_MSSD 0.009729 0.003678 2.645 0.0094 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.17 on 106 degrees of freedom
## Multiple R-squared: 0.06193, Adjusted R-squared: 0.05308
## F-statistic: 6.999 on 1 and 106 DF, p-value: 0.009399
confint(m.ptq1, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 13.625764127 21.18777581
## all_75$NA_R_MSSD 0.002437723 0.01701982
summary(influence.measures(m.ptq1))
## Potentially influential observations of
## lm(formula = all_75$ptq_total ~ all_75$NA_R_MSSD) :
##
## dfb.1_ dfb.a_75 dffit cov.r cook.d hat
## 12 -0.07 0.26 0.36 0.92_* 0.06 0.02
## 15 0.32 -0.23 0.32 0.94_* 0.05 0.02
## 23 0.26 -0.16 0.28 0.93_* 0.04 0.01
## 60 -0.18 0.31 0.34 1.04 0.06 0.06_*
## 65 0.04 -0.06 -0.07 1.09_* 0.00 0.07_*
## 71 0.16 -0.27 -0.29 1.07_* 0.04 0.07_*
## 81 0.20 -0.07 0.25 0.92_* 0.03 0.01
## 84 -0.04 0.07 0.08 1.10_* 0.00 0.07_*
## 91 -0.26 0.50 0.56_* 0.92_* 0.15 0.04
## 96 0.20 -0.31 -0.33 1.11_* 0.05 0.10_*
## 100 0.03 -0.05 -0.05 1.06_* 0.00 0.04
## 101 0.00 0.01 0.01 1.06_* 0.00 0.04
## 102 0.15 -0.23 -0.25 1.10_* 0.03 0.08_*
m.ptq3 <- lm(all_75$ptq_total ~ all_75$PA_R_MSSD)
summary(m.ptq3)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$PA_R_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.295 -8.262 -0.798 6.654 31.904
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.528294 1.881022 9.850 <2e-16 ***
## all_75$PA_R_MSSD 0.008033 0.004043 1.987 0.0495 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.33 on 106 degrees of freedom
## Multiple R-squared: 0.0359, Adjusted R-squared: 0.0268
## F-statistic: 3.947 on 1 and 106 DF, p-value: 0.04955
confint(m.ptq3, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 1.479898e+01 22.25760390
## all_75$PA_R_MSSD 1.616691e-05 0.01604943
summary(influence.measures(m.ptq3))
## Potentially influential observations of
## lm(formula = all_75$ptq_total ~ all_75$PA_R_MSSD) :
##
## dfb.1_ dfb.a_75 dffit cov.r cook.d hat
## 2 0.23 -0.36 -0.38 1.13_* 0.07 0.12_*
## 12 -0.13 0.34 0.42_* 0.93_* 0.08 0.03
## 60 -0.24 0.39 0.42_* 1.06_* 0.09 0.08_*
## 71 0.12 -0.21 -0.23 1.07_* 0.03 0.06_*
## 81 0.26 -0.15 0.28 0.92_* 0.04 0.01
## 84 -0.07 0.11 0.12 1.11_* 0.01 0.09_*
## 91 -0.11 0.33 0.44_* 0.89_* 0.09 0.02
## 96 0.10 -0.17 -0.18 1.09_* 0.02 0.07_*
## 101 -0.01 0.02 0.03 1.06_* 0.00 0.04
## 102 0.13 -0.21 -0.22 1.12_* 0.02 0.10_*
m.NA_all <- lm(all_75$ptq_total ~ all_75$NA_R_MSSD + all_75$NA_R_Mean)
summary(m.NA_all)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$NA_R_MSSD + all_75$NA_R_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.030 -7.121 -1.624 4.970 30.842
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.076782 3.340926 2.118 0.036517 *
## all_75$NA_R_MSSD 0.008643 0.003491 2.476 0.014883 *
## all_75$NA_R_Mean 0.286065 0.077876 3.673 0.000379 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.57 on 105 degrees of freedom
## Multiple R-squared: 0.1688, Adjusted R-squared: 0.1529
## F-statistic: 10.66 on 2 and 105 DF, p-value: 6.106e-05
confint(m.NA_all, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 0.452342688 13.70122103
## all_75$NA_R_MSSD 0.001721725 0.01556488
## all_75$NA_R_Mean 0.131650761 0.44047867
m.PA_all <- lm(all_75$ptq_total ~ all_75$PA_R_MSSD + all_75$PA_R_Mean)
summary(m.PA_all)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$PA_R_MSSD + all_75$PA_R_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.589 -8.291 -1.117 6.287 31.863
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 27.002447 6.350049 4.252 4.6e-05 ***
## all_75$PA_R_MSSD 0.008238 0.004028 2.045 0.0433 *
## all_75$PA_R_Mean -0.152773 0.109388 -1.397 0.1655
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.28 on 105 degrees of freedom
## Multiple R-squared: 0.05348, Adjusted R-squared: 0.03545
## F-statistic: 2.966 on 2 and 105 DF, p-value: 0.05583
confint(m.PA_all, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 14.411472867 39.59342126
## all_75$PA_R_MSSD 0.000250959 0.01622521
## all_75$PA_R_Mean -0.369669254 0.06412355
m_all <-lm(all_75$ptq_total ~ all_75$PA_R_MSSD + all_75$PA_R_Mean + all_75$NA_R_MSSD + all_75$NA_R_Mean)
summary(m_all)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$PA_R_MSSD + all_75$PA_R_Mean +
## all_75$NA_R_MSSD + all_75$NA_R_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.889 -7.219 -1.657 4.732 31.505
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.1748667 8.8743624 0.470 0.63903
## all_75$PA_R_MSSD -0.0009589 0.0065291 -0.147 0.88353
## all_75$PA_R_Mean 0.0429910 0.1187514 0.362 0.71807
## all_75$NA_R_MSSD 0.0092613 0.0060369 1.534 0.12807
## all_75$NA_R_Mean 0.3018110 0.0902477 3.344 0.00115 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.66 on 103 degrees of freedom
## Multiple R-squared: 0.17, Adjusted R-squared: 0.1377
## F-statistic: 5.273 on 4 and 103 DF, p-value: 0.0006643
confint(m_all, level=0.95)
## 2.5 % 97.5 %
## (Intercept) -13.425338093 21.77507156
## all_75$PA_R_MSSD -0.013907867 0.01199016
## all_75$PA_R_Mean -0.192524362 0.27850642
## all_75$NA_R_MSSD -0.002711561 0.02123410
## all_75$NA_R_Mean 0.122826096 0.48079600
#### Correlation matrix of the individual item mssd
#### Correlation matrix of the individual item means and mssd
means.pca <- prcomp(na.omit(indiv_means),
center = TRUE,
scale = TRUE)
print(means.pca)
## Standard deviations (1, .., p=10):
## [1] 2.4071722 1.5168778 0.8620196 0.5914544 0.5543271 0.4399505 0.3719951
## [8] 0.2758663 0.2325851 0.2056562
##
## Rotation (n x k) = (10 x 10):
## PC1 PC2 PC3 PC4 PC5
## anxious_mean 0.3429960 -0.2910562 0.240679246 -0.2957904 0.22132551
## nervous_mean 0.3311355 -0.3276556 0.191594521 -0.1375269 0.16224056
## upset_mean 0.3340716 -0.3133791 -0.075090620 0.4432986 -0.14192391
## sluggish_mean 0.3262648 -0.1648100 -0.535448571 -0.1938690 0.04302294
## irritable_mean 0.3520405 -0.2634761 -0.195713445 0.2310694 0.10350021
## content_mean -0.3366075 -0.3125597 -0.142830965 -0.2657013 0.37160499
## relaxed_mean -0.3222487 -0.1702536 -0.533836511 0.4287283 0.12644630
## excited_mean -0.2006664 -0.4890027 -0.002717079 -0.2189678 -0.80216521
## happy_mean -0.3383382 -0.3256250 -0.078239677 -0.2923411 0.25659768
## attentive_mean -0.2425476 -0.3759049 0.513036626 0.4672121 0.16910657
## PC6 PC7 PC8 PC9
## anxious_mean -0.148622564 0.014483331 -0.40908920 0.11156735
## nervous_mean -0.401652479 0.468608134 0.09748159 -0.11402628
## upset_mean -0.222532322 -0.201839705 0.60266535 0.21047994
## sluggish_mean 0.613034779 0.376661220 0.12920402 0.05361063
## irritable_mean 0.133651452 -0.583877720 -0.42099916 -0.20127172
## content_mean -0.049246701 -0.202393608 0.34482876 -0.60937056
## relaxed_mean -0.359314721 0.333756080 -0.35192092 0.03423183
## excited_mean -0.005712282 0.005456563 -0.13169981 -0.10844133
## happy_mean 0.008862621 -0.242733863 0.06351919 0.70845383
## attentive_mean 0.491678912 0.212989958 -0.04323349 -0.02634147
## PC10
## anxious_mean -0.633353649
## nervous_mean 0.545549316
## upset_mean -0.264816725
## sluggish_mean -0.054722089
## irritable_mean 0.357368402
## content_mean -0.162129362
## relaxed_mean -0.129888876
## excited_mean 0.004390894
## happy_mean 0.239016084
## attentive_mean -0.009975005
biplot(means.pca, scale = 0)
screeplot(means.pca)
#### PCA for item mssd
mssd.pca <- prcomp(na.omit(indiv_mssd),
center = TRUE,
scale. = TRUE)
print(mssd.pca)
## Standard deviations (1, .., p=10):
## [1] 2.4839896 1.2608644 0.7396627 0.6492347 0.5889651 0.5135119 0.4779734
## [8] 0.4330519 0.3926851 0.3010669
##
## Rotation (n x k) = (10 x 10):
## PC1 PC2 PC3 PC4 PC5
## anxious_mssd 0.3553322 -0.03824830 0.02799643 -0.3032687 0.436098725
## nervous_mssd 0.1751495 -0.65338615 -0.23728026 -0.1844803 0.025252375
## upset_mssd 0.3214444 0.21844987 -0.37906270 0.5126974 -0.000852351
## sluggish_mssd 0.1726716 -0.66095029 -0.06796161 0.1926518 -0.078399921
## irritable_mssd 0.3421569 0.03298689 0.04325102 0.5748360 0.379397794
## content_mssd 0.3634925 0.09795696 -0.24049882 -0.1236704 -0.437929998
## relaxed_mssd 0.3421517 0.14616308 0.09403607 -0.3752331 0.483523750
## excited_mssd 0.3570387 0.10416539 0.11537631 -0.1408225 -0.251644100
## happy_mssd 0.3553763 0.18712365 -0.22397123 -0.2131638 -0.311809880
## attentive_mssd 0.2998080 -0.09557685 0.81398959 0.1490682 -0.270115169
## PC6 PC7 PC8 PC9 PC10
## anxious_mssd -0.38922695 0.273558110 -0.11548638 0.5911431 0.01481138
## nervous_mssd -0.28194478 0.006369209 0.50482927 -0.3382721 -0.05121090
## upset_mssd -0.32395213 -0.516513326 0.08616220 0.1501320 -0.20176903
## sluggish_mssd 0.38878587 -0.161820158 -0.49251167 0.2494333 -0.05765658
## irritable_mssd 0.23202776 0.500022541 0.10601116 -0.2525698 0.16340584
## content_mssd -0.15000595 0.063565543 -0.23852953 -0.1335002 0.70149833
## relaxed_mssd 0.24846610 -0.480032848 -0.16432781 -0.3971219 0.03541662
## excited_mssd 0.51368888 -0.087996707 0.58144703 0.3913975 0.04809571
## happy_mssd 0.07981097 0.359743557 -0.21503579 -0.2099302 -0.64789567
## attentive_mssd -0.32340371 -0.102470054 -0.04857218 -0.1215853 -0.10481096
biplot(mssd.pca, scale = 0)
screeplot(mssd.pca)
circum_group<- all_75[c("NAD_Mean", "NAA_Mean", "PAA_Mean", "PAD_Mean", "NAD_MSSD", "NAA_MSSD",
"PAA_MSSD", "PAD_MSSD")]
circum_group <- data.frame(circum_group)
View(indiv_means)
circum_group_cor <- cor(circum_group, y= NULL, use="complete.obs", method = "pearson")
corrplot(circum_group_cor, type = "upper", order = "hclust",
tl.col = "black")
View(circum_group_cor)
ptq_paa <- lm(all_75$ptq_total ~ all_75$PAA_Mean)
summary(ptq_paa)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$PAA_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.915 -7.750 -1.153 6.135 34.244
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 28.6727 5.9212 4.842 4.39e-06 ***
## all_75$PAA_Mean -0.1298 0.1064 -1.220 0.225
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.45 on 106 degrees of freedom
## Multiple R-squared: 0.01385, Adjusted R-squared: 0.004548
## F-statistic: 1.489 on 1 and 106 DF, p-value: 0.2251
confint(ptq_paa, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 16.9333365 40.412090
## all_75$PAA_Mean -0.3408219 0.081133
ptq_pad <- lm(all_75$ptq_total ~ all_75$PAD_Mean)
summary(ptq_pad)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$PAD_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.643 -7.635 -1.801 6.049 34.725
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 28.55653 5.88372 4.853 4.2e-06 ***
## all_75$PAD_Mean -0.12051 0.09975 -1.208 0.23
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.46 on 106 degrees of freedom
## Multiple R-squared: 0.01358, Adjusted R-squared: 0.004277
## F-statistic: 1.46 on 1 and 106 DF, p-value: 0.2297
confint(ptq_pad, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 16.8914826 40.22157205
## all_75$PAD_Mean -0.3182728 0.07725204
ptq_naa <- lm(all_75$ptq_total ~ all_75$NAA_Mean)
summary(ptq_naa)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$NAA_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.911 -7.472 -1.930 4.933 31.487
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.9051 3.0361 3.262 0.00149 **
## all_75$NAA_Mean 0.3159 0.0773 4.087 8.54e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.72 on 106 degrees of freedom
## Multiple R-squared: 0.1361, Adjusted R-squared: 0.128
## F-statistic: 16.7 on 1 and 106 DF, p-value: 8.536e-05
confint(ptq_naa, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 3.8856817 15.9244731
## all_75$NAA_Mean 0.1626369 0.4691533
ptq_nad <- lm(all_75$ptq_total ~ all_75$NAD_Mean)
summary(ptq_nad)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$NAD_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.791 -8.136 -1.644 8.035 30.524
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 13.63516 4.44345 3.069 0.00321 **
## all_75$NAD_Mean 0.15043 0.09912 1.518 0.13427
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.89 on 61 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.03638, Adjusted R-squared: 0.02059
## F-statistic: 2.303 on 1 and 61 DF, p-value: 0.1343
confint(ptq_nad, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 4.74992179 22.5203948
## all_75$NAD_Mean -0.04777227 0.3486301
ptq_paa_mssd <- lm(all_75$ptq_total ~ all_75$PAA_MSSD)
summary(ptq_paa_mssd)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$PAA_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.010 -8.226 -0.929 7.017 33.043
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.557596 1.905125 9.741 <2e-16 ***
## all_75$PAA_MSSD 0.007325 0.003793 1.931 0.0561 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.34 on 106 degrees of freedom
## Multiple R-squared: 0.03399, Adjusted R-squared: 0.02488
## F-statistic: 3.73 on 1 and 106 DF, p-value: 0.05612
confint(ptq_paa_mssd, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 14.7805003831 22.33469122
## all_75$PAA_MSSD -0.0001945665 0.01484428
ptq_pad_mssd <- lm(all_75$ptq_total ~ all_75$PAD_MSSD)
summary(ptq_pad_mssd)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$PAD_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.215 -8.315 -1.127 6.368 32.108
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.711230 1.961445 9.540 6.1e-16 ***
## all_75$PAD_MSSD 0.004843 0.002754 1.759 0.0815 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.37 on 106 degrees of freedom
## Multiple R-squared: 0.02835, Adjusted R-squared: 0.01918
## F-statistic: 3.092 on 1 and 106 DF, p-value: 0.08154
confint(ptq_pad_mssd, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 14.8224733896 22.59998588
## all_75$PAD_MSSD -0.0006171291 0.01030361
ptq_naa_mssd <- lm(all_75$ptq_total ~ all_75$NAA_MSSD)
summary(ptq_naa_mssd)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$NAA_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.4931 -8.0571 -0.9548 6.3283 30.7711
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.080073 2.004812 9.018 9.06e-15 ***
## all_75$NAA_MSSD 0.007406 0.003569 2.075 0.0404 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.31 on 106 degrees of freedom
## Multiple R-squared: 0.03903, Adjusted R-squared: 0.02997
## F-statistic: 4.305 on 1 and 106 DF, p-value: 0.04041
confint(ptq_naa_mssd, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 1.410534e+01 22.05480772
## all_75$NAA_MSSD 3.296686e-04 0.01448295
ptq_nad_mssd <- lm(all_75$ptq_total ~ all_75$NAD_MSSD)
summary(ptq_nad_mssd)
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$NAD_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.3588 -7.7981 -0.7063 6.9006 28.5986
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 15.911876 2.732602 5.823 2.31e-07 ***
## all_75$NAD_MSSD 0.004391 0.002472 1.777 0.0806 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.81 on 61 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.0492, Adjusted R-squared: 0.03361
## F-statistic: 3.157 on 1 and 61 DF, p-value: 0.08061
confint(ptq_nad_mssd, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 10.4477000082 21.376051548
## all_75$NAD_MSSD -0.0005510315 0.009333487
ptq_circumplex_mean <- lm(all_75$ptq_total ~ all_75$NAD_Mean + all_75$NAA_Mean + all_75$PAA_Mean + all_75$PAD_Mean)
summary(ptq_circumplex_mean )
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$NAD_Mean + all_75$NAA_Mean +
## all_75$PAA_Mean + all_75$PAD_Mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.906 -7.095 -1.318 4.742 32.026
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -5.2325 11.8546 -0.441 0.66057
## all_75$NAD_Mean -0.1942 0.1601 -1.213 0.23008
## all_75$NAA_Mean 0.6163 0.1965 3.136 0.00269 **
## all_75$PAA_Mean -0.1312 0.2557 -0.513 0.60984
## all_75$PAD_Mean 0.3274 0.2524 1.297 0.19962
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.13 on 58 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.1972, Adjusted R-squared: 0.1418
## F-statistic: 3.562 on 4 and 58 DF, p-value: 0.01151
confint(ptq_circumplex_mean, level=0.95)
## 2.5 % 97.5 %
## (Intercept) -28.9620606 18.4969993
## all_75$NAD_Mean -0.5147861 0.1263177
## all_75$NAA_Mean 0.2228876 1.0096748
## all_75$PAA_Mean -0.6431120 0.3806882
## all_75$PAD_Mean -0.1777427 0.8325954
ptq_circumplex_mssd <- lm(all_75$ptq_total ~ all_75$NAD_MSSD + all_75$NAA_MSSD + all_75$PAA_MSSD + all_75$PAD_MSSD)
summary(ptq_circumplex_mssd )
##
## Call:
## lm(formula = all_75$ptq_total ~ all_75$NAD_MSSD + all_75$NAA_MSSD +
## all_75$PAA_MSSD + all_75$PAD_MSSD)
##
## Residuals:
## Min 1Q Median 3Q Max
## -18.746 -7.742 -1.016 7.081 27.992
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 16.047538 3.245876 4.944 6.88e-06 ***
## all_75$NAD_MSSD 0.003111 0.003628 0.857 0.395
## all_75$NAA_MSSD -0.000930 0.009831 -0.095 0.925
## all_75$PAA_MSSD 0.007423 0.010866 0.683 0.497
## all_75$PAD_MSSD -0.002669 0.007138 -0.374 0.710
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.06 on 58 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.05691, Adjusted R-squared: -0.008126
## F-statistic: 0.8751 on 4 and 58 DF, p-value: 0.4845
confint(ptq_circumplex_mssd, level=0.95)
## 2.5 % 97.5 %
## (Intercept) 9.550211147 22.54486384
## all_75$NAD_MSSD -0.004151555 0.01037273
## all_75$NAA_MSSD -0.020608830 0.01874889
## all_75$PAA_MSSD -0.014327983 0.02917468
## all_75$PAD_MSSD -0.016956952 0.01161928