Assignment
This assignment will build on the work that you did in the tutorial. You will be provided with the functions that you created in the tutorial, as well as a set of data from a separate subject (subj2.csv).
Question 1. Modify mainscript.mat to import the data from Subject 2. Call this array ‘s2’ [1 point]
Question 2. Run mainscript.mat, which, as in the tutorial, will give you a value of k and beta for this participant (subject 2). Recall that typing ‘par’ will give you the beta value (first value), and the k value (second value). For one of the trials, the participant was offered $110 in 14.4 days vs $100 immediately, and they chose the sooner option. How would you calculate the subjective value of that $110 offer to Subject 2? What is that subjective value? [2 points]
Question 3. Use the k value to calculate the subjective value of the delayed reward on all 180 trials. Save the data into an array called ‘sv’. [2 points]
Hint: Use one of the function scripts that you wrote in the tutorial to do this.
Question 4. The script negLL.mat calculates the negative sum of log likelihoods. Which two lines of this script would you type if you wanted to calculate the log likelihoods of each of the 180 trials that Subject 2 made? [2 points]
Question 5. Interpret the difference in k value between this subject, and Subject 1 whose data you analysed in the tutorial (k = 0.0882). Which participant discounts delayed rewards more? Write a few sentences interpreting this result, referring to the hyperbolic discounting function in your answer [2 points]
Question 6.
6a. What is a free parameter? [1 point]
6b. What is a fixed parameter? [1 point]
6c. How many free parameters are in the hyperbolic model you analysed? [1 point]
Question 7. Up until now, we have assumed that a hyperbolic function is the best fitting function to describe temporal discounting. However, other models have been proposed (e.g., exponential, beta-delta models). Let’s say you want to estimate this participant’s k and beta value for an exponential function, where:
Rewrite the discount function to analyse this exponential function, instead of the hyperbolic function you have been analysing [2 points]
Question 8a. Calculate, for Subject 2, the Akaike Information Criterion for the hyperbolic model fit [2 points]
Hint: Refer to the lecture notes for the formula for an AIC. You will need to know the log likelihood of this model (which you can calculate as the ‘negative of the nLL’), and the number of free parameters in this model.
Question 8b. Calculate, for this subject, the Bayesian Information Criterion for the hyperbolic model fit [2 points]
Hint: Refer to the lecture notes for the formula for a BIC. In addition to what you need for the AIC, you will also need to know the number of trials or observations.
Question 8c. Three different functions were compared in Subject 2, which resulted in the following AIC values:
Function 1: AIC = 84.14
Function 2: AIC = 61.25
Function 3: AIC = 47.92
Based on this information, which function provided the best model fit, and why? [2 points]