Scaling

# install.packages("here")
library(here)
here() starts at /home/markl/OneDrive/Teaching/20231-PSYC520/20231-psyc520-usc
library(tidyr)
library(dplyr)

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
verbaggr_dat <- read.table(
    here("data", "data verbal aggression matrix dichot.txt"),
    header = TRUE
)
# Rename due to a typo in original data
names(verbaggr_dat)[4:6] <- c("s2wantcurse", "s2wantscold", "s2wantshout")
names(verbaggr_dat)[16:18] <- c("s2docurse", "s2doscold", "s2doshout")
# Use small letters for all names
names(verbaggr_dat) <- tolower(names(verbaggr_dat))
# S1: A bus fails to stop for me
# S2: I miss a train because a clerk gave me faulty information.
# S3: The grocery store closes just as I am about to enter.
# S4: The operator disconnects me when I had used up my last 10 cents for a call.

Guttman Scaling

# Proportion of Yeses for want cursing
colMeans(verbaggr_dat[c(1, 4, 7, 10)])
s1wantcurse s2wantcurse s3wantcurse s4wantcurse 
  0.7120253   0.7879747   0.5949367   0.6898734 
# So, S2 > S1 > S4 > S3
# Coefficient of reproducibility
# Number of correct responses:
sum(
    (verbaggr_dat$s2wantcurse >= verbaggr_dat$s1wantcurse) &
    (verbaggr_dat$s1wantcurse >= verbaggr_dat$s4wantcurse) &
    (verbaggr_dat$s4wantcurse >= verbaggr_dat$s3wantcurse)
)
[1] 222
# Number of errors
316 - 222
[1] 94
# C = 1 - number of errors / total number of responses;
# error in your text on p. 94
1 - 94 / 316
[1] 0.7025316
Exercise 1

Compute the coefficient of reproducibility for the six S2 items

# Add your code below

Likert Scaling

data(bfi, package = "psych")
Exercise 2

What are the response labels for the bfi data set? Use ?bfi to identify them.

Answer:

Exercise 3

Consider the wordings in the Extraversion items. Which items seem negatively oriented?

Answer:

Exercise 4

Given that there are negatively oriented items, identify respondents who seem to have inconsistent responses in the Extraversion items. You can be creative in defining what inconsistent responses mean here, but please define them clearly.

# Your code
Exercise 5

What is the process of you reacting to

How positive or negative do you feel about nuclear fusion technology

on a 7-point scale (1 = extremely negative to 7 = extremely positive)?

Answer: