Skip to contents

Overview

This package aims to support Embedded Standard Setting, calculating counts and weights.

Install

devtools::install_github("sooyongl/EmStanS", dependencies = T)

Usage

set.seed(1)
fake_data <-  generateMockDataSet(ngca = 3, 
               cor_val = 0.2,
               n = 30,
               nlevel = 3,
               ntable = 5,
               npanelist = 5,
               sdinp = 1,
               ecinp = 0,
               100,300)



fake_data
#> $setup
#> # A tibble: 3 × 7
#>   GCA   `Content Area` `Grade Group` `Number of Tables per Room` `Level Options`
#>   <chr> <chr>          <chr>         <chr>                       <chr>          
#> 1 M1    Math           1             5                           Level1, Level2…
#> 2 M2    Math           2             5                           Level1, Level2…
#> 3 M3    Math           3             5                           Level1, Level2…
#> # ℹ 2 more variables: SD <dbl>, EC <dbl>
#> 
#> $panelist
#> # A tibble: 75 × 3
#>   GCA   Panelist Table
#>   <chr> <chr>    <chr>
#> 1 M1    M1.T1.1  T1   
#> 2 M1    M1.T1.2  T1   
#> 3 M1    M1.T1.3  T1   
#> 4 M1    M1.T1.4  T1   
#> 5 M1    M1.T1.5  T1   
#> # ℹ 70 more rows
#> 
#> $rating
#> # A tibble: 2,250 × 8
#>   GCA   Subject Grade Round Table Panelist Item_ID ALD   
#>   <chr> <chr>   <chr> <dbl> <chr> <chr>    <chr>   <chr> 
#> 1 M1    Math    1         1 T1    M1.T1.1  M1_1    Level1
#> 2 M1    Math    1         1 T1    M1.T1.1  M1_2    Level2
#> 3 M1    Math    1         1 T1    M1.T1.1  M1_3    Level2
#> 4 M1    Math    1         1 T1    M1.T1.1  M1_4    Level2
#> 5 M1    Math    1         1 T1    M1.T1.1  M1_5    Level3
#> # ℹ 2,245 more rows
#> 
#> $item_data
#> # A tibble: 90 × 7
#>   GCA   Domain Item_ID Total_points Point Order_of_Difficulty Loc_RP50
#>   <chr> <chr>  <chr>          <dbl> <dbl>               <int>    <dbl>
#> 1 M1    Alg    M1_1               1     1                   1     103.
#> 2 M1    Alg    M1_2               1     1                   2     112.
#> 3 M1    Prob   M1_3               1     1                   3     125.
#> 4 M1    Alg    M1_4               1     1                   4     135.
#> 5 M1    Geom   M1_5               1     1                   5     140.
#> # ℹ 85 more rows
#> 
#> $examineedata_data
#> # A tibble: 663 × 3
#>   score  freq Grade
#>   <int> <int> <chr>
#> 1    88     2 M1   
#> 2    89     7 M1   
#> 3    90     0 M1   
#> 4    91     6 M1   
#> 5    92     5 M1   
#> # ℹ 658 more rows

# Or you can use your own data structured by the following table.
res <- emstans(data = fake_data,
               grades = c(1, 2),
               location = "Loc_RP50",
               method = "weight",
               descriptors = "threshold",   # the default; "range" before 1.1.0
               smooth = FALSE)

descriptors states how the level descriptors relate to the cuts. With threshold descriptors (the default), a cut opens the level of the items aligned at or below it, examinees below the lowest cut are reported as “Below” the lowest level, and the highest level holds items only. Use descriptors = "range" for descriptors that describe a whole level. See the “Range and threshold descriptors” article for how to choose.

Summary

summary(res)
#>     unit cut_level modal median average agreement weighted_kappa
#> 1 M1-All    Level1 140.3  153.4  160.87     0.567          0.316
#> 2 M1-All    Level2 279.7  254.0  249.08     0.567          0.316
#> 3 M2-All    Level1 144.0  181.6  182.89     0.833          0.286
#> 4 M2-All    Level2 332.3  314.1  302.71     0.833          0.286

Report

With what = "all", the combined report is provided.

Individual

report(res, what = "individual")

Detailed

report(res, what = "detailed")

Summary

report(res, what = "summary")

Item Review

report(res, what = "review")

Extract

extract() provides the primary results of ESS as a form of list().

extract(res)