算法手册/ 问卷研究/ 多选题

多选题

计算公式

符号

符号含义
k选项数
n回答人数
xij第 i 人是否选中第 j 个选项(0/1)
nj第 j 个选项的响应次数
E等概假设下每个选项的期望响应次数
χ2卡方拟合优度统计量

核心公式

公式 (1.1):选项响应次数
\[ n_j=\sum_{i=1}^{n}x_{ij} \]
公式 (1.2):响应率
\[ P_j^{(r)}=\frac{n_j}{\sum_{l=1}^{k}n_l}\times 100\% \]
公式 (1.3):普及率
\[ P_j^{(p)}=\frac{n_j}{n}\times 100\% \]
公式 (1.4):卡方拟合优度检验
\[ \chi^{2}=\sum_{j=1}^{k}\frac{(n_j-E)^{2}}{E},\qquad E=\frac{1}{k}\sum_{j=1}^{k}n_j,\qquad df=k-1 \]

参考文献

  1. Pearson, K. (1900). On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling. Philosophical Magazine, 50(302), 157–175.
  2. Agresti, A. (2002). Categorical Data Analysis (2nd ed.). Wiley.

算法参数

本方法没有需要额外选择的算法参数:变量的选择属于分析设置,全部计算按上式的定义直接完成。

验证报告

数据与 R 包

数据文件 multiselect.csv
样本与变量 N = 150;M1–M6 六个 0/1 选项列
R 包 stats 4.6.2(R 基础包)

提示词

对 M1–M6 六个 0/1 选项做多选题分析,输出每个选项的响应次数、响应率与普及率,并做卡方拟合优度检验(H0:各选项被选中的机会均等)。

R 代码

d <- read.csv("multiselect.csv")
n <- nrow(d)
cnt <- colSums(d)
tot <- sum(cnt)
k <- length(cnt)
print(cnt)
print(cnt / tot * 100, digits = 15)
print(cnt / n * 100, digits = 15)
print(c(total = tot, per_case = tot / n), digits = 15)
g <- chisq.test(cnt)
print(g, digits = 15)

对比结果

指标SPSSAUR差值
响应次数(M1)95950
响应次数(M2)76760
响应次数(M3)49490
响应次数(M4)38380
响应次数(M5)24240
响应次数(M6)26260
响应合计3083080
响应率 M1(%)30.844155844230.84415584424.41e−11
响应率 M2(%)24.675324675324.67532467532.47e−11
响应率 M3(%)15.909090909115.90909090919.09e−12
响应率 M4(%)12.337662337712.33766233773.77e−11
响应率 M5(%)7.79220779227.79220779227.79e−12
响应率 M6(%)8.44155844168.44155844164.16e−11
普及率 M1(%)63.333333333363.33333333333.33e−11
普及率 M2(%)50.666666666750.66666666673.33e−11
普及率 M3(%)32.666666666732.66666666673.33e−11
普及率 M4(%)25.333333333325.33333333333.33e−11
普及率 M5(%)16.000000000016.00000000000
普及率 M6(%)17.333333333317.33333333333.33e−11
χ²79.623376623479.62337662342e−11
df550
p 值< 0.0011.006100e−15—(SPSSAU 只报 < 0.001)

结论:六个选项的响应次数、响应率与普及率逐位一致;χ² 与 df 和 R 相同(χ² 差 2e−11)。p 值在 SPSSAU 中显示为小于 0.001,R 的全精度值为 1.006100e−15,结论同为各选项被选中的机会不均等。

操作手册 问题反馈

引用SPSSAU. 多选题:计算公式与参数[EB/OL]. SPSSAU算法手册, 2026-11-20. https://www.spssau.com/algorithm/questionnaire/multiselect.html.