Download the DEEP R package
The primary software package for DEEP is called Integrated DEEP, and it:  Includes the DEEP Survey Tools and the DEEP Analysis Tools (for R).
 Supports Qualtrics and LimeSurvey.
 Can be inserted into any point in your existing survey.
 Can be customized for either DEEP Time or DEEP Risk.
 Can have up to 12 questions.
If you need to use DEEP on a platform other than Qualtrics or LimeSurvey, or need the DEEP 20question version.
How it works
Add DEEP to your survey
Data analysis
Download your data
Qualtrics
 Click the "View Results" tab and view your survey.
 Click the "Download Data" button.
 Select CSV and download.
LimeSurvey
 Go to your survey. On the menu bar, click "Responses and Statistics" with the pie chart icon.
 Then, click the "Export results to application" on the menu with the database icon.
 For the format, select "CSV" (not "CSV with all answers part").
 Click "Export Data".
You'll see that all of the DEEP data is compacted into a single column. This is normal. The DEEP R package transforms the data to the proper format.
Analyzing your data
Before starting, open your R Console and make sure the DEEP package is loaded.
The DEEP package takes four parameters in order to properly run the analysis. Read the description below to learn what you need to know before running the analysis:
 filter_by: Used to specify the "question identifier" ("question name" used in Qualtrics or LimeSurvey) in case you have multiple DEEP surveys and/or more than one DEEP type in the Qualtrics/Limesurvey output. The DEEP package can only analyze a single DEEP question at once. Failure to specify the question identifier will produce an error if more than one DEEP question is found. This is not casesensitive.
 DEEPtype: Refers to the type of DEEP question you used in your analysis. It accepts either "risk" or "time" (not case sensitive).If you have more than one DEEP question, please specify the DEEPtype for the question in the "filter_by" field.
 WD: Refers to the working directory. This is the folder/path where all the DEEP output will be exported. If you have multiple DEEP questions we recommend you create a folder for each question since any output file with the same name will be overwritten during analysis.
 file_path: Refers to the path of the file you exported from LimeSurvey or Qualtrics. If you do not specify a file_path, a Graphical User Interface will appear to allow you to manually select the file from you computer.
Below are two examples of what the R code to start the data analysis should look like.
deepRun(DEEPtype = "risk", WD = "C:/YourUser/Documents/OutputFolder/Risk", file_path = "C:/YourUser/Documents/OutputFolder/mySurvey.xml", filter_by = "RiskP")
deepRun(DEEPtype = "time", WD = "C:/YourUser/Documents/OutputFolder/Time", file_path = "C:/YourUser/Documents/OutputFolder/mySurvey.csv", filter_by = "DEEPtimeQ")
If for any reason that the above code doesn't work, you can try the following R code: Risk: deepTransform("risk", WD = "C:/YourUser/Documents/OutputFolder/Risk", file_path = "C:/YourUser/Documents/OutputFolder/mySurvey.xml") deepRiskHB()
Time: deepTransform("time", WD = "C:/YourUser/Documents/OutputFolder/Time" "C:/YourUser/Documents/OutputFolder/mySurvey.csv" deepTimeHB()
deepRiskHB(iterUntilSave, iterSaved) and deepTimeHB(iterUntil, iterSaved)  Description: Estimation of Risk/Time Preference Parameters Using Hierarchical Markov Chain Mote Carlo Bayesian Framework
 Preparation: Have the following files in your working directory (for example, setwd("C:/YourUser/Documents/Risk"))
Risk  Time  Description  adaptive_question_risk_1.csv  adaptive_question_time_1.csv  contains the path of adaptive questions  choices_risk_1.csv  choices_time_1.csv  contains participants choices (should be either 1 or 2)  serial_risk_1.csv  serial_time_1.csv  contains the Qualtrics or Limesurvey ID matched with the serial assigned by the R script 
 Arguments: The total number of iteration is the sum of the two arguments
 iterUntilSave: default to 50000 in deepRiskHB and 10000 in deepTimeHB
 iterSaved: default to 50000 in deepRiskHB and 40000 in deepTimeHB
 Output:
Risk  Time  Description  gambles1_risk_adaptive_r.csv
 gambles1_time_adaptive_r.csv
 contains the information of the chosen option (gamble1). Risk: V1 and V3= the outcome of gamble 1, V2 and V4 = the probability of the corresponding outcome. Time: V1 = the outcome of gamble 1, V2 = delay of time (V2 = 0, immediate payment)  gambles2_risk_adaptive_r.csv  gambles2_time_adaptive_r.csv  contains the information of the chosen option (gamble2). Risk: V1 and V3= the outcome of gamble 2, V2 and V4 = the probability of the corresponding outcome. Time: V1 = the outcome of gamble 2, V2 = delay of time (V2 = 0, immediate payment)  alphaconv_risk_q8_R0_1_r.csv
 alphaconv_time_q8_R0_1_r.csv  shows the likelihood that alpha estimates are converging  D_risk_q8_R0_1_r.csv  D_time_q8_R0_1_r.csv  contains the estimates of D  delta_risk_q8_R0_1_r.csv  delta_time_q8_R0_1_r.csv  contains the estimates of response error  deltaconv_risk_q8_R0_1_r.csv
 deltaconv_time_q8_R0_1_r.csv  shows the likelihood that delta estimates are converging  geofit_risk_q8_R0_1_r.csv    likeconv_risk_q8_R0_1_r.csv
 likeconv_time_q8_R0_1_r.csv  shows the likelihood that likelihood estimate is converging  theta_risk_q8_R0_1_r.csv  theta_time_q8_R0_1_r.csv  shows how well the model fit your data (A higher theta suggests the model fit your preferences well, whereas a lower theta suggests the model was unable to fit your preferences well)  wts_risk_q8_R0_1_r.csv  wts_time_q8_R0_1_r.csv  contains the actual estimates. Risk: V1= alpha(Distortion of probability), V2 = sigma(diminishing sensitivity/curvature of value function), V3= lambda (loss aversion) Time: V1= beta(present bias), V2 = daily_discount_rate 
 "q8" implies you used the 8question survey. If you used a different a survey with X number of questions, it would say "wts_time_qX_R0_1_r.csv"
 Error message:
 Error in colMeans(likeconv[(round(nit1/10) + 1):((nit1 + nit2)/10), ]) : 'x' must be an array of at least two dimensions
 Error in likeconv[(round(nit1/10) + 1):((nit1 + nit2)/10), ] : subscript out of bounds
Please remember that the DEEP license requires you to use cite the paper below for purposes of publication: Toubia, O., Johnson, E., Evgeniou, T., & Delquie, P. (2013) 'Dynamic experiments for estimating preferences: An adaptive method of eliciting time and risk parameters.' Management Science, 59(3), 613640.
Understanding the Output
*** UNDER CONSTRUCTION ***
For DEEPTime: If the script ran correctly, it would have produced a number of csv files (18 files).
The ones you should look for in DEEP Time are:  "adaptive_question_time_1.csv" which contains the path of adaptive questions
 "alphaconv_time_q8_R0_1_r.csv" which shows the likelihood that alpha estimates are converging
 "alphaconvqh_q8_R0_r.csv"
 "choices_time_1.csv" which contains participants choices (should be either 1 or 2)
 "D_time_q8_R0_1_r.csv" which contains the estimates of D
 "delta_time_q8_R0_1.csv" which contains the estimates of response error
 "deltaconv_time_q8_R0_1_r.csv" which shows the likelihood that delta estimates are converging
 "deltaconvqh_q8_R0_r.csv"
 "gambles1_time_adptive_1_r.csv" which contains the information of the chosen option (gamble1). V1 = the outcome of gamble 1, V2 = delay of time (V2 = 0, immediate payment)
 "gambles2_time_adptive_1_r.csv" which contains the information of the other option (gamble 2). V1 = the outcome of gamble 2, V2 = delay of time (V2 = 0, immediate payment)
 "likeconv_time_q8_R0_1_r.csv" which shows the likelihood that likelihood estimate is converging
 "likeconvqh_q8_R0_r.csv"
 "Qtime_DEEPtime.csv" which contains the response time for each question as columns
 "serials_respid.csv" which contains the Qualtrics or Limesurvey ID matched with the serial assigned by the R script.
 "serial_time_1.csv" which contains serial numbers (Make sure that there are NO values with NA in the data file)
 "theta_time_q8_R0_1_r.csv" which shows how well the model fit your data (A higher theta suggests the model fit your preferences well, whereas a lower theta suggests the model was unable to fit your preferences well)
 "Unshrunken_Parameter_Estimates.csv" which contains the preHierarchical Bayes estimates.You will have 2 columns. V1= Unshrunken_beta(present bias), V2 = Unshrunken_daily_discount_rate (Note: The old wiki page called this parameter
delta , which is a misnomer).  "wts_time_q8_R0_1_r.csv" which contains the actual estimates. You will have 2 columns. V1= beta(present bias), V2 = daily_discount_rate
For DEEPRisk: If the script ran correctly, it would have produced a number of csv files (19 files). The ones you should look for in DEEP Time are:  "adaptive_question_risk_1.csv" which contains the path of adaptive questions
 "alphaconv_risk_q8_R0_1_r.csv" which shows the likelihood that alpha estimates are converging
 "alphaconvv_risk_q8_R0_r.csv"
 "choices_risk_1.csv" which contains participants choices (should be either 1 or 2)
 "D_risk_q8_R0_1_r.csv" which contains the estimates of D
 "delta_risk_q8_R0_1.csv" which contains the estimates of response error
 "deltaconv_risk_q8_R0_1_r.csv" which shows the likelihood that delta estimates are converging
 "deltaconvv_risk_q8_R0_r.csv"
 "gambles1_risk_adptive_1_r.csv" which contains the information of the chosen option (gamble1). V1 and V3= the outcome of gamble 1, V2 and V4 = the probability of the corresponding outcome.
 "gambles2_risk_adptive_1_r.csv" which contains the information of the other option (gamble 2). V1 and V3= the outcome of gamble 1, V2 and V4 = the probability of the corresponding outcome.
 "geofit_risk_q8_R0_1_r.csv"
 "likeconv_risk_q8_R0_1_r.csv" which shows the likelihood that likelihood estimate is converging
 "likeconvv_risk_q8_R0_r.csv"
 "Qtime_DEEPrisk.csv" which contains the response time for each question as columns
 "serials_respid.csv" which contains the Qualtrics or Limesurvey ID matched with the serial assigned by the R script.
 "serial_risk_1.csv" which contains serial numbers (Make sure that there are NO values with NA in the data file)
 "theta_risk_q8_R0_1_r.csv" which shows how well the model fit your data (A higher theta suggests the model fit your preferences well, whereas a lower theta suggests the model was unable to fit your preferences well)
 "Unshrunken_Parameter_Estimates.csv" which contains the preHierarchical Bayes estimates.You will have 2 columns. V1= Unshrunken_beta(present bias), V2 = Unshrunken_daily_discount_rate (Note: The old wiki page called this parameter
delta , which is a misnomer).  "wts_risk_q8_R0_1_r.csv" which contains the actual estimates. You will have 3 columns. V1= alpha(Distortion of probability), V2 = sigma(diminishing sensitivity/curvature of value function), V3= lambda (loss aversion)
(Note that q8 implies you used the 8question survey. If you used a different a survey with X number of questions, it would say "wts_time_qX_R0_1_r.csv")
*** UNDER CONSTRUCTION ***
Getting help

