【发布时间】:2019-10-25 21:36:39
【问题描述】:
我无法获得组图表类型和条件的 Correct_answers 列中的平均准确度(TRUE 值的比例)。
数据
structure(list(Element = structure(c(1L, 1L, 1L, 1L, 1L), .Label = c("1",
"2", "3", "4", "5", "6"), class = "factor"), Correct_answer = structure(c(2L,
2L, 2L, 1L, 2L), .Label = c("FALSE", "TRUE"), class = "factor"),
Response_time = c(25.155, 6.74, 28.649, 16.112, 105.5906238
), Chart_type = structure(c(2L, 2L, 1L, 1L, 1L), .Label = c("Box",
"Violin"), class = "factor"), Condition = structure(c(1L,
2L, 1L, 2L, 1L), .Label = c("0", "1"), class = "factor")), row.names = c(NA,
5L), class = "data.frame")
按图表类型平均
av_data_chartType <- data %>% group_by(Chart_type) %>% summarise_each(funs(mean, sd))
按条件平均
av_data_conition <- data %>% group_by(Condition) %>% summarise_each(funs(mean, sd))
没有为准确性而产生的平均值
NA值是准确度应该在的地方。
【问题讨论】:
-
准确度是什么意思?指标?这是你需要的吗?
with(df,table(Correct_answer==T)) -
@NelsonGon “Correct_answer”列具有逻辑向量,如果 Correct_answer 为 TRUE,则表示参与者答对了问题。我想看看有多少比例/百分比的参与者对我提到的小组做出了正确的回答。