Experiment 1, session 3, cleaning the data

Authors
Affiliations

Elias Bouacida

University Paris 8

Renaud Foucart

Lancaster University

Published

October 7, 2024

Clean the raw data file, and lays out the assumption behind the cleaning.

# To uncomment if run separately
include("setup.jl");

Reading the Data

Time Spent

Read the table where the time spent on each page is kept. Then apply the function treatment to each subject.

Because of how we programmed the experiment, page 6 does not exist in the data and is therefore skipped. The epoch_time_completed for the page index 0 is exactly the same as the one used in participant_time_started_utc from the data. So we do not need to keep it here.

n_pages = 11;
pages = append!(collect(0:5),collect(7:11));
timespent = CSV.read(joinpath("..", "Data", "OriginalData", "PageTimes-2021-08-31.csv"), DataFrame, normalizenames = true)
timedata = combine(groupby(timespent, :participant_code), x->treatment(x, pages = pages));
for i = 1:(length(pages) -1)
    transform!(timedata, Symbol("time_page_$i") => ByRow(x -> (missingtime(x))) => Symbol("time_page_$i"))
end
transform!(timedata, :time_in_experiment => ByRow(x -> (missingtime(x))) => :time_in_experiment);

Raw Data

Read the raw data (after the anonymization)

rawdata = CSV.read(joinpath("..", "Data", "OriginalData", "Experiment1_CRawData.csv"), DataFrame, normalizenames=true);

Aggregate All the Data

data = innerjoin(rawdata, timedata, on = :participant_code);
custom_data = CSV.read(joinpath("..", "Data", "OriginalData", "Feedback_2021-08-31.csv"), DataFrame, 
    normalizenames=true, 
    truestrings = ["true", "True", "1"], 
    falsestrings = ["false", "False", "0"], 
    pool = false,
    stringtype = String,
    );
data = innerjoin(data, custom_data, on = [:participant_code,:session_code]); 

Cleaning the Data

Finishing the Experiments

Removed subjects who have not finished the experiment

Then keep only subjects who have finished the experiment, and remove the finished column as a consequence.

data = data[.!ismissing.(data[!, :participant_current_page_name]).& (data[!, :participant_current_page_name] .== "Results"), :];
select!(data, Not([:finished])); 

Selecting a subset of columns

We keep on the columns from the following relevantcolumns variable.

select!(data, Not(r"player_role$"))
select!(data, Not(r"group*"))
select!(data, Not(r"payoff*"))
select!(data, Not(r"Mechanism*"));
apps = ["Algorithms", "Beliefs", "Mechanism", "Feedback", "Questionnaire"]
models = ["player", "subsession"]
for col = names(data)
    for app = apps, model = models
        m = match(Regex("$app") * r"_(?<round>\d)_" * Regex("$model") * r"_(?<column>\w+)", string(col))
        if !(m === nothing)
            #println(m)
            if (app != "Beliefs") & (m[:column] == "round_number")
                select!(data, Not(col))
            elseif (app == "Beliefs") 
                if (m[:column] == "criteria")
                    select!(data, Not(col))
                elseif m[:column] == "belief"
                    rename!(data, col => Symbol(m[:column] * "_" * m[:round]))
                end
            else
                rename!(data, col => Symbol(m[:column]))
            end
        end
    end
end

Keeping relevant columns

relevantcolumns = [:participant_code,
    :participant_time_started_utc,
    :criteria_choice1,
    :criteria_choice2,
    :criteria_choice3,
    :criteria_choice4,
    :criteria_choice5,
    :lottery_choice1,
    :lottery_choice2,
    :lottery_choice3,
    :lottery_choice4,
    :lottery_choice5,
    :age,
    :gender,
    :employment,
    :region,
    :urn,
    :colour,
    :colour_drawn,
    :urn_winner,
    :reasons,
    :unique_id,
    :time_in_experiment,
    :time_page_1,
    :time_page_2,
    :time_page_3,
    :time_page_4,
    :time_page_5,
    :time_page_6,
    :time_page_7,
    :time_page_8,
    :time_page_9,
    :time_page_10,
    :criteria,
    :criteria_first,
    :criteria_control,
        :lottery_control,
    :criteria_choices,
    :lottery_choices,
    :arrival_code,
    :belief_1,
    :belief_2,
    :mechanism,
    :best_mechanism,
]
select!(data, relevantcolumns);

Transform Columns Types

Transform some string columns with only two possibilities into boolean columns.

# Make one of the column that should be a boolean a boolean
transform!(data, :criteria_first => (x -> Bool.(x)) => :criteria_first);

Transform the date in a proper date.

dformat = DateFormat("y-m-d H:M:S.s")
data[!, :participant_time_started_utc] = (x -> DateTime.(x[1:end-3], dformat)).(data[!, :participant_time_started_utc]);

Parsing choices into their proper formats

# Parsing the choices
data[!, :criteria_choices] = criteriachoices.(data[!, :criteria_choices]);
transform!(data, :arrival_code => ByRow(x -> arrivalcode(x)) => :arrival_code)
for i = 1:5
    transform!(data, :arrival_code => ByRow(x -> parse(Int, string(x)[i])) => Symbol("arrival_code$i"))
end
# Tranform the lottery choices into their proper Bool representation
transform!(data, :lottery_choices => ByRow(x -> Int.(split(strip(x, [']', '[']), ", ") .== repeat(["True"], 5))) => :lottery_choices);
## Assigning the beliefs to the criteria or the lottery.
data[!, :criteria_belief] = falses(size(data, 1))
data[!, :lottery_belief] = falses(size(data, 1))
data[data[!, :criteria_first], :criteria_belief] = (data[data[!, :criteria_first], :belief_1] .== 1)
data[.!data[!, :criteria_first], :criteria_belief] = (data[.!data[!, :criteria_first], :belief_2] .== 1)
data[data[!, :criteria_first], :lottery_belief] = (data[data[!, :criteria_first], :belief_2] .== 1)
data[.!data[!, :criteria_first], :lottery_belief] = (data[.!data[!, :criteria_first], :belief_1] .== 1)
select!(data, Not([:belief_1, :belief_2]));
booleancolumns = append!([:urn_winner, :lottery_control, :criteria_control], [Symbol("lottery_choice$i") for i = 1:5])
for col = booleancolumns
    data[!, col] = (data[!, col] .== 1)
end

Transform the mechanism column into a boolean. Value of 1 if RPS, 0 if Coin Toss.

data[!, :mechanism] = .!(data[!, :mechanism] .== "DC-5 Lottery");
# Create a boolean telling whether the non-lottery was believed better than the lottery or not.
data[!, :best_mechanism] = .!(data[!, :best_mechanism] .== "DC-5 Lottery");

Transform the colours of the balls in the ambiguity choice into boolean values. The colour black is transformed in 1, on red into 0.

data[!, :colour] = (data[!, :colour] .== "Black");

Consider that everyone that chose the left urn is ambiguity averse. This is a debatable assumption, but the best we can do with the available data. The difference in the number of ambiguity averse / ambiguity loving subjects is correct if ambiguity neutral subjects randonly choose between the right and left urns.

Remove then the :urn column that encodes exactly the same information.

data[!, :ambiguity_averse] = (data[!, :urn] .== "Urn Left");
select!(data, Not(:urn));
# Transforming reported gender into dummies
data[!, :female] = (data[!, :gender] .== "Female")
data[!, :male] = (data[!, :gender] .== "Male");
data[!, :other] = (data[!, :gender] .== "Other")
select!(data, Not(:gender));
# Create a variable characterizing the six different combination of treatments that are possible.
data[!, :treatment] .= "RPS Winner, No Control, Lottery, Control"
data[(data[!, :criteria] .== "Rock, Paper, Scissors") .& .!data[!, :lottery_control] .& .!data[!, :criteria_control], :treatment] .= "RPS Winner, No Control, Lottery, No Control"
data[(data[!, :criteria] .== "Time") .& data[!, :lottery_control] .& data[!, :criteria_control], :treatment] .= "Time, Control, Lottery, Control"
data[(data[!, :criteria] .== "Time") .& .!data[!, :lottery_control] .& data[!, :criteria_control], :treatment] .= "Time, Control, Lottery, No Control"
data[(data[!, :criteria] .== "Time") .& data[!, :lottery_control] .& .!data[!, :criteria_control], :treatment] .= "Time, No Control, Lottery, Control"
data[(data[!, :criteria] .== "Time") .& .!data[!, :lottery_control] .& .!data[!, :criteria_control], :treatment] .= "Time, No Control, Lottery, No Control"
data[(data[!, :criteria] .== "Guessing the Paintings") .& data[!, :lottery_control].& .!data[!, :criteria_control], :treatment] .= "Paintings, No Control, Lottery, Control"
data[(data[!, :criteria] .== "Guessing the Paintings") .& .!data[!, :lottery_control].& .!data[!, :criteria_control], :treatment] .= "Paintings, No Control, Lottery, No Control";

Assumes that most participants are from the USA. In particular, understand Georgia as being the USA state rather than the country. Stoneheaven is a city in the US.

data[!, :country] .= "USA"
for (i, region) = enumerate(data[!, :region])
    if occursin(r"ukraine"i, region)
        data[i, :country] = "Ukraine"
    elseif occursin(r"germany"i, region)
        data[i, :country] = "Germany"
    elseif occursin(r"fran"i, region)
        data[i, :country] = "France"
    elseif occursin(r"india|kolkata|tamil"i, region) 
        data[i, :country] = "India" 
    elseif occursin(r"ital[y|ia]"i, region)
        data[i, :country] = "Italy"
    elseif occursin(r"Bra[zs]il"i, region)
        data[i, :country] = "Brazil"
    elseif occursin(r"uk|united kingdom|england"i, region)
        data[i, :country] = "United Kingdom"
    elseif occursin(r"canada"i, region)
        data[i, :country] = "Canada"
    elseif occursin(r"portugal"i, region)
        data[i, :country] = "Portugal"
    elseif occursin(r"sweden"i, region)
        data[i, :country] = "Sweden"
    elseif occursin(r"spain"i, region)
        data[i, :country] = "Spain"
    elseif occursin(r"bulgaria"i, region)
        data[i, :country] = "Bulgaria"
    elseif occursin(r"Eua"i, region)
        data[i, :country] = "UAE"
    elseif occursin(r"thailand"i, region)
        data[i, :country] = "Thailand"
    elseif occursin(r"turkey"i, region)
        data[i, :country] = "Turkey"
    elseif occursin(r"netherlands"i, region)
        data[i, :country] = "The Netherlands"
    elseif occursin(r"venezuela"i, region)
        data[i, :country] = "Venezuela"
    elseif occursin(r"asian"i, region)
        data[i, :country] = "Asian"        
    elseif occursin(r"columbia"i, region)
        data[i, :country] = "Columbia"      
    end
end
select!(data, Not(:region));

Computing the Payments

include("PaymentFunctions.jl")
create_groups
data[!, :prediction_payed] = rand([:lottery, :criteria, :best_mechanism], size(data, 1))
data[!, :best_mechanism_winner] = missings(Bool, size(data, 1))
data[!, :payment] = data[!, :urn_winner] .* low_reward .+ participation_fee[2021]
for name = ["lottery", "criteria"]
    data[!, Symbol("$(name)_winner")] = missings(Bool, size(data, 1))
    data[!, Symbol("$(name)_ranks")] = zeros(Int, size(data, 1))
    data[!, Symbol("$(name)_score")] = missings(Int, size(data, 1))
    data[!, Symbol("$(name)_belief_winner")] = missings(Bool, size(data, 1))
end
# Now working only on the split data.
sepdata = groupby(data, [:criteria, :lottery_control])
for key = keys(sepdata)
    println("Criteria: ", key[:criteria], ", Criteria Control: ", sepdata[key][1, :criteria_control], ", Lottery Control: ", key[:lottery_control])
    winner(sepdata[key], x -> lotteryrank(x, dc5), "lottery")
    criteria_chosen = (mean(sepdata[key][!, :mechanism]) > 0.5)
    if criteria_chosen
        chosenmechanism = key[:criteria]
    else
        chosenmechanism = "DC-5 Lottery"
    end
    println("Mechanism chosen to attribute the reward: ", chosenmechanism)
    if key[:criteria] == "Time"
        winner(sepdata[key], arrivaltimeranks, "criteria")
    elseif key[:criteria] == "Rock, Paper, Scissors"
        winner(sepdata[key], totalrpsranks, "criteria")
    elseif key[:criteria] == "Guessing the Paintings"
        winner(sepdata[key], x -> paintingrank(x, elias), "criteria")   
    end
    
    comparativebeliefwinner(sepdata[key])
    beliefwinner(sepdata[key], "criteria")
    beliefwinner(sepdata[key], "lottery")
    for row = eachrow(sepdata[key])
        if criteria_chosen
            reward_mechanism = "criteria"
        else
            reward_mechanism = "lottery"
        end
        row[:payment] += high_reward[2021] * row[Symbol("$(reward_mechanism)_winner")] +
            low_reward * (row[:criteria_belief_winner] * (row[:prediction_payed] .== :criteria) + 
            (row[:prediction_payed] .== :best_mechanism) * row[:best_mechanism_winner] + (row[:prediction_payed] .== :lottery) * row[:lottery_belief_winner])         
      end
end
data[!, :payment] = round.(data[!, :payment], digits = 2);
Criteria: Time, Criteria Control: false, Lottery Control: true
Remaining winners to attribute: 11
Remaining subjects whose winning status has not been characterized: 14
Entering tie-breaking in for mechanism lottery
There are more winner than normally should be the case. It may be a normal behavior.
Mechanism chosen to attribute the reward: DC-5 Lottery
Remaining winners to attribute: 1
Remaining subjects whose winning status has not been characterized: 2
Entering tie-breaking in for mechanism criteria
There are more winner than normally should be the case. It may be a normal behavior.
Criteria: Guessing the Paintings, Criteria Control: false, Lottery Control: false
Remaining winners to attribute: 1
Remaining subjects whose winning status has not been characterized: 1
Mechanism chosen to attribute the reward: Guessing the Paintings
Remaining winners to attribute: 2
Remaining subjects whose winning status has not been characterized: 4
Entering tie-breaking in for mechanism criteria
Criteria: Guessing the Paintings, Criteria Control: false, Lottery Control: true
Remaining winners to attribute: 3
Remaining subjects whose winning status has not been characterized: 9
Entering tie-breaking in for mechanism lottery
There are more winner than normally should be the case. It may be a normal behavior.
Mechanism chosen to attribute the reward: DC-5 Lottery
Remaining winners to attribute: 0
Remaining subjects whose winning status has not been characterized: 0
Criteria: Time, Criteria Control: false, Lottery Control: false
Remaining winners to attribute: 0
Remaining subjects whose winning status has not been characterized: 0
Mechanism chosen to attribute the reward: DC-5 Lottery
Remaining winners to attribute: 1
Remaining subjects whose winning status has not been characterized: 1
treatments = unique(data[!, :treatment])
6-element Vector{String}:
 "Time, No Control, Lottery, Control"
 "Paintings, No Control, Lottery, No Control"
 "Paintings, No Control, Lottery, Control"
 "Time, Control, Lottery, Control"
 "Time, No Control, Lottery, No Control"
 "Time, Control, Lottery, No Control"
# Transforms the ranks in percentages in order to relate them to each other.
transform!(data, :criteria_ranks => (x -> Float64.(x)) => :criteria_ranks)
transform!(data, :lottery_ranks =>(x -> Float64.(x)) => :lottery_ranks)
for t = treatments
    data[(data[!, :treatment] .== t), :criteria_ranks] .= data[(data[!, :treatment].==t), :criteria_ranks] ./ sum(data[!, :treatment].==t)
    data[(data[!, :treatment] .== t), :lottery_ranks] .= data[(data[!, :treatment].==t), :lottery_ranks] ./ sum(data[!, :treatment].==t)
    
end

Comments Encoding

We have encoded the comments according to three dummy variables probability, preference, ad error.

  • probability means that we read in the comment that higher probabilities of winning are what drives the choices of a mechanism over another (even if the belief/understanding and subsequent choice may not reflect that).
  • preference means that we read in the comment a intrinsic preference for one or the other mechanism.
  • errors means that the comments made by the participants showed some misunderstanding of the experiment.
comments = CSV.read(joinpath("..", "Data", "OriginalData", "Experiment1_CComments.csv"), DataFrame, select = [:participant_code, :probability, :preference, :error],
    types = Dict(:probability => Bool, :preference => Bool, :error => Bool));
# Join together the data and our comments.
data = innerjoin(data, comments, on = :participant_code);
# Creating the session number.
data[!, :session] .= 3;
# Saving the Cleaned Data
data |> CSV.write(joinpath("..", "Data", "Input", "Experiment1_CCleanedData.csv"), delim = ',')
"../Data/Input/Experiment1_CCleanedData.csv"

Joining the Data

We join here the data from Experiment 1 in one file.

expe1data = CSV.read(joinpath("..", "Data", "Input", "Experiment1_ACleanedData.csv"),  DataFrame, pool = false,  stringtype=String);
select!(expe1data, Not([:paintings_order, :rps_winner]));
expe1data[!, :criteria_choices] = criteriachoices.(expe1data[!, :criteria_choices]);
transform!(expe1data, :lottery_choices => ByRow(x -> Int.(split(strip(x, [']', '[']), ", ") .== repeat(["1"], 5))) => :lottery_choices);
transform!(expe1data, :arrival_code => ByRow(x -> arrivalcode(x)) => :arrival_code);
expe2data = CSV.read(joinpath("..", "Data", "Input", "Experiment1_BCleanedData.csv"), DataFrame, pool = false,  stringtype=String);
expe2data[!, :criteria_choices] = criteriachoices.(expe2data[!, :criteria_choices]);
transform!(expe2data, :lottery_choices => ByRow(x -> Int.(split(strip(x, [']', '[']), ", ") .== repeat(["1"], 5))) => :lottery_choices);
transform!(expe2data, :arrival_code => ByRow(x -> arrivalcode(x)) => :arrival_code);
expe3data = data
expe3data[!, :prediction_payed] .= String.(expe3data[!, :prediction_payed]);
append!(expe1data, expe2data)
append!(expe1data, expe3data)
1718×67 DataFrame
1693 rows omitted
Row participant_code participant_time_started_utc criteria_choice1 criteria_choice2 criteria_choice3 criteria_choice4 criteria_choice5 lottery_choice1 lottery_choice2 lottery_choice3 lottery_choice4 lottery_choice5 age employment colour colour_drawn urn_winner reasons unique_id time_in_experiment time_page_1 time_page_2 time_page_3 time_page_4 time_page_5 time_page_6 time_page_7 time_page_8 time_page_9 time_page_10 criteria criteria_first lottery_control criteria_choices lottery_choices arrival_code mechanism best_mechanism arrival_code1 arrival_code2 arrival_code3 arrival_code4 arrival_code5 criteria_belief lottery_belief female male other ambiguity_averse treatment criteria_control country prediction_payed best_mechanism_winner payment lottery_winner lottery_ranks lottery_score lottery_belief_winner criteria_winner criteria_ranks criteria_score criteria_belief_winner probability preference error session
String DateTime Int64 Int64 Int64 Int64 Int64 Bool Bool Bool Bool Bool String String Bool String Bool String Int64 Int64? Int64 Int64? Int64? Int64 Int64 Int64 Int64 Int64 Int64? Int64? String Bool Bool Array… Array… String Bool Bool Int64 Int64 Int64 Int64 Int64 Bool Bool Bool Bool Bool Bool String Bool String String Bool Float64 Bool Float64 Int64 Bool Bool Float64 Int64? Bool Bool Bool Bool Int64
1 llknhp4v 2021-06-22T14:49:33.681 0 0 0 0 0 false false false true false 40-55 Employed false Red true It had the higher reward 1 37 3 9 2 4 3 1 2 6 2 5 Guessing the Paintings true false [0, 0, 0, 0, 0] [0, 0, 0, 1, 0] 04936 false true 0 4 9 3 6 false true false true false false Paintings, Control, Lottery, No Control true USA best_mechanism true 2.8 false 0.845361 1 false true 0.494845 3 false false false true 1
2 foskpckb 2021-06-22T14:49:34.968 2 1 3 2 2 false true false true true 25-40 Employed false Black false I chose the lottery because I feel like the odds are lower in rock paper scissors. 2 440 3 13 16 5 6 3 3 374 10 7 Rock, Paper, Scissors false false [2, 1, 3, 2, 2] [0, 1, 0, 1, 1] 04937 false false 0 4 9 3 7 true false false true false false RPS Winner, Control, Lottery, No Control true USA best_mechanism true 2.6 true 0.428571 3 false true 0.102041 28 true true false false 1
3 9n2czmea 2021-06-22T14:49:37.475 2 3 3 1 1 false true true false false 25-40 Employed true Red false I just made my good guess 3 2231 2010 67 32 17 9 5 7 39 30 15 Rock, Paper, Scissors false true [2, 3, 3, 1, 1] [0, 1, 1, 0, 0] 12307 false false 1 2 3 0 7 true true false true false false RPS Loser, Control, Lottery, Control true USA criteria true 2.6 false 0.663265 2 false true 0.132653 29 true false false false 1
4 2a5y0iri 2021-06-22T14:49:37.985 0 4 9 4 2 false true false false true 40-55 Self-employed true Black true I figured the odds might be better than a generic odd even type thing. 4 302 5 32 41 29 24 40 12 90 18 11 Time false false [0, 4, 9, 4, 2] [0, 1, 0, 0, 1] 04942 true true 0 4 9 4 2 false false true false false true Time, No Control, Lottery, No Control false USA criteria true 2.6 true 0.178571 4 false true 0.0446429 missing false true false false 1
5 a323hqlz 2021-06-22T14:49:38.540 1 2 3 3 2 false false true true false 25-40 Employed true Red false I chose it because I had to, but actually I don't think there is any difference between RPS and Lottery. Maybe it is a better choice because I put more effort choosing among the alternatives, and it's a cool game too. 5 456 5 118 16 18 35 8 12 212 14 18 Rock, Paper, Scissors true true [1, 2, 3, 3, 2] [0, 0, 1, 1, 0] 04943 true false 0 4 9 4 3 true true true false false false RPS Winner, Control, Lottery, Control true Brazil best_mechanism true 2.6 false 0.989899 0 false true 0.393939 3 true false true false 1
6 z48wazcm 2021-06-22T14:49:39.559 1 3 1 2 3 false false true false true 25-40 Other true Red false I don't know. I figured it would be about the same as rock paper scissors. 6 162 14 28 23 19 14 6 8 18 17 15 Rock, Paper, Scissors false true [1, 3, 1, 2, 3] [0, 0, 1, 0, 1] 04953 false false 0 4 9 5 3 false false true false false false RPS Winner, Control, Lottery, Control true USA lottery true 2.6 false 0.828283 2 true true 0.494949 -2 false false false false 1
7 8l8da6a1 2021-06-22T14:49:42.737 0 0 1 0 0 false false true false true 25-40 Employed true Red false LOOKING NICE PAINTINGS 7 276 56 67 12 13 18 25 15 24 28 18 Guessing the Paintings true false [0, 0, 1, 0, 0] [0, 0, 1, 0, 1] 05038 true true 0 5 0 3 8 true true true false false true Paintings, Control, Lottery, No Control true USA lottery true 2.4 false 0.752577 2 false true 0.175258 4 true false true false 1
8 3uh2dhho 2021-06-22T14:49:44.033 2 2 1 3 1 false true true false true 40-55 Employed false Red true I like to take risks. 8 253 48 28 20 12 23 9 14 46 37 16 Rock, Paper, Scissors true true [2, 2, 1, 3, 1] [0, 1, 1, 0, 1] 05032 true true 0 5 0 3 2 true true false true false true RPS Loser, Control, Lottery, Control true USA lottery true 2.6 false 0.540816 3 false true 0.234694 23 true false true false 1
9 os4p8979 2021-06-22T14:49:44.619 1 3 2 1 3 false false false true true 25-40 Employed false Red true Strategy 9 202 32 7 47 37 17 7 7 17 20 11 Rock, Paper, Scissors false false [1, 3, 2, 1, 3] [0, 0, 0, 1, 1] 05016 true false 0 5 0 1 6 true true true false false true RPS Loser, Control, Lottery, No Control true USA lottery true 2.6 false 0.879518 2 false true 0.349398 8 true false true false 1
10 efrc7fzg 2021-06-22T14:49:49.598 0 5 0 1 1 true false false true false >55 Employed true Red false It seems more of a better option. 10 455 22 7 19 5 362 4 5 13 9 9 Time true true [0, 5, 0, 1, 1] [1, 0, 0, 1, 0] 05011 false false 0 5 0 1 1 true true true false false false Time, No Control, Lottery, Control false USA lottery true 0.8 false 0.594059 2 false false 0.534653 missing false false false false 1
11 o0i9roaw 2021-06-22T14:49:52.345 2 1 3 1 1 false true true true false 40-55 Employed false Red true Like the pattern I chose 11 137 27 24 11 15 4 5 4 10 26 11 Rock, Paper, Scissors true true [2, 1, 3, 1, 1] [0, 1, 1, 1, 0] 05019 true false 0 5 0 1 9 true true false true false false RPS Loser, Control, Lottery, Control true USA criteria true 2.8 false 0.918367 1 false true 0.479592 -2 true false true false 1
12 v4iyvqzj 2021-06-22T14:49:52.712 0 1 0 0 1 true false true false true 25-40 Employed false Black false because the lottery one is totally gambling, for the painting option I assume I have a similar taste with that person 12 171 22 12 39 11 7 6 5 41 19 9 Guessing the Paintings false true [0, 1, 0, 0, 1] [1, 0, 1, 0, 1] 05014 true true 0 5 0 1 4 true true true false false true Paintings, Control, Lottery, Control true USA best_mechanism false 0.8 true 0.404494 3 true false 0.932584 1 false true true false 1
13 9pas0mld 2021-06-22T14:49:53.718 2 1 1 2 3 true true false false false 25-40 Employed false Black false I feel like there's more of a psychology behind rock paper scissors. The lottery would be random 13 308 50 25 92 16 12 27 15 31 30 10 Rock, Paper, Scissors false true [2, 1, 1, 2, 3] [1, 1, 0, 0, 0] 05043 true false 0 5 0 4 3 true true false true false true RPS Loser, Control, Lottery, Control true USA lottery false 2.6 true 0.0816327 4 true true 0.153061 27 true false true false 1
1707 yhg2ueu9 2021-08-31T15:33:22.195 1 3 3 4 4 false false true true false 25-40 Employed false Red true I would like to play 389 89 22 4 2 5 6 5 8 12 9 16 Time true false [1, 3, 3, 4, 4] [0, 0, 1, 1, 0] 13344 false true 1 3 3 4 4 true true true false false false Time, No Control, Lottery, No Control false USA criteria true 1.2 false 1.33019 0 false true 0.311321 missing true false false false 3
1708 ov72md5q 2021-08-31T15:33:22.630 1 3 3 2 6 true true true true true 25-40 Employed false Red true good 390 90 4 25 2 5 5 4 5 9 8 23 Time false true [1, 3, 3, 2, 6] [1, 1, 1, 1, 1] 13326 true true 1 3 3 2 6 false false false true false true Time, No Control, Lottery, Control false USA criteria false 2.8 true 0.395604 3 false false 1.04396 missing true false false false 3
1709 tp4he4ak 2021-08-31T15:33:23.314 4 0 6 0 7 false true false true false 25-40 Employed true Black true good 391 77 16 13 7 5 3 5 3 5 8 12 Time false true [4, 0, 6, 0, 7] [0, 1, 0, 1, 0] 13339 true false 1 3 3 3 9 true false true false false true Time, Control, Lottery, Control true USA lottery false 1.2 false 2.09302 2 true false 3.04651 missing false false false false 3
1710 2c4qhzl3 2021-08-31T15:33:26.444 1 3 3 3 0 false true false true false 25-40 Employed false Red true I would prefer the random odds personally. 392 78 3 8 13 10 13 5 4 8 10 4 Time true false [1, 3, 3, 3, 0] [0, 1, 0, 1, 0] 13329 false true 1 3 3 2 9 true true false true false true Time, Control, Lottery, No Control true USA criteria true 1.2 false 2.62857 2 false true 0.428571 missing true false true false 3
1711 e618vsnf 2021-08-31T15:33:27.734 1 3 3 3 8 true false true true false 25-40 Employed false Red true 5 393 399 11 3 20 6 249 53 6 6 29 16 Time true true [1, 3, 3, 3, 8] [1, 0, 1, 1, 0] 13338 false false 1 3 3 3 8 false false false true false false Time, No Control, Lottery, Control false USA criteria false 1.2 false 1.25275 1 true false 1.30769 missing true false false false 3
1712 plmsynfr 2021-08-31T15:33:30.625 1 3 7 2 4 false false true false true 25-40 Employed false Black false I chose randomly, because I always trust luck 394 1539 234 1248 3 3 5 3 4 20 4 15 Time true false [1, 3, 7, 2, 4] [0, 0, 1, 0, 1] 13724 true false 1 3 7 2 4 false false false true false true Time, No Control, Lottery, No Control false USA lottery true 1.0 false 1.04717 2 true true 0.235849 missing false true true false 3
1713 k0ugrb5m 2021-08-31T15:33:32.609 2 4 4 2 3 true true false true false 25-40 Employed true Red false Predictions will be quite accurate. 395 173 12 48 22 10 6 8 5 25 12 25 Time true true [2, 4, 4, 2, 3] [1, 1, 0, 1, 0] 13344 true false 1 3 3 4 4 true true false true false false Time, Control, Lottery, Control true USA lottery false 2.6 true 0.465116 3 true false 2.27907 missing false false false false 3
1714 5jw7pzz9 2021-08-31T15:33:37.134 1 3 4 0 5 false false false false false 40-55 Self-employed true Black true DC-5 is a five-digit game that features 120 ways to win so I think it the best lottery so I choose that. 396 662 28 126 166 17 100 37 13 103 54 18 Time false true [1, 3, 4, 0, 5] [0, 0, 0, 0, 0] 13405 false false 1 3 4 0 5 true false false true false false Time, No Control, Lottery, Control false USA best_mechanism true 1.2 false 1.17582 2 true false 1.15385 missing false false false false 3
1715 3ohl8ona 2021-08-31T15:33:39.808 1 3 3 4 5 false true false true true 25-40 Employed false Red true YES I INTERESTED FOR DC-5 LOTTERY. 397 138 6 70 3 4 5 2 3 19 5 21 Time false false [1, 3, 3, 4, 5] [0, 1, 0, 1, 1] 13345 false true 1 3 3 4 5 false false true false false true Time, No Control, Lottery, No Control false USA criteria true 2.6 true 0.566038 3 false true 0.122642 missing false false false false 3
1716 22f096b1 2021-08-31T15:33:42.230 1 3 4 0 0 true true true true true 25-40 Employed false Black false YES I INTERESTED 398 285 18 7 13 5 8 4 6 78 79 67 Time true true [1, 3, 4, 0, 0] [1, 1, 1, 1, 1] 13400 false true 1 3 4 0 0 false false false true false true Time, No Control, Lottery, Control false USA lottery false 2.4 true 0.395604 3 false true 0.604396 missing false false false false 3
1717 ik822x2p 2021-08-31T15:33:45.377 1 3 4 5 0 true true true true true 25-40 Employed true Black true just a feeling 399 556 65 170 88 51 56 15 12 25 52 22 Time true false [1, 3, 4, 5, 0] [1, 1, 1, 1, 1] 13450 true true 1 3 4 5 0 true false true false false true Time, No Control, Lottery, No Control false USA best_mechanism true 2.8 true 0.358491 3 false true 0.254717 missing true false false false 3
1718 zwf17moq 2021-08-31T15:33:46.505 1 3 3 5 2 true true true true true 25-40 Self-employed false Red true Yes, e-Rewards is a legitimate site. 400 133 6 10 2 4 7 4 20 55 7 18 Time false true [1, 3, 3, 5, 2] [1, 1, 1, 1, 1] 13352 true true 1 3 3 5 2 false false false true false false Time, No Control, Lottery, Control false India lottery false 2.6 true 0.395604 3 false false 1.28571 missing true false false false 3
expe1data |> CSV.write(joinpath("..", "Data", "Input", "Experiment1CleanedData.csv"), delim=",")
"../Data/Input/Experiment1CleanedData.csv"