recovery_element: Element-wise Accuracy Table for Q Matrix Estimation

Description Usage Arguments Value Examples

View source: R/permutations.R

Description

Given the oracle Q matrix, compare the estimated Q matrix to determine how accurate the estimation routine is.

Usage

1
recovery_element(estimated, oracle, decision = 0.5)

Arguments

estimated

Set containing the estimated strategies values on generated data. Dimensions: J x K x S.

oracle

Set containing the actual strategies used to generate the data. Dimensions: J x K x S.

decision

Threshold for applying a classification to estimated entry. Default: 0.5

Value

A list containing:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Create a Q matrix
Q_oracle =
  rbind(c(0, 1),
        c(1, 0),
        c(0, 1),
        c(1, 0),
        c(0, 1),
        c(0, 1),
        c(1, 0))

# Simulate a random Q matrix
Q_est = matrix(runif(7*2), ncol = 2)

# Obtain the recovery metric for elementwise matches
recovery_element(Q_est, Q_oracle)

tmsalab/edmcore documentation built on Sept. 4, 2021, 2:46 a.m.