Some time ago we ran a survey to find out why people had stopped using Castor EDC. To improve the response rate, we decided to offer an iPad as an incentive to one of the respondents, which works quite well as a tool in research. We selected our winner for the iPad by using an R script. In this blog post I will explain how to write an R script to randomly pick one user from a group, while I also share some of the results of the survey.
The results of the survey
Let’s first start with the results of the survey. We ran the survey for internal use, but I will share the interesting bits with you. We had 47 responses out of 101 invites (47% response rate).
Firstly we asked people if they had actually stopped using Castor or if their project was just paused. A little more than half (53%) had indeed stopped using Castor. More than a third of those who stopped just wanted to try out Castor (36%), which we expected as there are no barriers to experiment in the system. What we also found was that 28% of people who stopped using Castor found the system to be too expensive for their needs, mainly because they did not have a study budget to do so. The final reason for no longer using Castor was that researchers did not have enough time to build their own study (32%). We are now offering building services through our partners, so hopefully that will make it a bit easier for people to choose for our platform.
The most common reasons of those people that only had their projects paused were:
- “My research project suspended for a while”
- “Still waiting for a sponsorship before we start/go further with Castor.”
- “We are waiting for one ethical approval before we can start using Castor”
This survey has shown us that sometimes patience is the best answer and that we should look for opportunities to support researchers without any budget for their study.
Writing an R script
To decide whom to give the iPad to, we used a simple R script which we explained in the image below. In my opinion, R is the only way forward in statistical analysis, and I encourage everyone to start learning it!
#Picking a winner #SCRIPT CREATED 16-06-2016 #Created by Derk Arts #Load the Survey results into R #This is the CSV export straight from Castor surveyResults = read.csv("surveyResults.csv",sep=";"); #Clear out surveys that were not completed surveyResults = subset(surveyResults, surveyResults$Survey.Completed.On != "") #Pick a random number randomInt = round(runif(1,1,nrow(surveyResults))) #Find the survey Record ID, for the row that was selected by our random number. selectedRecordId = surveyResults[rownames(surveyResults) == randomInt,'Castor.Record.ID'] #THIS IS THE WINNER paste("AND THE WINNER = ",selectedRecordId)
Here below you can watch the video of how we ran the R script to pick a winner.