Skip to contents

tntpmetrics calculates grade-appropriate assignments with the metrics = 'assignments' parameter added to make_metric(). The required column names and values for calculating grade-appropriate assignments are below.

Grade-Appropriate Assignments

  • Metric name to use in package: metric = 'assignments'
  • Items: content, practice, relevance
  • Scale: 0 (No Opportunity), 1 (Minimal Opportunity), 2 (Sufficient Opportunity)

Grade-appropriate assignment scores are calculated by adding the content, practice, and relevance values. Scores above 4 are grade-appropriate, while scores under 4 are not.

To show an example of calculating grade-appropriate assignments, we will create a fake data set of assignment ratings and then determine whether each assignment is grade-appropriate.

# create fake grade-appropriate assignment data
scale_values <- c(0,1,2)

n <- 100

assignment_scores <- tibble(
  class_id = sample(c(0, 1, 2), n, replace = TRUE),
  content = sample(scale_values, n, replace = TRUE),
  practice = sample(scale_values, n, replace = TRUE),
  relevance = sample(scale_values, n, replace = TRUE)
)

# determine wehther assignments are grade-appropriate
grade_appropriate <- assignment_scores %>%
  make_metric(metric = 'assignments') 
#> [1] "0 Row(s) in data were NOT used because missing at least one value needed to create common measure."

grade_appropriate %>%
  head() %>%
  kable()
class_id content practice relevance cm_assignments cm_binary_assignments
2 0 1 2 3 FALSE
1 0 2 0 2 FALSE
2 0 1 0 1 FALSE
1 0 0 1 1 FALSE
1 2 1 1 4 TRUE
2 1 0 1 2 FALSE

Finally, let’s calculate the percentage of grade-appropriate assignments. Note that we set by_class = TRUE because we have a unique identifier for the class in the class_id column.

We will output the results as a data frame containing the mean, standard error, and 95% confidence interval.

metric_mean(grade_appropriate, metric = "assignments", use_binary = TRUE, by_class = TRUE) %>%
  .[['Overall mean']] %>%
  summary() %>%
  as_tibble() %>%
  kable()
#> [1] "0 Row(s) in data were NOT used because missing at least one value needed to create common measure."
1 emmean SE df lower.CL upper.CL
overall 0.38 0.0487832 99 0.2832036 0.4767964