Setup

knitr::opts_chunk$set(echo = TRUE)
setwd("~/Desktop/Grad Stats/Spring 2022/Spring Project")
getwd()
## [1] "/Users/sarahcoffin/Desktop/Grad Stats/Spring 2022/Spring Project"
library(psych)                     
library(lmSupport)
library(car)
## Loading required package: carData
## 
## Attaching package: 'car'
## The following object is masked from 'package:psych':
## 
##     logit
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.5     ✓ purrr   0.3.4
## ✓ tibble  3.1.4     ✓ dplyr   1.0.7
## ✓ tidyr   1.1.3     ✓ stringr 1.4.0
## ✓ readr   2.0.1     ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x ggplot2::%+%()   masks psych::%+%()
## x ggplot2::alpha() masks psych::alpha()
## x dplyr::filter()  masks stats::filter()
## x dplyr::lag()     masks stats::lag()
## x dplyr::recode()  masks car::recode()
## x purrr::some()    masks car::some()
library(psych)
library(car)
library(rmarkdown)
library(ggplot2)
library(tibble)
library(ggplot2)
library(Hmisc)
## Loading required package: lattice
## Loading required package: survival
## Loading required package: Formula
## 
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:dplyr':
## 
##     src, summarize
## The following object is masked from 'package:psych':
## 
##     describe
## The following objects are masked from 'package:base':
## 
##     format.pval, units
library(apaTables)
library(nlme)
## 
## Attaching package: 'nlme'
## The following object is masked from 'package:dplyr':
## 
##     collapse
library(lmtest)
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
library(psych)
library(lme4)
## Loading required package: Matrix
## 
## Attaching package: 'Matrix'
## The following objects are masked from 'package:tidyr':
## 
##     expand, pack, unpack
## 
## Attaching package: 'lme4'
## The following object is masked from 'package:nlme':
## 
##     lmList
library(dplyr)
library(ggplot2)
library(sjPlot)
source('http://psych.colorado.edu/~jclab/R/mcSummaryLm.R')
source('http://psych.colorado.edu/~jclab/R/modelCompare.R')
install.packages("source", repos = "http://cran.us.r-project.org")
## Warning: package 'source' is not available for this version of R
## 
## A version of this package for your version of R might be available elsewhere,
## see the ideas at
## https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
#Read in wide form data
PP <- read.csv("Proteins_2022.03.28.csv", header = T, na.strings=c(".", "", " ", "NA", "-99"))

Q1. Ch 11 Repeated Measures Analysis - Does connectedness to nature predict average naturalness ratings, over and above burger comparisons?

a. Scales

1. Naturalness

#Define variables
PP$Nat_1_GFFB <- PP$GFFB_Naturalness_30
PP$Nat_2R_GFFB <- (100-PP$GFFB_Naturalness_31)
PP$Nat_3R_GFFB <- (100-PP$GFFB_Naturalness_35)
PP$Nat_4R_GFFB <- (100-PP$GFFB_Naturalness_36)
PP$Nat_1_GFPRB <- PP$GFPRB_Naturalness_30
PP$Nat_2R_GFPRB <- (100-PP$GFPRB_Naturalness_31)
PP$Nat_3R_GFPRB <- (100-PP$GFPRB_Naturalness_35)
PP$Nat_4R_GFPRB <- (100-PP$GFPRB_Naturalness_36)
PP$Nat_1_CBB <- PP$CBB_Naturalness_30
PP$Nat_2R_CBB <- (100-PP$CBB_Naturalness_31)
PP$Nat_3R_CBB <- (100-PP$CBB_Naturalness_35)
PP$Nat_4R_CBB <- (100-PP$CBB_Naturalness_36)
PP$Nat_1_PBPB <- PP$PBPB_Naturalness_30
PP$Nat_2R_PBPB <- (100-PP$PBPB_Naturalness_31)
PP$Nat_3R_PBPB <- (100-PP$PBPB_Naturalness_35)
PP$Nat_4R_PBPB <- (100-PP$PBPB_Naturalness_36)
PP$Nat_1_PBFB <- PP$PBFB_Naturalness_30
PP$Nat_2R_PBFB <- (100-PP$PBFB_Naturalness_31)
PP$Nat_3R_PBFB <- (100-PP$PBFB_Naturalness_35)
PP$Nat_4R_PBFB <- (100-PP$PBFB_Naturalness_36)
PP$Nat_1_VB <- PP$VB_Naturalness_30
PP$Nat_2R_VB <- (100-PP$VB_Naturalness_31)
PP$Nat_3R_VB <- (100-PP$VB_Naturalness_35)
PP$Nat_4R_VB <- (100-PP$VB_Naturalness_36)

##Naturalness Scales and Scores

###GFFB 
####"Artificial" & "Natural" Naturalness Score
PP$Naturalness_Score_GFFB_AN <- rowMeans(PP [, c("Nat_1_GFFB" , "Nat_4R_GFFB")], na.rm=TRUE)
PP$Naturalness_Scale_GFFB_AN <- data.frame(PP$Nat_1_GFFB , PP$Nat_4R_GFFB)
describe(PP$Naturalness_Score_GFFB_AN)
## PP$Naturalness_Score_GFFB_AN 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      493      508      150    0.999    54.56    26.25     12.6     23.6 
##      .25      .50      .75      .90      .95 
##     45.5     50.5     67.0     90.4    100.0 
## 
## lowest :   0.0   0.5   2.0   3.5   6.5, highest:  98.0  98.5  99.0  99.5 100.0
####Human Intervention Naturalness Score
PP$Naturalness_Score_GFFB_HI <- rowMeans(PP [, c("Nat_2R_GFFB", "Nat_3R_GFFB")], na.rm=TRUE)
PP$Naturalness_Scale_GFFB_HI <- data.frame(PP$Nat_2R_GFFB , PP$Nat_3R_GFFB)
describe(PP$Naturalness_Score_GFFB_HI)
## PP$Naturalness_Score_GFFB_HI 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      495      506      163        1    44.84    29.11      0.0     11.1 
##      .25      .50      .75      .90      .95 
##     26.5     45.5     58.0     81.9     98.5 
## 
## lowest :   0.0   0.5   1.5   2.5   3.5, highest:  98.0  98.5  99.0  99.5 100.0
####Overall Nat Score 
PP$Naturalness_Score_GFFB_Tot <- rowMeans(PP [, c( "Naturalness_Score_GFFB_AN" , "Naturalness_Score_GFFB_HI")], na.rm=TRUE)
describe(PP$Naturalness_Score_GFFB_Tot)
## PP$Naturalness_Score_GFFB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      495      506      217        1    49.63     23.6    21.13    25.25 
##      .25      .50      .75      .90      .95 
##    34.88    48.25    62.12    79.40    93.55 
## 
## lowest :   0.00   0.25   1.00   6.25   7.00, highest:  98.25  98.50  99.25  99.50 100.00
PP$Naturalness_Scale_GFFB_Tot <- data.frame(PP$Nat_1_GFFB , PP$Nat_4R_GFFB, PP$Nat_2R_GFFB , PP$Nat_3R_GFFB)
describe(PP$Naturalness_Scale_GFFB_Tot)
## PP$Naturalness_Scale_GFFB_Tot 
## 
##  4  Variables      1001  Observations
## --------------------------------------------------------------------------------
## PP.Nat_1_GFFB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      493      508       94    0.998    58.55    34.46      0.0     13.2 
##      .25      .50      .75      .90      .95 
##     35.0     61.0     84.0    100.0    100.0 
## 
## lowest :   0   1   4   5   6, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_4R_GFFB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      491      510       99    0.998    50.56    36.45        0        6 
##      .25      .50      .75      .90      .95 
##       26       48       79      100      100 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_2R_GFFB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      492      509       96    0.999    43.06    34.86     0.00     0.10 
##      .25      .50      .75      .90      .95 
##    18.75    39.00    66.00    92.00   100.00 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_3R_GFFB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      494      507       97    0.999    46.88    34.72     0.00     7.00 
##      .25      .50      .75      .90      .95 
##    23.00    45.00    68.75    97.00   100.00 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
describe(PP$Naturalness_Score_GFFB_Tot)
## PP$Naturalness_Score_GFFB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      495      506      217        1    49.63     23.6    21.13    25.25 
##      .25      .50      .75      .90      .95 
##    34.88    48.25    62.12    79.40    93.55 
## 
## lowest :   0.00   0.25   1.00   6.25   7.00, highest:  98.25  98.50  99.25  99.50 100.00
sd(PP$Naturalness_Score_GFFB_Tot, na.rm = TRUE)
## [1] 21.23928
##GFPRB
####"Artificial" & "Natural" Naturalness Score
PP$Naturalness_Score_GFPRB_AN <- rowMeans(PP [, c("Nat_1_GFPRB" ,  "Nat_4R_GFPRB")], na.rm=TRUE)
PP$Naturalness_Scale_GFPRB_AN <- data.frame(PP$Nat_1_GFPRB , PP$Nat_4R_GFPRB)
describe(PP$Naturalness_Score_GFPRB_AN)
## PP$Naturalness_Score_GFPRB_AN 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      509      492      142    0.994    68.56    27.98     28.0     42.8 
##      .25      .50      .75      .90      .95 
##     50.0     66.0     95.0    100.0    100.0 
## 
## lowest :   0.0   1.0   3.0   4.0   4.5, highest:  98.0  98.5  99.0  99.5 100.0
####Human Intervention Naturalness Score
PP$Naturalness_Score_GFPRB_HI <- rowMeans(PP [, c("Nat_2R_GFPRB" , "Nat_3R_GFPRB")], na.rm=TRUE)
PP$Naturalness_Scale_GFPRB_HI <- data.frame( PP$Nat_2R_GFPRB , PP$Nat_3R_GFPRB)
describe(PP$Naturalness_Score_GFPRB_HI)
## PP$Naturalness_Score_GFPRB_HI 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      510      491      168    0.999    57.02    32.44    10.00    17.45 
##      .25      .50      .75      .90      .95 
##    38.50    50.75    83.38   100.00   100.00 
## 
## lowest :   0.0   0.5   2.0   2.5   6.0, highest:  98.0  98.5  99.0  99.5 100.0
####Overall Nat Score 
PP$Naturalness_Score_GFPRB_Tot <- rowMeans(PP [, c( "Naturalness_Score_GFPRB_AN" , "Naturalness_Score_GFPRB_HI")], na.rm=TRUE)
describe(PP$Naturalness_Score_GFPRB_Tot)
## PP$Naturalness_Score_GFPRB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      510      491      238    0.999    62.76    27.24    26.34    32.98 
##      .25      .50      .75      .90      .95 
##    45.25    59.38    81.50    98.78   100.00 
## 
## lowest :   0.00   1.75   7.00  10.75  11.75, highest:  99.00  99.25  99.50  99.75 100.00
PP$Naturalness_Scale_GFPRB_Tot <- data.frame(PP$Nat_1_GFPRB , PP$Nat_4R_GFPRB, PP$Nat_2R_GFPRB , PP$Nat_3R_GFPRB)
describe(PP$Naturalness_Score_GFPRB_Tot)
## PP$Naturalness_Score_GFPRB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      510      491      238    0.999    62.76    27.24    26.34    32.98 
##      .25      .50      .75      .90      .95 
##    45.25    59.38    81.50    98.78   100.00 
## 
## lowest :   0.00   1.75   7.00  10.75  11.75, highest:  99.00  99.25  99.50  99.75 100.00
sd(PP$Naturalness_Score_GFPRB_Tot, na.rm = TRUE)
## [1] 23.75184
##CBB
####"Artificial" & "Natural" Naturalness Score
PP$Naturalness_Score_CBB_AN <- rowMeans(PP [, c("Nat_1_CBB" , "Nat_4R_CBB")], na.rm=TRUE)
PP$Naturalness_Scale_CBB_AN <- data.frame(PP$Nat_1_CBB ,  PP$Nat_4R_CBB)
describe(PP$Naturalness_Score_CBB_AN)
## PP$Naturalness_Score_CBB_AN 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      511      490      146    0.998    39.11    28.55     0.00     0.00 
##      .25      .50      .75      .90      .95 
##    17.75    47.50    52.00    70.00    83.50 
## 
## lowest :   0.0   0.5   1.0   2.0   2.5, highest:  98.0  98.5  99.0  99.5 100.0
####Human Intervention Naturalness Score
PP$Naturalness_Score_CBB_HI <- rowMeans(PP [, c( "Nat_2R_CBB" , "Nat_3R_CBB")], na.rm=TRUE)
PP$Naturalness_Scale_CBB_HI <- data.frame( PP$Nat_2R_CBB , PP$Nat_3R_CBB)
describe(PP$Naturalness_Score_CBB_HI)
## PP$Naturalness_Score_CBB_HI 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      512      489      143    0.994    29.65    27.85    0.000    0.000 
##      .25      .50      .75      .90      .95 
##    6.375   27.750   48.000   60.950   75.225 
## 
## lowest :   0.0   0.5   1.0   1.5   2.0, highest:  94.0  97.5  99.0  99.5 100.0
####Overall Nat Score 
PP$Naturalness_Score_CBB_Tot <- rowMeans(PP [, c( "Naturalness_Score_CBB_AN" , "Naturalness_Score_CBB_HI")], na.rm=TRUE)
describe(PP$Naturalness_Score_CBB_Tot)
## PP$Naturalness_Score_CBB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      512      489      221    0.999    34.37    24.53     0.00     0.55 
##      .25      .50      .75      .90      .95 
##    17.69    35.50    49.06    59.00    67.22 
## 
## lowest :   0.00   0.25   0.50   1.00   1.25, highest:  96.25  98.50  99.50  99.75 100.00
PP$Naturalness_Scale_CBB_Tot <- data.frame(PP$Nat_1_CBB ,  PP$Nat_4R_CBB, PP$Nat_2R_CBB , PP$Nat_3R_CBB)
describe(PP$Naturalness_Scale_CBB_Tot)
## PP$Naturalness_Scale_CBB_Tot 
## 
##  4  Variables      1001  Observations
## --------------------------------------------------------------------------------
## PP.Nat_1_CBB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      511      490       96    0.996    45.14    38.99      0.0      0.0 
##      .25      .50      .75      .90      .95 
##     12.5     46.0     74.0     97.0    100.0 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_4R_CBB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      510      491       93    0.992    33.03    33.57     0.00     0.00 
##      .25      .50      .75      .90      .95 
##     6.25    25.50    49.00    82.10    98.00 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_2R_CBB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      510      491       88    0.988    29.97    30.76     0.00     0.00 
##      .25      .50      .75      .90      .95 
##     3.00    25.00    47.75    73.00    85.55 
## 
## lowest :   0   1   2   3   4, highest:  91  94  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_3R_CBB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      510      491       89    0.988    29.28    30.48     0.00     0.00 
##      .25      .50      .75      .90      .95 
##     2.00    24.00    47.00    70.00    84.55 
## 
## lowest :   0   1   2   3   4, highest:  94  95  96  99 100
## --------------------------------------------------------------------------------
describe(PP$Naturalness_Score_CBB_Tot)
## PP$Naturalness_Score_CBB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      512      489      221    0.999    34.37    24.53     0.00     0.55 
##      .25      .50      .75      .90      .95 
##    17.69    35.50    49.06    59.00    67.22 
## 
## lowest :   0.00   0.25   0.50   1.00   1.25, highest:  96.25  98.50  99.50  99.75 100.00
sd(PP$Naturalness_Score_CBB_Tot, na.rm = TRUE)
## [1] 21.74882
##PBPB
####"Artificial" & "Natural" Naturalness Score
PP$Naturalness_Score_PBPB_AN<- rowMeans(PP [, c("Nat_1_PBPB" , "Nat_4R_PBPB")], na.rm=TRUE)
PP$Naturalness_Scale_PBPB_AN <- data.frame(PP$Nat_1_PBPB , PP$Nat_4R_PBPB)
describe(PP$Naturalness_Score_PBPB_AN)
## PP$Naturalness_Score_PBPB_AN 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      524      477      166    0.999    48.66    27.31     0.00     9.30 
##      .25      .50      .75      .90      .95 
##    36.88    50.00    61.00    82.35    92.50 
## 
## lowest :   0.0   0.5   1.0   1.5   2.0, highest:  97.5  98.5  99.0  99.5 100.0
####Human Intervention Naturalness Score
PP$Naturalness_Score_PBPB_HI<- rowMeans(PP [, c("Nat_2R_PBPB" , "Nat_3R_PBPB")], na.rm=TRUE)
PP$Naturalness_Scale_PBPB_HI <- data.frame( PP$Nat_2R_PBPB , PP$Nat_3R_PBPB)
describe(PP$Naturalness_Score_PBPB_HI)
## PP$Naturalness_Score_PBPB_HI 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      524      477      155    0.999    36.03    26.35     0.00     0.50 
##      .25      .50      .75      .90      .95 
##    19.00    37.50    50.00    63.50    78.27 
## 
## lowest :   0.0   0.5   1.0   1.5   2.0, highest:  97.5  98.5  99.0  99.5 100.0
####Overall Nat Score 
PP$Naturalness_Score_PBPB_Tot <- rowMeans(PP [, c( "Naturalness_Score_PBPB_AN" , "Naturalness_Score_PBPB_HI")], na.rm=TRUE)
describe(PP$Naturalness_Score_PBPB_Tot)
## PP$Naturalness_Score_PBPB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      524      477      234        1    42.34    22.48    2.288   12.900 
##      .25      .50      .75      .90      .95 
##   29.688   44.000   53.750   67.100   74.962 
## 
## lowest :   0.00   0.50   0.75   1.00   1.25, highest:  92.25  96.75  97.00  98.50 100.00
PP$Naturalness_Scale_PBPB_Tot <- data.frame(PP$Nat_1_PBPB , PP$Nat_4R_PBPB, PP$Nat_2R_PBPB , PP$Nat_3R_PBPB)
describe(PP$Naturalness_Scale_PBPB_Tot)
## PP$Naturalness_Scale_PBPB_Tot 
## 
##  4  Variables      1001  Observations
## --------------------------------------------------------------------------------
## PP.Nat_1_PBPB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      524      477       99    0.998    53.99    36.26        0        3 
##      .25      .50      .75      .90      .95 
##       29       58       79       99      100 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_4R_PBPB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      524      477       97    0.998    43.33    34.89        0        0 
##      .25      .50      .75      .90      .95 
##       20       39       68       87      100 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_2R_PBPB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      522      479       96    0.998    39.82    33.02      0.0      0.0 
##      .25      .50      .75      .90      .95 
##     18.0     35.0     61.0     83.9     97.0 
## 
## lowest :   0   1   2   3   4, highest:  95  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_3R_PBPB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      522      479       88    0.996    32.13    28.98      0.0      0.0 
##      .25      .50      .75      .90      .95 
##     11.0     29.0     48.0     70.9     82.0 
## 
## lowest :   0   1   2   3   4, highest:  94  97  98  99 100
## --------------------------------------------------------------------------------
describe(PP$Naturalness_Score_PBPB_Tot)
## PP$Naturalness_Score_PBPB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      524      477      234        1    42.34    22.48    2.288   12.900 
##      .25      .50      .75      .90      .95 
##   29.688   44.000   53.750   67.100   74.962 
## 
## lowest :   0.00   0.50   0.75   1.00   1.25, highest:  92.25  96.75  97.00  98.50 100.00
sd(PP$Naturalness_Score_PBPB_Tot, na.rm = TRUE)
## [1] 20.13492
##PBFB
####"Artificial" & "Natural" Naturalness Score
PP$Naturalness_Score_PBFB_AN<- rowMeans(PP [, c("Nat_1_PBFB" ,"Nat_4R_PBFB")], na.rm=TRUE)
PP$Naturalness_Scale_PBFB_AN <- data.frame(PP$Nat_1_PBFB ,  PP$Nat_4R_PBFB)
describe(PP$Naturalness_Score_PBFB_AN)
## PP$Naturalness_Score_PBFB_AN 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      481      520      155    0.999    45.28    28.35      0.0      2.0 
##      .25      .50      .75      .90      .95 
##     28.0     50.0     55.5     79.5     89.0 
## 
## lowest :   0.0   0.5   1.0   1.5   2.0, highest:  96.5  97.0  98.0  98.5 100.0
####Human Intervention Naturalness Score
PP$Naturalness_Score_PBFB_HI<- rowMeans(PP [, c( "Nat_2R_PBFB" , "Nat_3R_PBFB")], na.rm=TRUE)
PP$Naturalness_Scale_PBFB_HI <- data.frame( PP$Nat_2R_PBFB , PP$Nat_3R_PBFB)
describe(PP$Naturalness_Score_PBFB_HI)
## PP$Naturalness_Score_PBFB_HI 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      480      521      148    0.998    32.02    27.51     0.00     0.00 
##      .25      .50      .75      .90      .95 
##    12.00    29.50    48.50    62.00    75.15 
## 
## lowest :   0.0   1.0   2.0   2.5   3.0, highest:  95.0  96.5  98.0  99.5 100.0
####Overall Nat Score 
PP$Naturalness_Score_PBFB_Tot <- rowMeans(PP [, c( "Naturalness_Score_PBFB_AN" , "Naturalness_Score_PBFB_HI")], na.rm=TRUE)
describe(PP$Naturalness_Score_PBFB_Tot)
## PP$Naturalness_Score_PBFB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      481      520      222        1    38.67    23.24     0.00     5.25 
##      .25      .50      .75      .90      .95 
##    25.50    40.25    50.75    62.50    72.75 
## 
## lowest :   0.00   0.25   0.50   0.75   1.00, highest:  87.50  88.25  97.25  97.50 100.00
PP$Naturalness_Scale_PBFB_Tot <- data.frame(PP$Nat_1_PBFB ,  PP$Nat_4R_PBFB, PP$Nat_2R_PBFB , PP$Nat_3R_PBFB)
describe(PP$Naturalness_Scale_PBFB_Tot)
## PP$Naturalness_Scale_PBFB_Tot 
## 
##  4  Variables      1001  Observations
## --------------------------------------------------------------------------------
## PP.Nat_1_PBFB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      481      520       97    0.998    51.85    38.41        0        0 
##      .25      .50      .75      .90      .95 
##       23       53       81       98      100 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_4R_PBFB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      480      521       95    0.996    38.67    35.17        0        0 
##      .25      .50      .75      .90      .95 
##       12       34       63       86      100 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_2R_PBFB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      480      521       95    0.996    34.45    32.51     0.00     0.00 
##      .25      .50      .75      .90      .95 
##    10.00    28.50    53.50    76.00    93.05 
## 
## lowest :   0   1   2   3   4, highest:  94  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_3R_PBFB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      478      523       86    0.994    29.47    29.62     0.00     0.00 
##      .25      .50      .75      .90      .95 
##     6.25    24.50    45.75    71.00    91.60 
## 
## lowest :   0   1   2   3   4, highest:  95  96  97  99 100
## --------------------------------------------------------------------------------
describe(PP$Naturalness_Score_PBFB_Tot)
## PP$Naturalness_Score_PBFB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      481      520      222        1    38.67    23.24     0.00     5.25 
##      .25      .50      .75      .90      .95 
##    25.50    40.25    50.75    62.50    72.75 
## 
## lowest :   0.00   0.25   0.50   0.75   1.00, highest:  87.50  88.25  97.25  97.50 100.00
sd(PP$Naturalness_Score_PBFB_Tot, na.rm = TRUE)
## [1] 20.69724
##VB
####"Artificial" & "Natural" Naturalness Score
PP$Naturalness_Score_VB_AN <- rowMeans(PP [, c("Nat_1_VB" , "Nat_4R_VB")], na.rm=TRUE)
PP$Naturalness_Scale_VB_AN <- data.frame(PP$Nat_1_VB ,  PP$Nat_4R_VB)
describe(PP$Naturalness_Score_VB_AN)
## PP$Naturalness_Score_VB_AN 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      472      529      155    0.999     57.5    28.09    10.28    25.00 
##      .25      .50      .75      .90      .95 
##    46.50    51.00    75.62    96.50   100.00 
## 
## lowest :   0.0   0.5   1.0   2.5   3.0, highest:  98.0  98.5  99.0  99.5 100.0
####Human Intervention Naturalness Score
PP$Naturalness_Score_VB_HI <- rowMeans(PP [, c( "Nat_2R_VB" , "Nat_3R_VB")], na.rm=TRUE)
PP$Naturalness_Scale_VB_HI <- data.frame( PP$Nat_2R_VB , PP$Nat_3R_VB )
describe(PP$Naturalness_Score_VB_HI)
## PP$Naturalness_Score_VB_HI 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      472      529      159        1    45.28     29.9    1.775   11.000 
##      .25      .50      .75      .90      .95 
##   25.000   45.750   59.125   84.450   99.225 
## 
## lowest :   0.0   0.5   1.0   1.5   2.0, highest:  97.0  98.0  99.0  99.5 100.0
####Overall Nat Score 
PP$Naturalness_Score_VB_Tot <- rowMeans(PP [, c( "Naturalness_Score_VB_AN" , "Naturalness_Score_VB_HI")], na.rm=TRUE)
describe(PP$Naturalness_Score_VB_Tot)
## PP$Naturalness_Score_VB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      472      529      237        1    51.39    25.22    16.50    25.00 
##      .25      .50      .75      .90      .95 
##    36.19    49.00    65.50    84.00    96.36 
## 
## lowest :   0.00   1.25   3.00   3.25   4.25, highest:  99.00  99.25  99.50  99.75 100.00
PP$Naturalness_Scale_VB_Tot <- data.frame(PP$Nat_1_VB ,  PP$Nat_4R_VB, PP$Nat_2R_VB , PP$Nat_3R_VB )
describe(PP$Naturalness_Scale_VB_Tot)
## PP$Naturalness_Scale_VB_Tot 
## 
##  4  Variables      1001  Observations
## --------------------------------------------------------------------------------
## PP.Nat_1_VB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      472      529       93    0.996    65.13     32.6     4.55    21.00 
##      .25      .50      .75      .90      .95 
##    50.00    71.00    89.00   100.00   100.00 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_4R_VB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      472      529       96    0.998    49.87     37.8        0        4 
##      .25      .50      .75      .90      .95 
##       21       48       80       99      100 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_2R_VB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      472      529       99    0.998    49.76    36.59        0        6 
##      .25      .50      .75      .90      .95 
##       24       48       78       99      100 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
## --------------------------------------------------------------------------------
## PP.Nat_3R_VB 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      472      529       91    0.999     40.8    33.64     0.00     2.00 
##      .25      .50      .75      .90      .95 
##    19.00    34.00    61.25    91.80   100.00 
## 
## lowest :   0   1   2   3   4, highest:  95  96  98  99 100
## --------------------------------------------------------------------------------
describe(PP$Naturalness_Score_VB_Tot)
## PP$Naturalness_Score_VB_Tot 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      472      529      237        1    51.39    25.22    16.50    25.00 
##      .25      .50      .75      .90      .95 
##    36.19    49.00    65.50    84.00    96.36 
## 
## lowest :   0.00   1.25   3.00   3.25   4.25, highest:  99.00  99.25  99.50  99.75 100.00
sd(PP$Naturalness_Score_VB_Tot, na.rm = TRUE)
## [1] 22.39438

2. Connectedness to Nature

#Connectedness to Nature Item Definitions
PP$CNS_1 <- as.numeric(as.character(PP$CNS_29))
PP$CNS_2 <- as.numeric(as.character(PP$CNS_30))
PP$CNS_3 <- as.numeric(as.character(PP$CNS_31))
PP$CNS_4 <- as.numeric(as.character(PP$CNS_32))
PP$CNS_5 <- as.numeric(as.character(PP$CNS_33))

#Descriptives
describe(PP$CNS_1)
## PP$CNS_1 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      998        3       96    0.997    66.43    28.01    21.85    31.00 
##      .25      .50      .75      .90      .95 
##    52.00    69.00    85.00   100.00   100.00 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
range(PP$CNS_1, na.rm=TRUE)
## [1]   0 100
describe(PP$CNS_2)
## PP$CNS_2 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      998        3       94    0.997    69.99     25.6    26.85    38.00 
##      .25      .50      .75      .90      .95 
##    55.00    72.00    87.00   100.00   100.00 
## 
## lowest :   0   1   2   3   5, highest:  96  97  98  99 100
range(PP$CNS_2, na.rm=TRUE)
## [1]   0 100
describe(PP$CNS_3)
## PP$CNS_3 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      998        3       98    0.995    69.36     27.6     21.0     35.7 
##      .25      .50      .75      .90      .95 
##     53.0     72.0     90.0    100.0    100.0 
## 
## lowest :   0   1   3   5   6, highest:  96  97  98  99 100
range(PP$CNS_3, na.rm=TRUE)
## [1]   0 100
describe(PP$CNS_4)
## PP$CNS_4 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      997        4      100    0.999    58.81    32.39      0.0     15.0 
##      .25      .50      .75      .90      .95 
##     40.0     63.0     80.0     97.8    100.0 
## 
## lowest :   0   1   2   3   4, highest:  95  96  97  99 100
range(PP$CNS_4, na.rm=TRUE)
## [1]   0 100
describe(PP$CNS_5)
## PP$CNS_5 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      998        3      101    0.999    59.39    31.57      2.0     19.0 
##      .25      .50      .75      .90      .95 
##     41.0     63.0     81.0     97.3    100.0 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
range(PP$CNS_5, na.rm=TRUE)
## [1]   0 100
#Histograms
hist(PP$CNS_1, main = 'I often feel a sense of oneness with the natural world around me.')

hist(PP$CNS_2, main = 'I think of the natural world as a community to which I belong.')

hist(PP$CNS_3, main = 'I feel that all inhabitants of Earth, human, and nonhuman, share a common ‘life force’.')

hist(PP$CNS_4, main = 'My personal welfare is independent of the welfare of the natural world.')

hist(PP$CNS_5, main = 'When I think of my place on Earth, I consider myself to be a top member of a hierarchy that exists in nature.')

#Recode items 4 and 5
PP$CNS_4R <- (100 - PP$CNS_4) 
PP$CNS_5R <- (100 - PP$CNS_5)

PP$CNS_Scale2 <- data.frame(PP$CNS_1, PP$CNS_2, PP$CNS_3, PP$CNS_4R, PP$CNS_5R)
psych::alpha(PP$CNS_Scale2)
## Number of categories should be increased  in order to count frequencies.
## Warning in psych::alpha(PP$CNS_Scale2): Some items were negatively correlated with the total scale and probably 
## should be reversed.  
## To do this, run the function again with the 'check.keys=TRUE' option
## Some items ( PP.CNS_4R PP.CNS_5R ) were negatively correlated with the total scale and 
## probably should be reversed.  
## To do this, run the function again with the 'check.keys=TRUE' option
## 
## Reliability analysis   
## Call: psych::alpha(x = PP$CNS_Scale2)
## 
##   raw_alpha std.alpha G6(smc) average_r  S/N   ase mean sd median_r
##       0.17      0.22    0.44     0.055 0.29 0.044   58 12    -0.19
## 
##  lower alpha upper     95% confidence boundaries
## 0.08 0.17 0.25 
## 
##  Reliability if an item is dropped:
##           raw_alpha std.alpha G6(smc) average_r    S/N alpha se var.r med.r
## PP.CNS_1     0.0024     0.013    0.27    0.0033  0.013    0.054  0.14 -0.19
## PP.CNS_2    -0.0669    -0.060    0.21   -0.0143 -0.056    0.058  0.14 -0.22
## PP.CNS_3    -0.0946    -0.084    0.21   -0.0197 -0.077    0.059  0.14 -0.21
## PP.CNS_4R    0.3121     0.376    0.52    0.1310  0.603    0.035  0.21  0.14
## PP.CNS_5R    0.3958     0.455    0.55    0.1728  0.836    0.032  0.17  0.17
## 
##  Item statistics 
##             n raw.r std.r  r.cor r.drop mean sd
## PP.CNS_1  998  0.57  0.62  0.560  0.197   66 25
## PP.CNS_2  998  0.60  0.66  0.644  0.274   70 23
## PP.CNS_3  998  0.63  0.67  0.651  0.278   69 25
## PP.CNS_4R 997  0.38  0.31 -0.048 -0.079   41 29
## PP.CNS_5R 998  0.28  0.21 -0.168 -0.170   41 28
#Drop reverse coded items 
PP$CNS_Scale <- data.frame(PP$CNS_1, PP$CNS_2, PP$CNS_3)
psych::alpha(PP$CNS_Scale)
## Number of categories should be increased  in order to count frequencies.
## 
## Reliability analysis   
## Call: psych::alpha(x = PP$CNS_Scale)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean sd median_r
##       0.79      0.79    0.71      0.55 3.7 0.012   69 20     0.55
## 
##  lower alpha upper     95% confidence boundaries
## 0.76 0.79 0.81 
## 
##  Reliability if an item is dropped:
##          raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## PP.CNS_1      0.73      0.73    0.58      0.58 2.7    0.017    NA  0.58
## PP.CNS_2      0.69      0.69    0.53      0.53 2.3    0.019    NA  0.53
## PP.CNS_3      0.71      0.71    0.55      0.55 2.4    0.019    NA  0.55
## 
##  Item statistics 
##            n raw.r std.r r.cor r.drop mean sd
## PP.CNS_1 998  0.83  0.83  0.68   0.61   66 25
## PP.CNS_2 998  0.84  0.85  0.73   0.64   70 23
## PP.CNS_3 998  0.84  0.84  0.71   0.63   69 25
PP$CNS_Score <- rowMeans(PP [, c("CNS_1", "CNS_2", "CNS_3", "CNS_4R", "CNS_5R")], na.rm=TRUE)


#Center
describe(PP$CNS_Score)
## PP$CNS_Score 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##      998        3      240        1    57.52       13    40.00    44.94 
##      .25      .50      .75      .90      .95 
##    50.60    56.40    61.80    71.86    80.23 
## 
## lowest :  18.0  20.0  21.8  22.2  22.6, highest:  98.0  98.8  99.6  99.8 100.0
PP$CNS_Score.c <- PP$CNS_Score - 57.53

#Correlation CCB 
cor(PP$CNS_Scale, use= "complete.obs")
##           PP.CNS_1  PP.CNS_2  PP.CNS_3
## PP.CNS_1 1.0000000 0.5470854 0.5321022
## PP.CNS_2 0.5470854 1.0000000 0.5768547
## PP.CNS_3 0.5321022 0.5768547 1.0000000

b. Model

PP$AveNat <- rowMeans(PP [, c("Naturalness_Score_GFFB_Tot", "Naturalness_Score_GFPRB_Tot", "Naturalness_Score_PBFB_Tot", "Naturalness_Score_PBPB_Tot", "Naturalness_Score_CBB_Tot", "Naturalness_Score_VB_Tot")], na.rm=TRUE)

modela1 <- lm(AveNat ~ CNS_Score.c, data = PP, na.rm = TRUE) 
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(modela1)
## 
## Call:
## lm(formula = AveNat ~ CNS_Score.c, data = PP, na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -46.725  -8.708   0.448   8.292  51.355 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 46.49354    0.45068 103.163   <2e-16 ***
## CNS_Score.c  0.08068    0.03619   2.229    0.026 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 14.24 on 996 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.004965,   Adjusted R-squared:  0.003966 
## F-statistic:  4.97 on 1 and 996 DF,  p-value: 0.02601
tab_model(modela1,
          show.stat = T, show.se = T)
  AveNat
Predictors Estimates std. Error CI Statistic p
(Intercept) 46.49 0.45 45.61 – 47.38 103.16 <0.001
CNS Score c 0.08 0.04 0.01 – 0.15 2.23 0.026
Observations 998
R2 / R2 adjusted 0.005 / 0.004

Q2. Ch 11 Outliers

## Assumption of Normality
hist(modela1$residuals)

plot(modela1, 2)

## Assumption of Homoscedasticity
plot(modela1, 1)

plot(modela1, 3)

#Run outlier test to confirm outliers - One outlier!
outlierTest(modela1)
## No Studentized residuals with Bonferroni p < 0.05
## Largest |rstudent|:
##     rstudent unadjusted p-value Bonferroni p
## 436 3.639324         0.00028741      0.28684

Q3. Ch 12 Mixed Effects - How does perceived benefit, risk, and naturalness predict behavioral intent?

knitr::opts_chunk$set(echo = TRUE)
setwd("~/Desktop/Naturalness/PROTEINS FULL ANALYSES")
getwd()
## [1] "/Users/sarahcoffin/Desktop/Naturalness/PROTEINS FULL ANALYSES"
# Read in data (in long form)
L <- read.csv("PP_LongForm.csv", header = T, na.strings=c(".", "", " ", "NA", "-99"))
#Describe & Mean Center Long Variables 
table(L$Type) 
## 
##   CBB  GFFB GFPRB  PBFB  PBPB    VB 
##  1005  1005  1005  1005  1005  1005
describe(L$Ben) 
## L$Ben 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##     2996     3034      296    0.999    60.36    30.63    2.333   22.667 
##      .25      .50      .75      .90      .95 
##   44.667   61.000   82.000   98.167  100.000 
## 
## lowest :   0.0000000   0.3333333   0.6666667   1.0000000   1.3333333
## highest:  98.6666667  99.0000000  99.3333333  99.6666667 100.0000000
describe(L$Control) 
##  
## NULL
describe(L$Familiarity) 
## L$Familiarity 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##     2996     3034      101    0.998     57.8    36.28        0        6 
##      .25      .50      .75      .90      .95 
##       32       63       85      100      100 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
describe(L$Naturalness) 
## L$Naturalness 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##     3006     3024      391        1    46.43    26.44     3.25    16.50 
##      .25      .50      .75      .90      .95 
##    31.31    46.38    59.00    78.00    94.50 
## 
## lowest :   0.00   0.25   0.50   0.75   1.00, highest:  99.00  99.25  99.50  99.75 100.00
describe(L$Risk) 
## L$Risk 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##     3319     2711      506        1    44.56    32.81     0.00     2.50 
##      .25      .50      .75      .90      .95 
##    21.25    46.50    65.00    84.00    95.00 
## 
## lowest :   0.0000000   0.2500000   0.3333333   0.5000000   0.7500000
## highest:  99.2500000  99.5000000  99.6666667  99.7500000 100.0000000
describe(L$Behav) 
## L$Behav 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##     3008     3022      402    0.999    56.27    34.23    0.000    6.925 
##      .25      .50      .75      .90      .95 
##   36.000   58.500   80.250   96.750  100.000 
## 
## lowest :   0.00   0.25   0.50   0.75   1.00, highest:  99.00  99.25  99.50  99.75 100.00
describe(L$Understanding) 
## L$Understanding 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##     2999     3031      101    0.995    65.01    32.66        5       21 
##      .25      .50      .75      .90      .95 
##       47       70       89      100      100 
## 
## lowest :   0   1   2   3   4, highest:  96  97  98  99 100
describe(L$BRDiff) 
##  
## NULL
L$Benefit.c <- L$Ben - 60.36
L$Familiarity.c <- L$Familiarity - 57.8 
L$Naturalness.c <- L$Naturalness - 46.43 
L$Risk.c <- L$Risk - 44.56
L$Behav.c <- L$Behav - mean(L$Behav) - 56.27
L$Understanding.c <- L$Understanding - 65.01

a. Contrast codes

#CBB and PBFB vs. PBPB, VB, GFPRB, GFFB
L$C1 <- (2/6)*(L$Type == 'CBB') + (-1/6)*(L$Type == 'GFFB') + (-1/6)*(L$Type == 'GFPRB') +(2/6)*(L$Type == 'PBFB') +(-1/6)*(L$Type == 'PBPB') +(-1/6)*(L$Type == 'VB')

#CBB vs PBFB
L$C2 <- (1/2)*(L$Type == 'CBB') + (-1/2)*(L$Type == 'PFPB') + (0)*(L$Type == 'PBPB') +(0)*(L$Type == 'VB') +(0)*(L$Type == 'GFFB') +(0)*(L$Type == 'GFPRB')

#PBPB and VB vs. GFPRB and GFFB
L$C3 <- (0)*(L$Type == 'CBB') + (0)*(L$Type == 'PFPB') + (-1/4)*(L$Type == 'PBPB') +(-1/4)*(L$Type == 'VB') +(1/4)*(L$Type == 'GFFB') +(1/4)*(L$Type == 'GFPRB')

#PBPB vs VB
L$C4 <- (0)*(L$Type == 'CBB') + (0)*(L$Type == 'PFPB') + (1/2)*(L$Type == 'PBPB') +(-1/2)*(L$Type == 'VB') +(0)*(L$Type == 'GFFB') +(0)*(L$Type == 'GFPRB')

#GFPRB vs. GFFB
L$C5 <- (0)*(L$Type == 'CBB') + (0)*(L$Type == 'PFPB') + (0)*(L$Type == 'PBPB') +(0)*(L$Type == 'VB') +(-1/2)*(L$Type == 'GFFB') +(1/2)*(L$Type == 'GFPRB')

b. Model

#How does perceived benefit and naturalness predict behavioral intent?

## First looking at burger contrasts predicting Support (k-1 orthogonal contrast codes)
modA.10 <- lmer(Behav ~ C1 + C2 + C3 + C4 + C5 + (1|id), data = L)

summary(modA.10)
## Linear mixed model fit by REML ['lmerMod']
## Formula: Behav ~ C1 + C2 + C3 + C4 + C5 + (1 | id)
##    Data: L
## 
## REML criterion at convergence: 28165.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.5456 -0.4179  0.0521  0.4301  3.3434 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 449.2    21.19   
##  Residual             431.8    20.78   
## Number of obs: 3008, groups:  id, 1003
## 
## Fixed effects:
##             Estimate Std. Error t value
## (Intercept)  57.0925     0.8135  70.181
## C1          -13.0183     2.3283  -5.591
## C2           -7.2928     2.8859  -2.527
## C3           -5.0341     1.9480  -2.584
## C4           -5.3265     1.4626  -3.642
## C5           -0.2924     1.4180  -0.206
## 
## Correlation of Fixed Effects:
##    (Intr) C1     C2     C3     C4    
## C1  0.185                            
## C2 -0.305 -0.649                     
## C3 -0.004 -0.005  0.008              
## C4  0.013 -0.017  0.005  0.108       
## C5  0.019 -0.011 -0.007 -0.065  0.086
tab_model(modA.10,
          show.stat = T, show.se = T)
  Behav
Predictors Estimates std. Error CI Statistic p
(Intercept) 57.09 0.81 55.50 – 58.69 70.18 <0.001
C1 -13.02 2.33 -17.58 – -8.45 -5.59 <0.001
C2 -7.29 2.89 -12.95 – -1.63 -2.53 0.012
C3 -5.03 1.95 -8.85 – -1.21 -2.58 0.010
C4 -5.33 1.46 -8.19 – -2.46 -3.64 <0.001
C5 -0.29 1.42 -3.07 – 2.49 -0.21 0.837
Random Effects
σ2 431.78
τ00 id 449.18
ICC 0.51
N id 1003
Observations 3008
Marginal R2 / Conditional R2 0.022 / 0.521
## Then add naturalness to the model 
modA.11 <- lmer(Behav ~ Naturalness.c + C1 + C2 + C3 + C4 + C5 + (1|id), data = L)

summary(modA.11)
## Linear mixed model fit by REML ['lmerMod']
## Formula: Behav ~ Naturalness.c + C1 + C2 + C3 + C4 + C5 + (1 | id)
##    Data: L
## 
## REML criterion at convergence: 25058.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.6285 -0.4373  0.0326  0.4925  3.3136 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 421.7    20.53   
##  Residual             384.9    19.62   
## Number of obs: 2697, groups:  id, 1003
## 
## Fixed effects:
##                Estimate Std. Error t value
## (Intercept)    56.74965    0.80320  70.655
## Naturalness.c   0.45756    0.02146  21.321
## C1             -0.90566    2.38472  -0.380
## C2             -4.01433    2.75121  -1.459
## C3            -13.92589    2.23123  -6.241
## C4             -1.05184    1.40330  -0.750
## C5             -6.39653    1.85723  -3.444
## 
## Correlation of Fixed Effects:
##             (Intr) Ntrln. C1     C2     C3     C4    
## Naturlnss.c -0.021                                   
## C1           0.098  0.244                            
## C2          -0.293  0.052 -0.591                     
## C3           0.119 -0.193 -0.198  0.000              
## C4           0.018  0.142  0.012  0.013  0.084       
## C5           0.168 -0.161 -0.232 -0.010  0.342  0.062
tab_model(modA.11,
          show.stat = T, show.se = T)
  Behav
Predictors Estimates std. Error CI Statistic p
(Intercept) 56.75 0.80 55.17 – 58.32 70.65 <0.001
Naturalness c 0.46 0.02 0.42 – 0.50 21.32 <0.001
C1 -0.91 2.38 -5.58 – 3.77 -0.38 0.704
C2 -4.01 2.75 -9.41 – 1.38 -1.46 0.145
C3 -13.93 2.23 -18.30 – -9.55 -6.24 <0.001
C4 -1.05 1.40 -3.80 – 1.70 -0.75 0.454
C5 -6.40 1.86 -10.04 – -2.75 -3.44 0.001
Random Effects
σ2 384.93
τ00 id 421.66
ICC 0.52
N id 1003
Observations 2697
Marginal R2 / Conditional R2 0.127 / 0.583
## Next, add risk perception to the model 
modA.12 <- lmer(Behav ~ Naturalness.c + Risk.c + C1 + C2 + C3 + C4 + C5 + (1|id), data = L)

summary(modA.12)
## Linear mixed model fit by REML ['lmerMod']
## Formula: Behav ~ Naturalness.c + Risk.c + C1 + C2 + C3 + C4 + C5 + (1 |  
##     id)
##    Data: L
## 
## REML criterion at convergence: 24855.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.9712 -0.4178  0.0292  0.4889  3.2789 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 486.7    22.06   
##  Residual             329.2    18.14   
## Number of obs: 2695, groups:  id, 1003
## 
## Fixed effects:
##               Estimate Std. Error t value
## (Intercept)   56.64042    0.82440  68.705
## Naturalness.c  0.31362    0.02263  13.861
## Risk.c        -0.28591    0.01970 -14.517
## C1            -0.78003    2.22874  -0.350
## C2            -2.07737    2.56911  -0.809
## C3            -8.95993    2.11043  -4.246
## C4            -0.74330    1.31165  -0.567
## C5            -6.91558    1.73974  -3.975
## 
## Correlation of Fixed Effects:
##             (Intr) Ntrln. Risk.c C1     C2     C3     C4    
## Naturlnss.c -0.011                                          
## Risk.c       0.013  0.451                                   
## C1           0.087  0.220 -0.001                            
## C2          -0.267  0.021 -0.055 -0.589                     
## C3           0.105 -0.249 -0.169 -0.200  0.010              
## C4           0.018  0.118 -0.021  0.009  0.015  0.093       
## C5           0.155 -0.135  0.021 -0.237 -0.012  0.336  0.068
tab_model(modA.12,
          show.stat = T, show.se = T)
  Behav
Predictors Estimates std. Error CI Statistic p
(Intercept) 56.64 0.82 55.02 – 58.26 68.70 <0.001
Naturalness c 0.31 0.02 0.27 – 0.36 13.86 <0.001
Risk c -0.29 0.02 -0.32 – -0.25 -14.52 <0.001
C1 -0.78 2.23 -5.15 – 3.59 -0.35 0.726
C2 -2.08 2.57 -7.12 – 2.96 -0.81 0.419
C3 -8.96 2.11 -13.10 – -4.82 -4.25 <0.001
C4 -0.74 1.31 -3.32 – 1.83 -0.57 0.571
C5 -6.92 1.74 -10.33 – -3.50 -3.98 <0.001
Random Effects
σ2 329.23
τ00 id 486.69
ICC 0.60
N id 1003
Observations 2695
Marginal R2 / Conditional R2 0.179 / 0.669
#Lastly, add benefit. The final model is naturalness, risk perception, benefit, and burger comparisons predicting support. 
modA.13 <- lmer(Behav ~ Naturalness.c + Risk.c + Benefit.c + C1 + C2 + C3 + C4 + C5 + (1|id), data = L)

summary(modA.13)
## Linear mixed model fit by REML ['lmerMod']
## Formula: Behav ~ Naturalness.c + Risk.c + Benefit.c + C1 + C2 + C3 + C4 +  
##     C5 + (1 | id)
##    Data: L
## 
## REML criterion at convergence: 23038.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.8399 -0.3673  0.0865  0.4459  5.0458 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept)  80.44    8.969  
##  Residual             241.75   15.548  
## Number of obs: 2691, groups:  id, 1002
## 
## Fixed effects:
##               Estimate Std. Error t value
## (Intercept)   56.43066    0.46494 121.372
## Naturalness.c  0.10836    0.01805   6.003
## Risk.c        -0.03840    0.01456  -2.637
## Benefit.c      0.80404    0.01440  55.845
## C1            -0.06982    1.80030  -0.039
## C2             1.73475    2.10219   0.825
## C3            -0.46655    1.74587  -0.267
## C4             0.78475    1.06496   0.737
## C5            -9.15579    1.39934  -6.543
## 
## Correlation of Fixed Effects:
##             (Intr) Ntrln. Risk.c Bnft.c C1     C2     C3     C4    
## Naturlnss.c -0.017                                                 
## Risk.c       0.015  0.387                                          
## Benefit.c   -0.007 -0.227  0.188                                   
## C1           0.140  0.204  0.012  0.015                            
## C2          -0.388  0.019 -0.043  0.034 -0.591                     
## C3           0.151 -0.245 -0.132  0.096 -0.178  0.006              
## C4           0.003  0.104 -0.008  0.033  0.026  0.012  0.056       
## C5           0.212 -0.119  0.015 -0.036 -0.214 -0.013  0.327  0.026
tab_model(modA.13,
          show.stat = T, show.se = T)
  Behav
Predictors Estimates std. Error CI Statistic p
(Intercept) 56.43 0.46 55.52 – 57.34 121.37 <0.001
Naturalness c 0.11 0.02 0.07 – 0.14 6.00 <0.001
Risk c -0.04 0.01 -0.07 – -0.01 -2.64 0.008
Benefit c 0.80 0.01 0.78 – 0.83 55.85 <0.001
C1 -0.07 1.80 -3.60 – 3.46 -0.04 0.969
C2 1.73 2.10 -2.39 – 5.86 0.83 0.409
C3 -0.47 1.75 -3.89 – 2.96 -0.27 0.789
C4 0.78 1.06 -1.30 – 2.87 0.74 0.461
C5 -9.16 1.40 -11.90 – -6.41 -6.54 <0.001
Random Effects
σ2 241.75
τ00 id 80.44
ICC 0.25
N id 1002
Observations 2691
Marginal R2 / Conditional R2 0.620 / 0.715