R语言betafunctions包 LL.CA函数使用说明

返回R语言betafunctions包函数列表


功能\作用概述:

一种被称为“利文斯顿和刘易斯方法”的分类一致性和准确性的实现方法,该方法通过采用复合贝塔二项分布,假设真实得分符合四参数贝塔分布,测量误差符合二项分布。在这些假设下,可以通过观察结果和测试可靠性来估计测试的预期分类一致性和准确性。


语法\用法:

LL.CA(
x = NULL,
reliability,
cut,
min = 0,
max = 1,
true.model = "4P",
error.model = "binomial",
truecut = NULL,
output = c("accuracy", "consistency"),
failsafe = FALSE,
l = 0,
u = 1,
override = NULL
)


参数说明:

x : 要拟合β分布的观察分数向量,或预定义的真实分数分布参数值列表。如果提供了列表,则列表项必须以参数命名:l和u表示位置参数,alpha和beta表示形状参数。

reliability : 观察到的分数平方相关(即共享方差的比例)与真实分数。

cut : 将观察分为合格或不合格类别的截止值。

min : 试验中可能达到的最小值。默认值为0(假设x表示比例)。

max : 试验中可能达到的最大值。默认值为1(假设x表示比例)。

true.model : 拟合真实分数分布矩的概率分布。选项是“4P”(默认)和“2P”,指的是四参数和两参数Beta分布。“4P”方法产生一个四参数β分布,其前四个矩(均值、方差、偏度和峰度)与估计的真分数分布相同,而“2P”方法产生一个双参数β分布,其前两个矩(均值和方差)与估计的真分数分布相同。

error.model : 用于在真实分数表的不同点产生抽样分布的概率分布。选项有二项式和beta。二项分布是离散的,是利文斯顿和刘易斯最初使用的分布。二项分布的使用包括将有效测试长度四舍五入到最接近的整数值。β分布是连续的,不涉及有效测试长度的四舍五入。

truecut : “真实”截止的可选规格。用于生成ROC曲线(有关详细信息,请参阅文档)中华民国()函数)。

output : 字符向量,指示要计算并包含在输出中的统计信息类型(即,精度和/或一致性)。允许值为“准确度”和“一致性”。

failsafe : 逻辑值,指示如果四参数拟合程序产生不允许的参数估计,是否将自动故障保护默认值与双参数β真分数分布相结合。默认值为FALSE(即,函数将不启用故障保护,并且如果产生不允许的参数估计,则可能产生错误)。

l : 如果真。模型=“2P”或failsafe=TRUE,双参数拟合过程中使用的下限位置参数。默认值为0(即

u : 如果真。模型=“2P”或failsafe=TRUE,在双参数拟合过程中使用的上限位置参数。

override : betafunctions版本1.3.1中的惰性工件(替换为failsafe参数)。将在以后的更新中完全删除。


示例\实例:

# Generate some fictional data. Say, 100 individuals take a test with a
# maximum score of 100 and a minimum score of 0.
set.seed(1234)
testdata < - rbinom(100, 100, rBeta.4P(100, 0.25, 0.75, 5, 3))
hist(testdata, xlim = c(0, 100))

# Suppose the cutoff value for attaining a pass is 50 items correct, and
# that the reliability of this test was estimated to 0.7. To estimate and
# retrieve the estimated parameters, confusion matrix, consistency and
# accuracy statistics using LL.CA():
LL.CA(x = testdata, reliability = .7, cut = 50, min = 0, max = 100)

# Suppose the true-score parameter estimation procedure arrived at
# impermissible parameter estimates (i.e., l < 0, u > 1, alpha < 0, or
# beta < 0). For example:
set.seed(9)
testdata < - rbinom(100, 25, rBeta.4P(100, 0.25, 1, 5, 3))
Beta.tp.fit(testdata, 0, 25, 25, failsafe = TRUE)

# Suppose further that you have good grounds for assuming that the lower-
# bound parameter is equal to 0.25 (e.g., the test consists of multiple-
# choice questions with four response options, leading to a 25% probability
# of guessing the correct answer per question), and good reason to believe
# that the upper-bound parameter is equal to 1 (i.e., there is no reason to
# believe that there are no members of the population who will attain a
# perfect score across all possible test-forms.) To set these lower and
# upper bounds for the fitting procedure in the LL.CA() function, set
# the argument true.model = "2p", and specify the location parameters
# l = 0.25 and u = 1:
LL.CA(testdata, 0.6287713, 12, 0, 25, true.model = "2p", l = 0.25, u = 1)

# Alternatively to supplying scores to which a true-score distribution is
# to be fit, a list with true-score distribution parameter values can be
# supplied manually along with the effective test length (see documentation
# for the ETL() function), foregoing the need for actual data. The list
# entries must be named. "l" is the lower-bound and "u" the upper-bound
# location parameters of the true-score distribution, "alpha" and "beta" for
# the shape parameters, and "etl" for the effective test-length..
trueparams < - list("l" = 0.25, "u" = 0.75, "alpha" = 5, "beta" = 3, "etl" = 50)
LL.CA(x = trueparams, cut = 50, min = 0, max = 100)