if (!require(haven)){
install.packages("haven", dependencies = TRUE)
require(haven)
}Loading required package: haven
if (!require(haven)){
install.packages("haven", dependencies = TRUE)
require(haven)
}Loading required package: haven
if (!require(tidyverse)){
install.packages("tidyverse", dependencies = TRUE)
require(tidyverse)
}Loading required package: tidyverse
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
✔ ggplot2 3.4.0 ✔ purrr 1.0.1
✔ tibble 3.1.8 ✔ dplyr 1.0.10
✔ tidyr 1.2.1 ✔ stringr 1.5.0
✔ readr 2.1.3 ✔ forcats 0.5.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
if (!require(summarytools)){
install.packages("summarytools", dependencies = TRUE)
require(summarytools)
}Loading required package: summarytools
Warning in fun(libname, pkgname): couldn't connect to display ":0"
system might not have X11 capabilities; in case of errors when using dfSummary(), set st_options(use.x11 = FALSE)
Attaching package: 'summarytools'
The following object is masked from 'package:tibble':
view
if (!require(afex)){
install.packages("afex", dependencies = TRUE)
require(afex)
}Loading required package: afex
Loading required package: lme4
Loading required package: Matrix
Attaching package: 'Matrix'
The following objects are masked from 'package:tidyr':
expand, pack, unpack
************
Welcome to afex. For support visit: http://afex.singmann.science/
- Functions for ANOVAs: aov_car(), aov_ez(), and aov_4()
- Methods for calculating p-values with mixed(): 'S', 'KR', 'LRT', and 'PB'
- 'afex_aov' and 'mixed' objects can be passed to emmeans() for follow-up tests
- NEWS: emmeans() for ANOVA models now uses model = 'multivariate' as default.
- Get and set global package options with: afex_options()
- Set orthogonal sum-to-zero contrasts globally: set_sum_contrasts()
- For example analyses see: browseVignettes("afex")
************
Attaching package: 'afex'
The following object is masked from 'package:lme4':
lmer
if (!require(psych)){
install.packages("psych", dependencies = TRUE)
require(psych)
}Loading required package: psych
Attaching package: 'psych'
The following objects are masked from 'package:ggplot2':
%+%, alpha
dataset <- read_sav("BNN Data.sav.sav")(dataset %>%
filter(Duration__in_seconds_ > 130)-> dataset.clean)# A tibble: 21 × 55
StartDate EndDate Status IPAdd…¹ Progr…² Durat…³
<dttm> <dttm> <dbl+lbl> <chr> <dbl> <dbl>
1 2023-04-05 14:30:49 2023-04-05 14:34:12 0 [IP Addres… 107.77… 100 203
2 2023-04-05 15:14:46 2023-04-05 15:20:35 0 [IP Addres… 73.173… 100 348
3 2023-04-05 15:38:24 2023-04-05 15:41:12 0 [IP Addres… 174.21… 100 168
4 2023-04-05 23:43:00 2023-04-05 23:49:24 0 [IP Addres… 99.145… 100 383
5 2023-04-05 17:23:51 2023-04-05 17:27:50 0 [IP Addres… 73.42.… 98 238
6 2023-04-19 12:00:46 2023-04-19 12:06:40 0 [IP Addres… 172.59… 100 354
7 2023-04-19 13:12:24 2023-04-19 13:16:35 0 [IP Addres… 139.62… 100 250
8 2023-04-19 13:18:09 2023-04-19 13:22:12 0 [IP Addres… 139.62… 100 242
9 2023-04-19 14:01:52 2023-04-19 14:05:56 0 [IP Addres… 96.90.… 100 243
10 2023-04-19 15:59:09 2023-04-19 16:01:28 0 [IP Addres… 139.62… 100 138
# … with 11 more rows, 49 more variables: Finished <dbl+lbl>,
# RecordedDate <dttm>, ResponseId <chr>, RecipientLastName <chr>,
# RecipientFirstName <chr>, RecipientEmail <chr>, ExternalReference <chr>,
# LocationLatitude <chr>, LocationLongitude <chr>, DistributionChannel <chr>,
# UserLanguage <chr>, Consent_Response <dbl+lbl>, Happiness_1 <dbl+lbl>,
# Happiness_2 <dbl+lbl>, Happiness_3 <dbl+lbl>, Happiness_4 <dbl+lbl>,
# Happiness_5 <dbl+lbl>, Happiness_6 <dbl+lbl>, Happiness_7 <dbl+lbl>, …
print(dfSummary(dataset.clean, graph.magnif = .75), method = 'render')Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
Warning in png(png_loc <- tempfile(fileext = ".png"), width = 150 *
graph.magnif, : unable to open connection to X11 display ''
| No | Variable | Label | Stats / Values | Freqs (% of Valid) | Graph | Valid | Missing | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | StartDate [POSIXct, POSIXt] | Start Date |
|
21 distinct values | 21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | EndDate [POSIXct, POSIXt] | End Date |
|
21 distinct values | 21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | Status [haven_labelled, vctrs_vctr, double] | Response Type | 1 distinct value |
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | IPAddress [character] | IP Address |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | Progress [numeric] | Progress |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | Duration__in_seconds_ [numeric] | Duration (in seconds) |
|
21 distinct values | 21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | Finished [haven_labelled, vctrs_vctr, double] | Finished |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | RecordedDate [POSIXct, POSIXt] | Recorded Date |
|
21 distinct values | 21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | ResponseId [character] | Response ID |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | RecipientLastName [character] | Recipient Last Name |
|
21 (100.0%) | 0 (0.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | RecipientFirstName [character] | Recipient First Name |
|
21 (100.0%) | 0 (0.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | RecipientEmail [character] | Recipient Email |
|
21 (100.0%) | 0 (0.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | ExternalReference [character] | External Data Reference |
|
21 (100.0%) | 0 (0.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | LocationLatitude [character] | Location Latitude |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | LocationLongitude [character] | Location Longitude |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | DistributionChannel [character] | Distribution Channel | 1. anonymous |
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | UserLanguage [character] | User Language | 1. EN |
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | Consent_Response [haven_labelled, vctrs_vctr, double] | Click to write the question text | 1 distinct value |
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | Happiness_1 [haven_labelled, vctrs_vctr, double] | I don't feel particularly pleased with the way I am. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | Happiness_2 [haven_labelled, vctrs_vctr, double] | I am intensely interested in other people. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | Happiness_3 [haven_labelled, vctrs_vctr, double] | I feel that life is very rewarding. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | Happiness_4 [haven_labelled, vctrs_vctr, double] | I have very warm feelings towards almost everyone |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | Happiness_5 [haven_labelled, vctrs_vctr, double] | I rarely wake up feeling rested. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | Happiness_6 [haven_labelled, vctrs_vctr, double] | I am not particularly optimistic about the future. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | Happiness_7 [haven_labelled, vctrs_vctr, double] | I find most things amusing. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | Happiness_8 [haven_labelled, vctrs_vctr, double] | I am always committed and involved. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | Happiness_9 [haven_labelled, vctrs_vctr, double] | Life is good. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | Happiness_10 [haven_labelled, vctrs_vctr, double] | I do no think that the world is a good place. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | Happiness_11 [haven_labelled, vctrs_vctr, double] | I laugh a lot. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | Happiness_12 [haven_labelled, vctrs_vctr, double] | I am well satisfied about everything in my life. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | Happiness_13 [haven_labelled, vctrs_vctr, double] | I don't think I look attractive. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | Happiness_14 [haven_labelled, vctrs_vctr, double] | There is a gap between what I would like to do and what I have done. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | Happiness_15 [haven_labelled, vctrs_vctr, double] | I am very happy. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | Happiness_16 [haven_labelled, vctrs_vctr, double] | I find beauty in some things. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | Happiness_17 [haven_labelled, vctrs_vctr, double] | I always have a cheerful effect on others. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | Happiness_18 [haven_labelled, vctrs_vctr, double] | I can fit in (find time for) everything I want to. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | Happiness_19 [haven_labelled, vctrs_vctr, double] | I feel that I am not especially in control of my life. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | Happiness_20 [haven_labelled, vctrs_vctr, double] | I feel able to take anything on. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | Happiness_21 [haven_labelled, vctrs_vctr, double] | I feel fully mentally alert. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | Happiness_22 [haven_labelled, vctrs_vctr, double] | I often enjoy experience joy and elation. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | Happiness_23 [haven_labelled, vctrs_vctr, double] | I don't find it easy to make decisions. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | Happiness_24 [haven_labelled, vctrs_vctr, double] | I don't have a particular sense of meaning and purpose in my life. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | Happiness_25 [haven_labelled, vctrs_vctr, double] | I feel I have a great deal of energy. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | Happiness_26 [haven_labelled, vctrs_vctr, double] | I usually don't have a good influence on events. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | Happiness_27 [haven_labelled, vctrs_vctr, double] | I don't have fun with other people. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | Happiness_28 [haven_labelled, vctrs_vctr, double] | I don't feel particularly healthy. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | Happiness_29 [haven_labelled, vctrs_vctr, double] | I don't have particularly happy memories of that past. |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | Gender [character] | Which Gender would you say best describes you? |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | Age [numeric] | How old are you? |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | Race [character] | What Race would you say best describes you? |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | Political_StandPoint [haven_labelled, vctrs_vctr, double] | Which of the following best describes you? |
|
|
21 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | FL_10_DO_CatPositive [numeric] | FL_10 - Block Randomizer - Display Order CatPositive | 1 distinct value |
|
4 (19.0%) | 17 (81.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | FL_10_DO_CatNegative [numeric] | FL_10 - Block Randomizer - Display Order CatNegative | 1 distinct value |
|
5 (23.8%) | 16 (76.2%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | FL_10_DO_DogPositive [numeric] | FL_10 - Block Randomizer - Display Order DogPositive | 1 distinct value |
|
6 (28.6%) | 15 (71.4%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | FL_10_DO_DogNegative [numeric] | FL_10 - Block Randomizer - Display Order DogNegative | 1 distinct value |
|
6 (28.6%) | 15 (71.4%) |
Generated by summarytools 1.0.1 (R version 4.2.2)
2023-04-26
(dataset.clean %>%
mutate(animalIV = case_when(FL_10_DO_CatNegative == 1 ~ "cat",
FL_10_DO_CatPositive == 1 ~ "cat",
FL_10_DO_DogNegative == 1 ~ "dog",
FL_10_DO_DogPositive == 1 ~ "dog")) -> dataset.clean)# A tibble: 21 × 56
StartDate EndDate Status IPAdd…¹ Progr…² Durat…³
<dttm> <dttm> <dbl+lbl> <chr> <dbl> <dbl>
1 2023-04-05 14:30:49 2023-04-05 14:34:12 0 [IP Addres… 107.77… 100 203
2 2023-04-05 15:14:46 2023-04-05 15:20:35 0 [IP Addres… 73.173… 100 348
3 2023-04-05 15:38:24 2023-04-05 15:41:12 0 [IP Addres… 174.21… 100 168
4 2023-04-05 23:43:00 2023-04-05 23:49:24 0 [IP Addres… 99.145… 100 383
5 2023-04-05 17:23:51 2023-04-05 17:27:50 0 [IP Addres… 73.42.… 98 238
6 2023-04-19 12:00:46 2023-04-19 12:06:40 0 [IP Addres… 172.59… 100 354
7 2023-04-19 13:12:24 2023-04-19 13:16:35 0 [IP Addres… 139.62… 100 250
8 2023-04-19 13:18:09 2023-04-19 13:22:12 0 [IP Addres… 139.62… 100 242
9 2023-04-19 14:01:52 2023-04-19 14:05:56 0 [IP Addres… 96.90.… 100 243
10 2023-04-19 15:59:09 2023-04-19 16:01:28 0 [IP Addres… 139.62… 100 138
# … with 11 more rows, 50 more variables: Finished <dbl+lbl>,
# RecordedDate <dttm>, ResponseId <chr>, RecipientLastName <chr>,
# RecipientFirstName <chr>, RecipientEmail <chr>, ExternalReference <chr>,
# LocationLatitude <chr>, LocationLongitude <chr>, DistributionChannel <chr>,
# UserLanguage <chr>, Consent_Response <dbl+lbl>, Happiness_1 <dbl+lbl>,
# Happiness_2 <dbl+lbl>, Happiness_3 <dbl+lbl>, Happiness_4 <dbl+lbl>,
# Happiness_5 <dbl+lbl>, Happiness_6 <dbl+lbl>, Happiness_7 <dbl+lbl>, …
(dataset.clean %>%
mutate(valenceIV = case_when(FL_10_DO_CatNegative == 1 ~ "negative",
FL_10_DO_CatPositive == 1 ~ "positive",
FL_10_DO_DogNegative == 1 ~ "negative",
FL_10_DO_DogPositive == 1 ~ "positive")) -> dataset.clean)# A tibble: 21 × 57
StartDate EndDate Status IPAdd…¹ Progr…² Durat…³
<dttm> <dttm> <dbl+lbl> <chr> <dbl> <dbl>
1 2023-04-05 14:30:49 2023-04-05 14:34:12 0 [IP Addres… 107.77… 100 203
2 2023-04-05 15:14:46 2023-04-05 15:20:35 0 [IP Addres… 73.173… 100 348
3 2023-04-05 15:38:24 2023-04-05 15:41:12 0 [IP Addres… 174.21… 100 168
4 2023-04-05 23:43:00 2023-04-05 23:49:24 0 [IP Addres… 99.145… 100 383
5 2023-04-05 17:23:51 2023-04-05 17:27:50 0 [IP Addres… 73.42.… 98 238
6 2023-04-19 12:00:46 2023-04-19 12:06:40 0 [IP Addres… 172.59… 100 354
7 2023-04-19 13:12:24 2023-04-19 13:16:35 0 [IP Addres… 139.62… 100 250
8 2023-04-19 13:18:09 2023-04-19 13:22:12 0 [IP Addres… 139.62… 100 242
9 2023-04-19 14:01:52 2023-04-19 14:05:56 0 [IP Addres… 96.90.… 100 243
10 2023-04-19 15:59:09 2023-04-19 16:01:28 0 [IP Addres… 139.62… 100 138
# … with 11 more rows, 51 more variables: Finished <dbl+lbl>,
# RecordedDate <dttm>, ResponseId <chr>, RecipientLastName <chr>,
# RecipientFirstName <chr>, RecipientEmail <chr>, ExternalReference <chr>,
# LocationLatitude <chr>, LocationLongitude <chr>, DistributionChannel <chr>,
# UserLanguage <chr>, Consent_Response <dbl+lbl>, Happiness_1 <dbl+lbl>,
# Happiness_2 <dbl+lbl>, Happiness_3 <dbl+lbl>, Happiness_4 <dbl+lbl>,
# Happiness_5 <dbl+lbl>, Happiness_6 <dbl+lbl>, Happiness_7 <dbl+lbl>, …
#create dataframe with only relevant variables to work with
dataset.clean %>%
select (starts_with("Happi"))-> happy
#create list of 'keys'. The numbers just refer to the order of the question in the data.frame() you just made. The most important thing is to mark the questions that should be reversed scored with a '-'.
happy.keys <- make.keys(happy, list(happy=c(-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)))
#score the scale
happy.scales <- scoreItems (happy.keys, happy)In smc, smcs < 0 were set to .0
#save the scores
happy.scores <- happy.scales$scores
#save the scores back in 'dataset'
dataset.clean$happy <- happy.scores[,]
#print the cronbach alpha
happy.scales$alpha happy
alpha 0.8905817
dataset.clean %>%
group_by(animalIV, valenceIV) %>%
summarise(mean = mean(happy, na.rm = TRUE), sd = sd(happy, na.rm = TRUE))`summarise()` has grouped output by 'animalIV'. You can override using the
`.groups` argument.
# A tibble: 4 × 4
# Groups: animalIV [2]
animalIV valenceIV mean sd
<chr> <chr> <dbl> <dbl>
1 cat negative 3.70 0.373
2 cat positive 4.40 0.620
3 dog negative 3.48 0.790
4 dog positive 4.01 0.543
dataset.clean %>%
group_by(animalIV) %>%
summarise(mean = mean(happy, na.rm = TRUE), sd = sd(happy, na.rm = TRUE))# A tibble: 2 × 3
animalIV mean sd
<chr> <dbl> <dbl>
1 cat 4.01 0.589
2 dog 3.74 0.703
dataset.clean %>%
group_by(valenceIV) %>%
summarise(mean = mean(happy, na.rm = TRUE), sd = sd(happy, na.rm = TRUE))# A tibble: 2 × 3
valenceIV mean sd
<chr> <dbl> <dbl>
1 negative 3.58 0.618
2 positive 4.16 0.577
aov_ez(id = "ResponseId",
dv = "happy",
data = dataset.clean,
between=c("animalIV", "valenceIV"))Converting to factor: animalIV, valenceIV
Contrasts set to contr.sum for the following variables: animalIV, valenceIV
Anova Table (Type 3 tests)
Response: happy
Effect df MSE F ges p.value
1 animalIV 1, 17 0.37 1.31 .072 .268
2 valenceIV 1, 17 0.37 5.14 * .232 .037
3 animalIV:valenceIV 1, 17 0.37 0.09 .005 .764
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1