finding entries 3SD below the mean reponse duration

Hi R Studio community!

I'm struggling with something I'm sure is quite simple, I hope someone can help!

I have a column in my data set (survey responses from qualtrics) which is numeric data for the duration taken to complete survey in seconds. I want to filter out participants who responded exeptionally fast so I can look at their responses. I am hoping to find any participants whose response is equal to or less than 3SD from the mean.. I cannot figure out how to do this. I have foud the mean reponse time, and SD, but don't know how to specifically select those with fast responses.

Any help with syntax for this wold be greatly appreciated!

Thank you in advance :slight_smile:

Here are two methods for selecting the rows in a data frame using mean - 3sd of one column.

DF <- data.frame(Value = rnorm(2000), 
                 Name = sample(LETTERS, 2000, replace = TRUE))
Mean <- mean(DF$Value)
Sig <- sd(DF$Value)
LIM <- Mean - 3 * Sig
#Method 1 for filtering
LowValues <- DF[DF$Value <= LIM, ]

#Method 2 for filtering 
LowValues <- filter(DF, Value <= LIM)
1 Like

thank you for this!!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.