Hello everyone, I have a problem that needs to be solved, and I hope I can get any help here.
I have an experimental economics data that my lecturer ran, and the data sample of one of the individuals that participated in this experiment is given below:
Here is the context:
The experiment ran in 20 rounds where each participant got five tokens in each round that should be allocated between the five alternatives shown on the participant's page. The alternative contains information about the participant's payoffs if they choose it. I have 21 alternatives that were randomly selected in each round into five alternatives. For example, in Round 1, Jack faces five alternatives: Alternatives 5,3,10,19, and 21, where each alternative contains information that he would get either x1 with a probability of p1 or x2 with a probability of p2 (note: r1_ r2_, etc. means experiment rounds). He decided to allocate five tokens into different alternatives (stored in "r1lotere" variable). After he allocates his tokens and finishes that round, he will get information about the payoff shown in the alternatives he chose in that Round (stored in "r1_reveal" variable). The experiment will continue until Round 20, which shows different alternatives in each round since it is randomly chosen and not ordered. It does not rule out the possibility that Jack faces the same alternatives in two or more rounds since it has a total of 20 rounds. In the next round, if Jack faces one or several same alternatives shown in previous rounds that he faced before and decides to allocate it (for example, Jack faces Alternative_5 in Round 1 and allocates his tokens to Alternative_5, he got the information right after the Round 1 that he got x1 (that is 21) and he faces Alternative_5 again in Round 10, 13, and 17), then the information in Alternative_5 in Round 10,13, and 17 should change in a certain value, not in the probabilistic form again since the payoff is already revealed in the previous round (that is 21 in Round 1). Meaning that the x1, p1, x2, and p2 in Round 10, 13, and 17 of Alternative_5 should change to x1 = 21, p1 = 1, x2 = 0, p2 = 0. However, this is not happening in my dataset right now. Hence, I have to manipulate it manually into that condition to all possible Alternatives shown in two or more rounds that have been allocated before. How do I code this situation to manipulate the data?
Additional note: the x1, p1, x2, and x2 will only change to a certain value if and only if the same Alternative is already shown in previous Rounds that Jack took and managed to allocate it. This means that, for example, if Alternative_13 were shown in Round 2, 9, 13, and 17, and he just started to allocate his token to Alternative_13 in Round 13, then the x1, p1, x2, and p2 in Round 2, 9 and, 13 will still in probabilistic form, and will change to certain value only in Round 17 because he just started to allocate his token to Alternative_13 in Round 13, even though Jack is not allocating his token to Alternative_13 in Round 17.
Thank you for helping me, and sorry for the long explanation and if it's confusing.
I have an experimental economics data that my lecturer ran, and the data sample of one of the individuals that participated in this experiment is given below:
Here is the context:
The experiment ran in 20 rounds where each participant got five tokens in each round that should be allocated between the five alternatives shown on the participant's page. The alternative contains information about the participant's payoffs if they choose it. I have 21 alternatives that were randomly selected in each round into five alternatives. For example, in Round 1, Jack faces five alternatives: Alternatives 5,3,10,19, and 21, where each alternative contains information that he would get either x1 with a probability of p1 or x2 with a probability of p2 (note: r1_ r2_, etc. means experiment rounds). He decided to allocate five tokens into different alternatives (stored in "r1lotere" variable). After he allocates his tokens and finishes that round, he will get information about the payoff shown in the alternatives he chose in that Round (stored in "r1_reveal" variable). The experiment will continue until Round 20, which shows different alternatives in each round since it is randomly chosen and not ordered. It does not rule out the possibility that Jack faces the same alternatives in two or more rounds since it has a total of 20 rounds. In the next round, if Jack faces one or several same alternatives shown in previous rounds that he faced before and decides to allocate it (for example, Jack faces Alternative_5 in Round 1 and allocates his tokens to Alternative_5, he got the information right after the Round 1 that he got x1 (that is 21) and he faces Alternative_5 again in Round 10, 13, and 17), then the information in Alternative_5 in Round 10,13, and 17 should change in a certain value, not in the probabilistic form again since the payoff is already revealed in the previous round (that is 21 in Round 1). Meaning that the x1, p1, x2, and p2 in Round 10, 13, and 17 of Alternative_5 should change to x1 = 21, p1 = 1, x2 = 0, p2 = 0. However, this is not happening in my dataset right now. Hence, I have to manipulate it manually into that condition to all possible Alternatives shown in two or more rounds that have been allocated before. How do I code this situation to manipulate the data?
Additional note: the x1, p1, x2, and x2 will only change to a certain value if and only if the same Alternative is already shown in previous Rounds that Jack took and managed to allocate it. This means that, for example, if Alternative_13 were shown in Round 2, 9, 13, and 17, and he just started to allocate his token to Alternative_13 in Round 13, then the x1, p1, x2, and p2 in Round 2, 9 and, 13 will still in probabilistic form, and will change to certain value only in Round 17 because he just started to allocate his token to Alternative_13 in Round 13, even though Jack is not allocating his token to Alternative_13 in Round 17.
Thank you for helping me, and sorry for the long explanation and if it's confusing.
Comment