-
Notifications
You must be signed in to change notification settings - Fork 2
/
manuscript.Rmd
3347 lines (2538 loc) · 147 KB
/
manuscript.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
title : "An inventory of human light exposure related behaviour"
shorttitle : "LEBA"
# author:
# - name : "Mushfiqul Anwar Siraji"
# affiliation : "1, *"
# email : "mushfiqul.anwarsiraji@monash.edu"
# role:
# - Formal Analysis
# - Visualization
# - Writing – original draft
# - Writing – review & editing
#
# - name : "Rafael Robert Lazar"
# affiliation : "2, 3, *"
# role:
# - Data curation
# - Investigation
# - Project administration
# - Visualization
# - Writing – original draft
# - Writing – review & editing
#
# - name : "Juliëtte van Duijnhoven"
# affiliation : "4, 5"
# email : "j.v.duijnhoven1@tue.nl"
# role:
# - Conceptualization
# - Methodology
# - Investigation
# - Writing – review & editing
#
# - name : "Luc Schlangen"
# affiliation : "5, 6"
# email : "l.j.m.schlangen@tue.nl"
# role:
# - Conceptualization
# - Methodology
# - Investigation
# - Writing – review & editing
#
# - name : "Shamsul Haque"
# affiliation : "1"
# email : "shamsul@monash.edu"
# role:
# - Conceptualization
# - Supervision
# - Writing – review & editing
#
# - name : "Vineetha Kalavally"
# affiliation : "7"
# email : "vineetha@monash.edu"
# role:
# - Supervision
# - Writing – review & editing
#
# - name : "Céline Vetter"
# affiliation : "8"
# email : "celine.vetter@colorado.edu"
# role:
# - Conceptualization
# - Writing – review & editing
#
# - name : "Gena Glickman"
# affiliation : "9"
# email : "gena.glickman@usuhs.edu"
# role:
# - Conceptualization
# - Methodology
# - Writing – review & editing
#
# - name : "Karin Smolders"
# affiliation : "5,6"
# email : "k.c.h.j.smolders@tue.nl"
# role:
# - Conceptualization
# - Methodology
# - Writing – review & editing
#
# - name : "Manuel Spitschan"
# corresponding : yes
# affiliation : "10, 11, 12"
# email : "manuel.spitschan@tum.de "
# role:
# - Conceptualization
# - Data curation
# - Investigation
# - Project administration
# - Visualization
# - Methodology
# - Writing – original draft
# - Writing – review & editing
#
# affiliation:
# - id : "1"
# institution : "Monash University, Department of Psychology, Jeffrey Cheah School of Medicine and Health Sciences, Malaysia"
# - id : "2"
# institution : "Psychiatric Hospital of the University of Basel (UPK), Centre for Chronobiology, Basel, Switzerland"
# - id : "3"
# institution : "University of Basel, Transfaculty Research Platform Molecular and Cognitive Neurosciences, Basel, Switzerland"
# - id : "4"
# institution : "Eindhoven University of Technology, Department of the Built Environment, Building Lighting, Eindhoven, Netherlands"
# - id : "5"
# institution : "Eindhoven University of Technology, Intelligent Lighting Institute, Eindhoven, Netherlands"
# - id : "6"
# institution : "Eindhoven University of Technology, Department of Industrial Engineering and Innovation Sciences, Human-Technology Interaction, Eindhoven, Netherlands"
# - id : "7"
# institution : "Monash University, Department of Electrical and Computer Systems Engineering, Selangor, Malaysia"
# - id : "8"
# institution : "University of Colorado Boulder, Department of Integrative Physiology, Boulder, USA"
#
#
# - id : "9"
# institution : "Uniformed Services University of the Health Sciences, Department of Psychiatry, Bethesda, USA"
# - id : "10"
# institution : "Translational Sensory & Circadian Neuroscience, Max Planck Institute for Biological Cybernetics, Tübingen, Germany"
# - id : "11"
# institution : "TUM Department of Sport and Health Sciences (TUM SG), Technical University of Munich, Munich, Germany"
# - id : "12"
# institution : "TUM Institute of Advanced Study (TUM-IAS), Technical University of Munich, Garching, Germany"
# - id : "*"
# institution : "Joint first author"
#
#
# authornote: |
# This research is supported by funding from the Welcome Trust (204686/Z/16/Z), the European Training Network LIGHTCAP (project number 860613) under the Marie Skłodowska-Curie actions framework H2020-MSCA-ITN-2019, the BioClock project (number 1292.19.077) of the research program Dutch Research Agenda: Onderzoek op Routes door Consortia (NWA-ORC) which is (partly) financed by the Dutch Research Council (NWO), and the European Union and the nationals contributing in the context of the ECSEL Joint Undertaking programme (2021-2024) under the grant #101007319.
abstract: |
Light exposure is an essential driver of health and well-being, and individual behaviours during rest and activity modulate physiologically-relevant aspects of light exposure. Further understanding the behaviours that influence individual photic exposure patterns may provide insight into the volitional contributions to the physiological effects of light and guide bevavioral points of intervention. Here, we present a novel, self-reported and psychometrically validated inventory to capture light exposure-related behaviour, the Light Exposure Behaviour Assessment (LEBA).
An expert panel prepared the initial 48-item pool spanning different light exposure-related behaviours. Responses, consisting of rating the frequency of engaging in the per-item behaviour on a 5-point Likert type scale, were collected in an online survey yielding responses from a geographically unconstrained sample (690 completed responses, 74 countries, 28 time zones). The exploratory factor analysis (EFA) on an initial subsample (n=428) rendered a five-factor solution with 25 items (Wearing blue light filters, spending time outdoors, using a phone and smartwatch in bed, using light before bedtime, using light in the morning and during daytime). In a confirmatory factor analysis (CFA) performed on an independent subset of participants (n=262), we removed two additional items to attain the best fit for the five-factor solution (CFI=0.95, TLI=0.95, RMSEA=0.06). The internal consistency reliability coefficient for the total instrument yielded McDonald’s Omega=0.68. Measurement model invariance analysis between native and non-native English speakers showed our model attained the highest level of invariance (residual invariance; CFI=0.95, TLI=0.95, RMSEA=0.05). Lastly, a short form of the LEBA (n=18) was developed using Item Response Theory on the complete sample (n=690).
The psychometric properties of the LEBA indicate the usability to measure light exposure-related behaviours. The instrument may offer a scalable solution to characterize behaviours that influence individual photic exposure patterns in remote samples. The LEBA inventory is available under the open-access CC-BY-NC-ND license.
Instrument webpage: https://leba-instrument.org/
GitHub repository containing this manuscript: https://github.com/leba-instrument/leba-manuscript
keywords : "light exposure, light-related behaviours, non-visual effects of light, psychometrics"
wordcount : "6314"
#bibliography : ["references.bib", "lib_references.bib"]
bibliography : ["references.bib"]
floatsintext : no
figurelist : no
tablelist : no
footnotelist : no
linenumbers : yes
mask : no
draft : no
documentclass : "apa6"
classoption : "man"
output :
papaja::apa6_pdf:
keep_tex: true
latex_engine: xelatex
includes:
in_header: header.tex
header-includes:
- \usepackage{rotating}
- \DeclareDelayedFloatFlavor{sidewaysfigure}{figure}
mainfont: Arial
---
```{r setup, warning=FALSE, include=FALSE}
#This chunk controls the common chunk parameters for the whole manuscript
knitr::opts_chunk$set(echo=FALSE, warning=F, message=F, dpi=600, fig.width=6,
fig.asp=0.8,out.width="80%", dev=c('png','postscript'))
#options(knitr.duplicate.label="allow")
set.seed(123)
par(family="Arial")
```
```{r pacman, eval=FALSE, include=FALSE}
#This chunk holds code for 'pacman' based library management.
#You need to run this chunk 1X in your system
#install.packages("pacman")#Run this if you don't have pacman installed.
pacman::p_load(MOTE, tidyverse, psych, lavaan,kableExtra,gt,gtsummary, mirt,likert,kutils,semPlot,semTable,semTools,ggcorrplot,dlookr, paran,EFA.MRFA,VIM,DiagrammeR,DiagrammeRsvg,ggplot2,cowplot,questionr,magick, simsem,readxl, stringr,RColorBrewer,WrightMap,reshape, ggsci,ggtext)
webshot::install_phantomjs()
pacman::p_install_gh("jthomasmock/gtExtras")
pacman::p_install_gh("crsh/papaja")
pacman::p_install_gh("masiraji/tabledown")
pacman::p_install_gh("crsh/citr")
devtools::install_github("unDocUMeantIt/koRpus")
koRpus::install.koRpus.lang(lang=c("en"))
install.packages("correlation")
install.packages("ggtext")
#if you don't have LaTeX installed run the following lines
#install.packages("tinytex")
#tinytex::install_tinytex()
```
```{r library, include=FALSE}
#This chunk holds code for calling the required packages
library(papaja)
library(lavaan)
library(semPlot)
library(semTools)
library(MOTE)
library(car)#reverse-coding
library(psych)
library(dlookr)
library(tidyverse)
library(qgraph)
library(kableExtra)
library(paran) # Parallel analysis
library(EFA.MRFA) # Hull method
library(ggcorrplot)
library(semTable)
library(mirt)
library(gtsummary)
library(gt)
library(gtExtras)
library(likert)
library(VIM) #Missing data
library(kutils)
library(tabledown)
library(readxl)
library(koRpus)# stable release
library(koRpus.lang.en)
library(reshape)
library(ggsci)
library(ggtext)
r_refs("lib_references.bib")
```
```{r ggplot2, include=F}
#This chunk holds code for creating ggplot2 based apatheme for plots.
apatheme=theme_bw()+
theme(panel.grid.major=element_blank(),
panel.grid.minor=element_blank(),
panel.background=element_blank(),
axis.text.x=element_text(size=80),
axis.text.y=element_text(size=80),
axis.title.x=element_text(size=80),
axis.title.y=element_text(size=80),
plot.title=element_text(size=80),
legend.text=element_text(size =80),
legend.title=element_blank(),
axis.line.x=element_line(color='black'),
axis.line.y=element_line(color='black'),
panel.border=element_rect(color="black",
fill=NA,
size=1))
apatheme_2=theme_bw()+ #Figure 4
theme(panel.grid.major=element_blank(),
panel.grid.minor=element_blank(),
panel.background=element_blank(),
axis.text.x=element_text(size=35),
axis.text.y=element_text(size=35),
axis.title.x=element_text(size=35),
axis.title.y=element_text(size=35),
plot.title=element_text(size=35),
legend.text=element_text(size =35),
legend.title=element_blank(),
axis.line.x=element_line(color='black'),
axis.line.y=element_line(color='black'),
panel.border=element_rect(color="black",
fill=NA,
size=1))
apatheme_3=theme_bw()+ #Figure 6
theme(panel.grid.major=element_blank(),
panel.grid.minor=element_blank(),
panel.background=element_blank(),
axis.text.x=element_text(size=90),
axis.text.y=element_text(size=90),
axis.title.x=element_text(size=90),
axis.title.y=element_text(size=90),
plot.title=element_text(size=90),
legend.text=element_text(size =90),
legend.title=element_blank(),
axis.line.x=element_line(color='black'),
axis.line.y=element_line(color='black'),
panel.border=element_rect(color="black",
fill=NA,
size=1))
```
---
nocite: |
#`r cite_r("lib_references.bib")`
[@verriotto2017new][@eklund1996development][@bajaj2011validation][@dianat2013objective]
[@horne1976self][@roenneberg2003life][@buysse1989pittsburgh][@Xie.2021][@bossini2006sensibilita][@grandner2014development]
---
# Introduction
Light exposure received by the eyes affects many facets of human health, well-being, and performance beyond visual sensation and perception [@boyce_light_2022]. The non-image-forming (NIF) effects of light comprise light’s circadian and non-circadian influence on several physiological and psychological functions, such as the secretion of melatonin, sleep, mood, pupil size, body temperature, alertness, and higher cognitive functions [@blume_effects_2019].
With the introduction of artificial electric light, human behaviour has become dissociated from the light-dark cycle given by solar radiation. People can now frequently choose when to be exposed to light or darkness. For example, they can decide whether to go outdoors and seek out sunlight, switch on/off light-emitting devices, use certain types of lights at home, or avoid specific light environments altogether. Additionally, when light sources cannot be directly manipulated, sought out, or avoided (for example, at school, work, or in public places), there is still potential leeway to influence personal light exposure behaviourally, for instance, by wearing sunglasses, directing one’s gaze away or supplementing the situation with additional light sources. Although clearly yielding the potential for good, these behaviours are further associated with increased electric light exposure at night and indoor time during the day, compromising the natural temporal organisation of the light-dark cycle. For example, in the US, an average of 87% of the time is spent in enclosed buildings [@Klepeis.2001], and more than 80% of the population is exposed to a night sky that is brighter than nights with a full moon due to electric light at night [@navara2007dark].
An extensive body of scientific evidence suggests that improper light exposure may be disruptive for health and well-being, giving rise to a series of adverse consequences, including the alteration of hormonal rhythms, increased cancer rates, cardiovascular diseases, and metabolic disorders, such as obesity and type II diabetes [@Lunn.2017; @navara2007dark; @Chellappa.2019]. These findings have sparked a significant call for assessment and guidance regarding healthy light exposure as exemplified by a recently published set of consensus-based experts’ recommendations with specific requirements for indoor light environments during the daytime, evening, and nighttime [@Brown.2022].
Furthermore, building on earlier attempts [e.g. @hubalek_ambulant_2006], there was a recent push toward the development and use of portable light loggers to improve ambulant light assessment and gain more insight into the NIF effects of light on human health in field conditions [@hartmeyer2022towards; @spitschan2022verification]. Attached to different body parts (e.g., wrist; head, at eye level; chest), these light loggers allow for the objective measurement of individual photic exposure patterns under real-world conditions and thus are valuable tools for field studies. Nevertheless, these devices also encompass limiting factors such as potentially being intrusive (e.g., when eye-level worn), yielding the risk of getting covered (e.g., when wrist- or chest-worn) and requiring (monetary) resources and expertise for acquisition and maintenance of the devices.
On the other hand, several attempts have been made to quantify received light exposure subjectively with self-report questionnaires (**Supplementary Table 1**), bypassing the cost and intrusiveness issues. However, subjective light intensity assessments pose a new set of challenges: The human visual system constantly adapts to brightness [@hurvich_perception_1966], while the signals underlying the non-visual effects of light are independent from perception [@allen_exploiting_2018], making the self-report assessment of light properties challenging. Retrospectively recalling the properties of a light source can further complicate such subjective evaluations. Moreover, measuring light properties alone does not yield any information about how individuals might behave differently regarding diverse light environments such as work, home or outdoors.
To date, little effort has been made to understand and capture these activities. Here, we present the development process of a novel self-reported inventory, the Light Exposure Behaviour Assessment (LEBA), for characterizing diverse light exposure-related behaviours.
```{r Data, include=FALSE}
#This chunk holds code for data wrangling
data <- readRDS("leba_2021-09-08.rds")
# Separating EFA and CFA samples with descriptive column
descriptives.data <- data
## Merge "0"s and "1"s into "1"s select,subset assign)
descriptives.data[ , 9:56 ][ descriptives.data[ , 9:56 ] == 0 ] <- 1
#EFA.descriptives <- descriptives.data[1:428,]
EFA.descriptives <- subset(descriptives.data, IncludedInEFA == "TRUE")
#CFA.descriptives <- descriptives.data[429:690, ]
CFA.descriptives<- subset(descriptives.data, IncludedInEFA == "FALSE")
#Separating the EFA and CFA(only items)
sem.data <- data[, 9:56] #EFA & CFA data
sem.data[ sem.data == 0] <- 1 #Merged "0"s and "1"s into "1"s
invariance.data.descriptives.count <- CFA.descriptives %>%
group_by(slypos_demographics_language.factor) %>%
count() %>%
as.data.frame()
## renaming the column-header
prefix <- "item"
sufix <- c(1:48)
colnam <- paste(prefix,sufix, sep="" )
colnames(sem.data) <- colnam
names(sem.data)[names(sem.data) == "item1"] <- "item01"
names(sem.data)[names(sem.data) == "item2"] <- "item02"
names(sem.data)[names(sem.data) == "item3"] <- "item03"
names(sem.data)[names(sem.data) == "item4"] <- "item04"
names(sem.data)[names(sem.data) == "item5"] <- "item05"
names(sem.data)[names(sem.data) == "item6"] <- "item06"
names(sem.data)[names(sem.data) == "item7"] <- "item07"
names(sem.data)[names(sem.data) == "item8"] <- "item08"
names(sem.data)[names(sem.data) == "item9"] <- "item09"
```
```{r country, include=FALSE}
#This chunk holds code for time-zone calculation
library(stringr)
country <- data
TZ <- as.data.frame(str_split_fixed(country$slypos_demographics_tz.factor, "-", 2))
TZ[97, 2] <- " East Africa/Dodoma (UTC +03:00)"
TZ[146, 2] <- " European /Skopje (UTC +01:00)"
TZ[176, 2] <- " Asia /Taipei City (UTC +08:00)"
TZ[574, 2] <- " Asia /Taipei City (UTC +08:00)"
TZ[690, 2] <- " Asia /Taipei City (UTC +08:00)"
TZ[273, 2] <- " Iran /Tehran (UTC +0:30)"
TZ[418, 2] <- " Iran /Tehran (UTC +0:30)"
TZ[673, 2] <- " Iran /Tehran (UTC +0:30)"
num.countries <- as.data.frame(unique(TZ$V1))
num.Timezone <- unique(TZ$V2)
UTC <- as.data.frame(str_split_fixed(TZ$V2, "UTC", 2))
numUTC <- as.data.frame(unique(UTC$V2))
nrow(numUTC)
```
```{r timezone, include=F}
#This chunk holds code for creating time-zone.csv file
timezone <- TZ %>%
group_by(V2) %>%
count() %>%
as.data.frame()
write.csv(timezone, "Table_raw/timezone.csv")
```
```{r prepareDescTable, include=FALSE}
#This chunk holds code for demographic data wrangling.
listdescVars <- colnames(descriptives.data[c(1:3,5:7)])
#separating naming and reducing data for descriptive Table
desctable.data <- dplyr::select(descriptives.data, c(listdescVars,
IncludedInCFA))
#renaming TRUE and FALSE from the IncludedInCFA to EFA and CFA for Descriptive Table
desctable.data$IncludedInCFA[desctable.data$IncludedInCFA == T ] <-
"2. CFA Sample"
desctable.data$IncludedInCFA[desctable.data$IncludedInCFA == F ] <-
"1. EFA Sample"
# recode the Gender factor so it will only show "Gender Diverse" in the summary table
desctable.data$slypos_demographics_gender.factor <-
recode_factor(desctable.data$slypos_demographics_gender.factor, "No"="Yes",
"Yes"= "No")
# create descriptive table for the demographic vars (excluding tz & Country) with gtsummary
desctable.data %>%
tbl_summary(
by=IncludedInCFA,
statistic=list(all_continuous() ~ "{mean} ({sd})",
all_categorical() ~ "{n} ({p}%)"),
digits=all_continuous() ~ 2,
label=list(slypos_demographics_age ~ "Age",
slypos_demographics_sex.factor ~ "Sex",
slypos_demographics_gender.factor ~ "Gender-Variant Identity",
slypos_demographics_language.factor ~ "Native English Speaker",
slypos_demographics_work_or_school.factor ~ "Occupational Status",
slypos_demographics_school.factor ~ "Occupational setting"
),
missing="no"
) %>% add_overall() %>% bold_labels() %>%
# add_p() %>% add_q() %>%
modify_header(label ~ "**Variable**") %>%
# separate_p_footnotes() %>%
modify_caption("Demographic Characteristics of Participants (n=690).") -> desc_table
desctable.data %>%
tbl_summary(
by=slypos_demographics_sex.factor,
statistic=list(all_continuous() ~ "{mean} ({sd})",
all_categorical() ~ "{n} ({p}%)"),
digits=all_continuous() ~ 2,
label=list(slypos_demographics_age ~ "Age",
# slypos_demographics_sex.factor ~ "Sex",
slypos_demographics_gender.factor ~ "Gender-Variant Identity",
slypos_demographics_language.factor ~ "Native English Speaker",
slypos_demographics_work_or_school.factor ~ "Occupational Status",
slypos_demographics_school.factor ~ "Occupational setting"
),
missing="no"
) %>% add_overall() %>% bold_labels() %>%
# add_p() %>% add_q() %>%
modify_header(label ~ "**Variable**") %>%
# separate_p_footnotes() %>%
modify_caption("Demographic Characteristics of Participants (n=690).") -> desc_table_gender
as_tibble(desc_table) -> desc_tibble
as_kable_extra(desc_table, format="latex",booktabs=T) -> desc_kable #save it as a knitr::kable
#summarise country/time zone data
#The following chunk is not working now. May be package problem (Sorting command is not working)
descriptives.data%>%
tbl_summary(
label=slypos_demographics_tz.factor ~ "Time zone - Country",
statistic=list(all_categorical() ~ "{n} ({p}%)"),
missing="no",
sort=all_categorical() ~ "frequency",
include="slypos_demographics_tz.factor"
) %>% bold_labels() %>%
modify_header(label ~ "") %>%
as_tibble(format='pipe') -> tz_tibble
# # create descriptive table for the demographic vars (excluding tz & Country) with gtsummary
# desctable.data %>%
# tbl_summary(
# by=slypos_demographics_sex.factor,
# statistic=list(all_continuous() ~ "{mean} ({sd})",
# all_categorical() ~ "{n} ({p}%)"),
# digits=all_continuous() ~ 2,
# label=list(slypos_demographics_age ~ "Age",
# # slypos_demographics_sex.factor ~ "Sex",
# slypos_demographics_gender.factor ~ "Gender-Variant Identity",
# slypos_demographics_language.factor ~ "Native English Speaker",
# slypos_demographics_work_or_school.factor ~ "Occupational Status",
# slypos_demographics_school.factor ~ "Occupational setting"
# ),
#
# missing="no"
# ) %>% add_overall() %>% bold_labels() %>%
# # add_p() %>% add_q() %>%
# modify_header(label ~ "**Variable**") %>%
# # separate_p_footnotes() %>%
# modify_caption("Demographic Characteristics of Participants (n=690).") -> desc_table
#
# as_tibble(desc_table) -> desc_tibble
# as_kable_extra(desc_table, format="latex",booktabs=T) -> desc_kable #save it as a knitr::kable
```
```{r demotab, warning=F, message=F}
desc_kable %>% kable_styling(latex_options=c("scale_down")) %>% landscape()
```
```{r EFAdata, include=FALSE}
#This chunk holds code for creating EFA data subset
### EFA data
EFA.data <- sem.data[1:428, ]
#library(VIM)
missing <- VIM::aggr(EFA.data, plot =T)
CFA.data <- sem.data[429:690,]
```
# Results
Our results focus on the development of the LEBA inventory and its psychometric validation using a large scale online sample data (n=`r nrow(data)`).
## Development of the initial item pool
To capture the human light exposure related behaviours, 48 items were developed by an expert panel (all authors -- researchers from chronobiology, light research, neuroscience and psychology in different geographical contexts). Face validity examination by each panel member indicated all items were relevant and a few modifications were suggested. The author team discussed the suggestions and amended the items as indicated, thus creating a 48-item inventory.
## Measurement of light exposure behaviour in an online sample
We conducted two rounds of large scale online survey between 17 May 2021 and 3 September 2021 to generate data from `r nrow(data)` participants with varied geographic locations (countries=`r nrow(num.countries)`; time-zone=`r nrow(numUTC)`). For a complete list of geographic locations, see **Supplementary Table 2**. Table 1 presents the survey participants' demographic characteristics. Only participants completing the full LEBA inventory were included. We used the data from first round for the exploratory factor analysis (EFA sample; n=`r nrow(EFA.data)`) and data from the second round was used in the confirmatory factor analysis (CFA sample; n=`r nrow(CFA.data)`). Participants in our survey were aged between `r min(desctable.data$slypos_demographics_age)` to `r max(desctable.data$slypos_demographics_age)` years, with an overall mean of \~ `r round(mean(desctable.data$slypos_demographics_age), 2)` years of age [Overall: `r mean(desctable.data$slypos_demographics_age)`±`r sd(desctable.data$slypos_demographics_age)`; EFA: `r mean(desctable.data$slypos_demographics_age[desctable.data$IncludedInCFA == "1. EFA Sample"])`±`r sd(desctable.data$slypos_demographics_age[desctable.data$IncludedInCFA == "1. EFA Sample"])`; CFA: `r mean(desctable.data$slypos_demographics_age[desctable.data$IncludedInCFA == "2. CFA Sample"])`±`r sd(desctable.data$slypos_demographics_age[desctable.data$IncludedInCFA == "2. CFA Sample"])`]. In the entire sample, `r desc_tibble[4,2]` were male, `r desc_tibble[3,2]` were female, `r desc_tibble[5,2]` reported other sex, and `r desc_tibble[6,2]` reported a gender-variant identity. In a "Yes/No" question regarding native language, `r desc_tibble[7,2]` of respondents [EFA: `r desc_tibble[7,3]`; CFA: `r desc_tibble[7,4]`] indicated to be native English speakers. For their "Occupational Status", more than half of the overall sample (`r desc_tibble[9,2]`) reported that they currently work, whereas `r desc_tibble[10,2]` reported that they go to school, and `r desc_tibble[11,2]` responded that they do "Neither". With respect to the COVID-19 pandemic, we asked participants to indicate their occupational setting during the last four weeks: In the entire sample, `r desc_tibble[13,2]` of the participants indicated that they were in a home office/ home schooling setting, `r desc_tibble[14,2]` reported face-to-face work/schooling, `r desc_tibble[15,2]` reported a combination of home- and face-to-face work/schooling, and `r desc_tibble[16,2]` filled in the "Neither (no work or school, or on vacation)" response option.
## Psychometric analysis: Development of the long form
### Descriptive statistics and item analysis
```{r full-data-mardia, include =F}
mardia.all.data <- psych::mardia(sem.data, na.rm=T, plot =T)
descriptives.all.data <- tabledown::des.tab(sem.data)
```
```{r gtvis, include =F}
#This chunk holds codes for creating 'gtExtra' based descriptive figures (data preparation)
## Recoding sem.data$item8
gt.data <- sem.data
gt.data$item08 <- as.character(gt.data$item08)
gt.data$item08 <- fct_recode(gt.data$item08,
"5"="1",
"4"="2",
"2"="4",
"1"="5"
)
## Recoding gt.data$item26
gt.data$item26 <- as.character(gt.data$item26)
gt.data$item26 <- fct_recode(gt.data$item26,
"5"="1",
"4"="2",
"2"="4",
"1"="5"
)
## Recoding gt.data$item37
gt.data$item37 <- as.character(gt.data$item26)
gt.data$item37 <- fct_recode(gt.data$item26,
"5"="1",
"4"="2",
"2"="4",
"1"="5"
)
# all data Gt Table
##Long table
gt.long <- as.data.frame(gather(gt.data, Items, value))
gt.long$value <- as.numeric(as.character(gt.long$value))
##Summarizing and creating gt object
gt.tab <- gt.long %>%
group_by(Items) %>%
# calculate summary stats & create data for the histogram and density plot
dplyr::summarise(
nr=n(),
mean=mean(value, na.rm=TRUE),
# med=median(value, na.rm=TRUE),
sd=sd(value, na.rm=TRUE),
hist_data=list(value),
dens_data=list(value),
.groups="drop"
) %>%
gt()
gt.tab1 <- gt.tab$`_data`
gt.tab2 <- gt.tab1[,-c(1,2)]
vars_labels=as.data.frame(sapply(sem.data,
function(x){attr(x,"label")}))
vars_labels<- tibble::rownames_to_column(vars_labels, "Items")
colnames(vars_labels) <- c("Item", "Stem")
gt.tab3 <- cbind(vars_labels, gt.tab2[,c(1,2)], descriptives.all.data$Normality,gt.tab2[,c(3,4)] )
colnames(gt.tab3) <- c("Item", "Stem", "mean", "sd","S-W Statistics", "hist_data","dens_data" )
#Preparation for likert data
LEBA.likert <- as.data.frame(gt.data)
recod_LEBA <- c( "1"="Never", "2"="Rarely", "3"= "Sometimes","4"="Often",
"5"="Always")
LEBA.likert <- mutate(LEBA.likert, across(starts_with("item"), ~unname(recod_LEBA[.])))
LEBA.Factor=as.data.frame(lapply(LEBA.likert,factor,
ordered=T))
#get the items name
items <- names(LEBA.Factor)
#Calculate percentage
percentage <- kutils::likert(LEBA.Factor, vlist=items )
percentage <- percentage$table %>%
as.data.frame(.)
#data wrangling
labels <- c("Always", "Never","Often", "Rarely", "Sometimes","Total")
as.data.frame(labels)
full.percentage <- cbind(labels,percentage) #tables with labels
full.percentage<- t(full.percentage ) #transpose
as.data.frame(full.percentage)
full.percentage1 <- full.percentage[-1,-6] #removing 1st row and total column
full.percentage2 <- full.percentage1[, c(2, 4, 5, 3,1)]# rearranging
as.data.frame(full.percentage2)
colnames(full.percentage2) <- c("Never","Rarely","Sometimes","Often","Always")
Items <- rownames(full.percentage2)
as.data.frame(Items)
full.percentage3 <- cbind(Items,full.percentage2)
full.percentage3 <- full.percentage3[order(Items),]
full.percentage3 <- as.data.frame(full.percentage3[,-1]) %>%
gt()
liket.full <- full.percentage3$"_data"
full.table <- cbind( gt.tab3, liket.full)%>%
gt()
```
```{r fullgt, include=FALSE}
#This chunk holds codes for creating 'gtExtra' based descriptive figures
full.tab <- full.table$`_data`
full.tab.1 <- full.tab[1:24,] %>%
gt()
full.tab.2 <- full.tab[25:48,] %>%
gt()
full.tab.1 %>%
# histogram and density plots
gtExtras::gt_plt_dist(
hist_data,
type="histogram",
line_color="black",
fill_color="#00A08799",
bw=1,
same_limit=TRUE)%>%
gtExtras::gt_plt_dist(
dens_data,
type="density",
line_color="black",
fill_color="grey",
bw=0.75,
same_limit=TRUE
)%>%
# format decimals
fmt_number(columns=mean:sd, decimals=1) %>%
# header
tab_header(
title=md("Summary Descriptives (n=690)"),
subtitle=md("Items 01-24 ")) %>%
cols_align(
align="left",
columns=Item:Stem
) %>%
tab_spanner(
label="Summary Statistics",
columns=mean:sd
) %>%
tab_spanner(
label="Graphics",
columns=hist_data:dens_data
) %>%
tab_spanner(
label="Response Pattern",
columns=Never:Always
) %>%
tab_footnote(
footnote=md("**Shapiro–Wilk test**"),
locations=cells_column_labels(columns=`S-W Statistics`)
) %>%
# change column names to appear in the table
cols_label(
Item=("Items"),
Stem=("Stem"),
mean=("Mean"),
sd=(("SD")),
`S-W Statistics`=("SW"),
hist_data="Histogram",
dens_data="Density"
) %>%
# set alignment as per wish
cols_align(
align="center",
columns=mean:Always
) %>%
opt_align_table_header(align="left") %>%
# add coloured dots and lines on the first column
gt_plt_dot(
mean,
Item,
palette="ggthemes::fivethirtyeight"
) %>% tab_options(
table.font.size=px(14L)) %>%
cols_width(
Stem ~ px(200)) %>%
gtsave("Figures/Figure2.png", vwidth=6000)
full.tab.2 %>%
# histogram and density plots
gtExtras::gt_plt_dist(
hist_data,
type="histogram",
line_color="black",
fill_color="#00A08799",
bw=1,
same_limit=TRUE)%>%
gtExtras::gt_plt_dist(
dens_data,
type="density",
line_color="black",
fill_color="grey",
bw=0.75,
same_limit=TRUE
)%>%
# format decimals
fmt_number(columns=mean:sd, decimals=1) %>%
# header
tab_header(
title=md("Summary Descriptives (n=690)"),
subtitle=md("Items 25-48 ")) %>%
#create groups of columns
# tab_spanner(
# label="Item",
# columns=Item:Stem
# ) %>%
cols_align(
align="left",
columns=Item:Stem
) %>%
tab_spanner(
label="Summary Statistics",
columns=mean:sd
) %>%
tab_spanner(
label="Graphics",
columns=hist_data:dens_data
) %>%
tab_spanner(
label="Response Pattern",
columns=Never:Always
) %>%
tab_footnote(
footnote=md("**Shapiro–Wilk test**"),
locations=cells_column_labels(columns=`S-W Statistics`)
) %>%
# change column names to appear in the table
cols_label(
Item=("LEBA Items"),
Stem=("Stem"),
mean=("Mean"),
sd=(("SD")),
`S-W Statistics`=("SW"),
hist_data="Histogram",
dens_data="Density"
) %>%
# set alignment as per wish
cols_align(
align="center",
columns=mean:Always
) %>%
opt_align_table_header(align="left") %>%
# add coloured dots and lines on the first column
gt_plt_dot(
mean,
Item,
palette="ggthemes::fivethirtyeight"
) %>% tab_options(
table.font.size=px(14L)) %>%
cols_width(
Stem ~ px(200)) %>%
gtsave("Figures/Figure3.png",vwidth=6000)
```
```{r efagtPic1, echo=FALSE, fig.cap= 'Summary descriptives and response pattern observed in the large-scale survey for item 01-24. All items violated normality assumption.', out.height='100%', out.width='250%'}
knitr::include_graphics('Figures/Figure2.png')
```
```{r efagtPic2, echo=FALSE, fig.cap= 'Summary descriptives and response pattern observed in the large-scale survey for item 25-48. All items violated normality assumption.', out.height='100%', out.width='250%'}
knitr::include_graphics('Figures/Figure3.png')
```
We observed that the response patterns of LEBA inventory for the entire sample (n=`r nrow(sem.data)`) were not normally distributed (Figures \@ref(fig:efagtPic1) and \@ref(fig:efagtPic2)). All items violated both univariate [@shapiroAnalysisVarianceTest1965] and multivariate normality [@mardiaMeasuresMultivariateSkewness1970]. The multivariate skewness was`r printnum(mardia.all.data$b1p)` (p<0.001) and the multivariate kurtosis was `r printnum(mardia.all.data$b2p)` (p<0.001).
```{r EFAassumptions, include=FALSE}
#This chunk holds code for checking assumptions of EFA
#KMO test
KMO <- psych::KMO(EFA.data)
# Test of correlation matrix
bartlet <- psych::cortest.bartlett(EFA.data, n =428)
#Histogram
psych::multi.hist(EFA.data[,sapply(EFA.data, is.numeric)])
# Univariate normality
descriptives <- tabledown::des.tab(EFA.data)
colnames(descriptives) <- c("Items", "Mean", "SD", "Skew", "Kurtosis", "SW", "Item Total Correlation")
vars_labels=as.data.frame(sapply(EFA.data,
function(x){attr(x,"label")}))
vars_labels<- tibble::rownames_to_column(vars_labels, "Items")
colnames(vars_labels) <- c("Item", "Stem")
descriptives2 <- cbind(vars_labels, descriptives[,-1])
# Multivariate Normality
mardia <- psych::mardia(EFA.data, na.rm=T, plot =T)
```
```{r ItemAnalysis, include=FALSE}
#This chunk holds code for Item analysis (Classical Test Theory)
# Item analysis
Item_analysis <- psych::alpha(EFA.data,check.keys=TRUE)
Item_analysis$item.stats$r.cor
low.r.corec <- (min(Item_analysis$item.stats$r.cor)) #minimum item total correlation
high.r.corec <- (max(Item_analysis$item.stats$r.cor)) # maximum item total correlation
```
```{r gt-EFA, include =F}
#EFA data
gt.efa.data <- EFA.data
# gt.efa.data.table <- gt.efa.data %>%
# dplyr::select(item16, item36, item17,
# item11, item10,item12,item07,item08,item09,
# item27, item03, item40, item30, item41,
# item33, item32,item35, item37,item38,
# item46, item45, item25, item04, item01,item26)
#Creating long data
gt.efa.long <- as.data.frame(gather(gt.efa.data, Items, value))
gt.efa.long$value <- as.numeric(as.character(gt.efa.long$value))
#Summarizing and creating gt object
gt.efa.tab <- gt.efa.long %>%
group_by(Items) %>%
# calculate summary stats & create data for the histogram and density plot
dplyr::summarise(
# nr=n(),
# mean=mean(value, na.rm=TRUE),
# med=median(value, na.rm=TRUE),
# sd=sd(value, na.rm=TRUE),
hist_data=list(value),
dens_data=list(value),
.groups="drop"
) %>%
gt()
#Preparation for likert data
efa.LEBA.likert <- as.data.frame(gt.efa.data)
recod_LEBA <- c( "1"="Never", "2"="Rarely", "3"= "Sometimes","4"="Often",
"5"="Always")
efa.LEBA.likert <- mutate(efa.LEBA.likert, across(starts_with("item"), ~unname(recod_LEBA[.])))
efa.LEBA.Factor=as.data.frame(lapply(efa.LEBA.likert,factor,
ordered=T))
#get the items name
efa.items <- names(efa.LEBA.Factor)
#Calculate percentage
efa.percentage <- kutils::likert(efa.LEBA.Factor, vlist=efa.items )
efa.percentage <- efa.percentage$table %>%
as.data.frame(.)
#data wrangling
labels <- c("Always", "Never","Often", "Rarely", "Sometimes","Total")
as.data.frame(labels)
full.efa.percentage <- cbind(labels,efa.percentage) #tables with labels
full.efa.percentage<- t(full.efa.percentage ) #transpose
as.data.frame(full.efa.percentage)
full.efa.percentage1 <- full.efa.percentage[-1,-6] #removing 1st row and total column
full.efa.percentage2 <- full.efa.percentage1[, c(2, 4, 5, 3,1)]# rearranging
as.data.frame(full.efa.percentage2)
colnames(full.efa.percentage2) <- c("Never","Rarely","Sometimes","Often","Always")
efa.Items <- rownames(full.efa.percentage2)
as.data.frame(efa.Items)
full.efa.percentage3 <- cbind(efa.Items,full.efa.percentage2)
full.efa.percentage3 <- full.efa.percentage3[order(efa.Items),]
full.efa.percentage3 <- as.data.frame(full.efa.percentage3[,-1]) %>%
gt()
gt.efa.table <- gt.efa.tab$'_data'
gt.liket.efa <- full.efa.percentage3$"_data"
efaTable <- cbind( gt.efa.table, gt.liket.efa)%>%
gt()
efa.gt <- efaTable$"_data"
efa.gt.2 <- cbind(descriptives2[,-2], efa.gt[,-1])
```
```{r efagt,include=F}
#This chunk holds codes for creating 'gtExtra' based descriptive figures (EFA descriptives Supplementary
efa.gt.2 %>%
gt() %>%
# histogram and density plots
gtExtras::gt_plt_dist(
hist_data,
type="histogram",
line_color="black",
fill_color="#00A08799",
bw=1,
same_limit=TRUE)%>%
gtExtras::gt_plt_dist(
dens_data,
type="density",
line_color="black",
fill_color="#E64B3599",
bw=0.75,
same_limit=TRUE
)%>%
# # format decimals
# fmt_number(columns=mean:sd, decimals=1) %>%
# header
tab_header(
title=md("**Light Exposure Behaviour Assessment**"),
subtitle=md("Summary Descriptives EFA Sample (n=428)")
) %>%
tab_footnote(
footnote=md("**Shapiro–Wilk test**"),
locations=cells_column_labels(columns=SW)
) %>%
#create groups of columns