-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
159 lines (136 loc) · 8.28 KB
/
README.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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# Effects of human-animal interactions on affect and cognition
This repository provides the reproducible research materials for our project that investigates the characteristics of dogs, owners, and their interaction that predict dog training success. This includes the following:
* Data
* R script for data analysis
* R Markdown file for the manuscript
* R Markdown file for supplementary materials
# Citation
If you use any of these materials, please cite:
Thayer, E.R. & Stevens, J.R. (2021). Effects of human-animal interactions on affect and cognition. _PsyArXiv_. doi: 10.31234/osf.io/7v5nq
# Summary
Two experiments were conducted with 73 and 84 participants from the University of Nebraska-Lincoln Department of Psychology undergraduate participant pool between September-November 2018 and November 2018-April 2019. Each experiment generated two data files: one for the primary affective, cognitive, and pet-related measures for each participant and one with the survey item responses for calculating Cronbach's alpha. For each of these data files, both experiments are included and labeled. For the primary analysis data file, each row represents all of a single participant's responses. For the survey item data file, each row represents a participant's responses to a particular survey.
# License
All materials presented here are released under the Creative Commons Attribution 4.0 International Public License (CC BY 4.0). You are free to:
* Share — copy and redistribute the material in any medium or format
* Adapt — remix, transform, and build upon the material for any purpose, even commercially.
Under the following terms:
* Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
# Files
## Data files
`thayer_stevens_2021_data1.csv` (primary affective and cognitive data set)
* experiment - experiment number (1 or 2)
* date - date participant completed experiment
* participant - participant number
* condition - experimental condition (hai = human-animal interaction, control)
* age_num - participant age
* gender - participant gender
* race - participant race/ethnicity
* parent_income - participant's parental income
* pas - Pet Attitude Scale mean score
* pets_now - response to whether participant currently has pet (1 = yes, 0 = now)
* pets_child - response to whether participant had pet as child (1 = yes, 0 = now)
* dog_discomfort_revkey - response to Gee et al.'s discomfort toward dog (reverse coded)
* dog_ambivalence_revkey - response to Gee et al.'s ambivalence toward dogreverse coded)
* dog_desire_to_interact - response to Gee et al.'s desire to interact with dog
* dog_comfort - response to Gee et al.'s comfort toward dogreverse coded)
* duration_interaction - duration of interaction with dog (in seconds)
* panas_pre_neg - pre-condition PANAS score for negative affect
* panas_pre_pos - pre-condition PANAS score for positive affect
* panas_post_neg - post-condition PANAS score for negative affect
* panas_post_pos - post-condition PANAS score for positive affect
* panas_pos_diff - pre-post difference for PANAS score for positive affect
* panas_neg_diff - pre-post difference for PANAS score for negative affect
* vas_anxiety_pre - pre-condition visual analog scale for anxiety
* vas_anxiety_post - post-condition visual analog scale for anxiety
* vas_stress_pre - pre-condition visual analog scale for stress
* vas_stress_post - post-condition visual analog scale for stress
* stai_trait - trait score of State-Trait Anxiety Index
* stai_state - state score of State-Trait Anxiety Index
* drm_accuracy - accuracy score for Deese-Roedinger-McDermott long-term memory task
* drm_d_prime - d' score for Deese-Roedinger-McDermott long-term memory task
* ncpc_pre_diff - pre-condition difference between second and first trial of Necker Cube Pattern Control Test
* ncpc_post_diff - post-condition difference between second and first trial of Necker Cube Pattern Control Test
* ncpc_diff - pre-post difference for difference between second and first trial of Necker Cube Pattern Control Test
* bds_index_pre - pre-condition backwards digit span index
* bds_index_post - post-condition backwards digit span index
* bds_index_diff - pre-post difference for backwards digit span index
* nback_d_prime_pre - pre-condition d' for n-back task
* nback_d_prime_post - post-condition d' for n-back task
* nback_d_prime_diff - pre-post difference for d' for n-back task
`thayer_stevens_2021_data2.csv` (item-specific data for calculating reliability)
* item_1-item_20 - individual items (surveys differ on number of items, so NAs represent no items)
* survey - name of survey
## R code
`thayer_stevens_2021_rcode.R` - code for running computations and generating figures
## R Markdown documents
`thayer_stevens_2021.Rmd` - R Markdown document with R code embedded for main manuscript
`thayer_stevens_2021_SM.Rmd` - R Markdown document with R code embedded for supplementary materials
## Installation
To reproduce these results, first clone or unzip the Git repository into a folder. Then, ensure that subfolders named `data/`, `docs/`, `figures/`, and `R/` are in the folder. The best way to work with this material is to open the `haicognition2021.Rproj` file in RStudio. Next, open `thayer_stevens_2021_rcode.R` and ensure that all packages mentioned at the top of the script are installed. Once all packages are installed, run the script in R using `source("thayer_stevens_2021_rcode.R")`.
Once the script runs without errors, you can compile the R Markdown document `thayer_stevens_2021.Rmd.` Open this file in RStudio and ensure that you have packages [{knitr}](https://yihui.org/knitr/) and [{rmarkdown}](https://github.com/rstudio/rmarkdown) installed. Once installed, use {knitr} to render the document (control-shift-k). Use the same process to render `thayer_stevens_2021_SM.Rmd`.
### Dataset Metadata
The following table is necessary for this dataset to be indexed by search
engines such as <a href="https://g.co/datasetsearch">Google Dataset Search</a>.
<div itemscope itemtype="http://schema.org/Dataset">
<table>
<tr>
<th>property</th>
<th>value</th>
</tr>
<tr>
<td>name</td>
<td><code itemprop="name">Effects of human-animal interactions on affect and cognition dataset</code></td>
</tr>
<tr>
<td>description</td>
<td><code itemprop="description">The dataset from the paper [Effects of human-animal interactions on affect and cognition](https://doi.org/10.31234/osf.io/7v5nq). Two experiments were conducted with 73 and 84 participants from the University of Nebraska-Lincoln Department of Psychology undergraduate participant pool between September-November 2018 and November 2018-April 2019. Each experiment generated two data files: one for the primary affective, cognitive, and pet-related measures for each participant and one with the survey item responses for calculating Cronbach's alpha. For each of these data files, both experiments are included and labeled. For the primary analysis data file, each row represents all of a single participant's responses. For the survey item data file, each row represents a participant's responses to a particular survey.</code></td>
</tr>
</tr>
<tr>
<td>url</td>
<td><code itemprop="url">https://github.com/unl-cchil/haicognition2021</code></td>
</tr>
<tr>
<td>sameAs</td>
<td><code itemprop="sameAs">https://github.com/unl-cchil/haicognition2021</code></td>
</tr>
<tr>
<td>citation</td>
<td><code itemprop="citation">https://doi.org/10.31234/osf.io/7v5nq</code></td>
</tr>
<tr>
<td>license</td>
<td>
<div itemscope itemtype="http://schema.org/CreativeWork" itemprop="license">
<table>
<tr>
<th>property</th>
<th>value</th>
</tr>
<tr>
<td>name</td>
<td><code itemprop="name">CC BY-SA 4.0</code></td>
</tr>
<tr>
<td>url</td>
<td><code itemprop="url">https://creativecommons.org/licenses/by-sa/4.0/</code></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>