-
Notifications
You must be signed in to change notification settings - Fork 1
/
03_omegaReading.Rmd
58 lines (42 loc) · 1.99 KB
/
03_omegaReading.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
---
title: |
| Categorical Omega calculations for NRC reading scales
output:
html_document:
toc: true
toc_depth: 5
code_folding: show
---
-----
__Code written:__ 2019-12-02
__Last run:__ `r Sys.Date()`
__Authors:__ Navona Calarco & Colin Decker
__Website:__ https://rpubs.com/navona/Mar_categoricalOmegaReading
__Git repo:__ https://github.com/navonacalarco/NRC_Mar
__R version desktop:__ platform: x86_64-apple-darwin15.6.0, arch: x86_64, os: darwin15.6.0, system: x86_64, darwin15.6.0, major: 3, minor: 5.1, year: 2018, month: 07, day: 02, svn rev: 74947, language: R, version.string: R version 3.5.1 (2018-07-02), nickname: Feather Spray
-----
__Description.__
This notebook details the code used to run categorical omega on the NRC reading scales. We use categorical as the scales only have 2 levels (right/wrong).
__Relevant documentation__.
https://www.rdocumentation.org/packages/MBESS/versions/4.6.0/topics/ci.reliability #MBESS
https://github.com/cran/MBESS/blob/master/R/ci.reliability.R #code underlying ci.reliability()
__Set up__
```{r setup}
#conditional install and load libraries
if (!require("pacman")) install.packages("pacman")
pacman::p_load(MBESS, tictoc, lavaan)
#read in test df
df_analogies <- read.csv(dir('../data/out/reading', full.names=T, pattern="^df_analogies_"))
df_sentences <- read.csv(dir('../data/out/reading', full.names=T, pattern="^df_sentences_"))
df_synonyms <- read.csv(dir('../data/out/reading', full.names=T, pattern="^df_synonyms_"))
```
```{r}
#check to see if no variance in any items -- none, great
sum(apply(df_analogies, 2, var) == 0)
sum(apply(df_sentences, 2, var) == 0)
sum(apply(df_synonyms, 2, var) == 0)
#run models
ci.reliability(data=df_analogies, type="categorical", conf.level = 0.95, interval.type="bca", B=1000)
ci.reliability(data=df_sentences, type="categorical", conf.level = 0.95, interval.type="bca", B=1000)
ci.reliability(data=df_synonyms, type="categorical", conf.level = 0.95, interval.type="bca", B=1000)
```