I have the result of code:
results$love <- cycle_fn(answers_clean$lovehate, function(x) {
x %>%
summarise(
n = sum(group_modality != "neutral"),
positive = sum(group_modality == "positive"),
negative = sum(group_modality == "negative"),
.groups = "drop"
) %>%
mutate(ci.index(positive, negative))
})
result:
n=11,positive =3,negative=8,index.mean = 0.272, index.lower=0.1278, index.upper=0.489.
I try to understand the formula inside the ci.index(positive,negative) and how the values index.lower and index.upper calculates? I understand that ci function is similar to t.test but what is inside? positive is just like 1,1,1 and negative is -1,-1,..