工作满意度和婚姻状况之间有关系吗?

时间:2019-04-05 15:09:39

标签: r

用卡方检验检查hr数据集中2个变量之间的关系?

tbl = table(my_dataset$JobSatisfaction, my_dataset$MaritalStatus)
chisq.test(tbl)

# Error in chisq.test(tbl) : at least one entry of 'x' must be positive
summary(my_dataset$JobSatisfaction)
#     Low  Medium    High v. High    NA's 
#       0       0       0       0     600 
summary(my_dataset$MaritalStatus)
# Divorced  Married   Single 
#      139      261      200 

0 个答案:

没有答案