-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
visual_power hard coded for m = 20 #16
Comments
I agree.
To clean it up a bit more, it might be good, to also parameterize the
number of targets instead of just assuming 1.
…On Sun, Oct 25, 2020 at 6:31 AM Emi Tanaka ***@***.***> wrote:
The power calculation looks like it is hardcoded for when the lineup size
is 20? The 19 below should be m-1 I think?
visual_power <- function(data, m=20) {
pic_id <- NULL
detected <- NULL
nchoices_wgt <- NULL
data <- data %>% mutate(
nchoices_wgt = (m-lengths(strsplit(as.character(data$response), ",")))/19) #<<
visual_p <- data %>% group_by(pic_id) %>%
summarise(power = sum(detected*nchoices_wgt)/length(detected), n=length(detected))
return(visual_p)
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#16>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAWVUWD5PAV2WUMXAPVV7TSMQD77ANCNFSM4S6IRSIQ>
.
|
The simple fix is done. Thanks @emitanaka |
@heike do you have the formula for multiple targets? This code is very specifically geared to the early experiments, assuming the data structure contains pic_id, detected, mchoices_wgt, too. I'd forgotten that I added this function - I put it in because how to make the calculation was a bit hidden in the published papers. It could be better written generally. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The power calculation looks like it is hardcoded for when the lineup size is 20? The
19
below should bem-1
I think?The text was updated successfully, but these errors were encountered: