We need to pre-process all relevant variables to be binary
representations for the funnel analysis. For each variable, TRUE means
the participant passed that stage of the quiz, and FALSE means they did
not.
In order variables
We create two new variables, greeting_coded_funnel and
pre_consent_coded_funnel, which are binary versions of greeting_coded
and pre_consent_coded, respectively. Particpants passed each stage if
the respective value is “Proceeded” and did not pass if the value is
“Dropped off”.
data$greeting_coded_funnel <- data$greeting_coded == "Proceeded"
data$pre_consent_coded_funnel <- data$pre_consent_coded == "Proceeded"
summary_table(data$greeting_coded_funnel, "Greeting Funnel", "Greeting", "Count")
Greeting Funnel
|
Greeting
|
Count
|
|
FALSE
|
4908
|
|
TRUE
|
41988
|
|
NA
|
36
|
summary_table(data$pre_consent_coded_funnel, "Pre-consent Funnel", "Pre-consent", "Count")
Pre-consent Funnel
|
Pre-consent
|
Count
|
|
FALSE
|
17801
|
|
TRUE
|
29095
|
|
NA
|
36
|
We create a new variable, consent_coded_funnel, which is a binary
version of consent_coded. Participants only pass this stage if
consent_coded_num is 1. This means the participants stated exactly “I
consent, start now.”
data$consent_coded_funnel <- data$consent_coded_num == 1
summary_table(data$consent_coded_funnel, "Consent Funnel", "Consent", "Count")
Consent Funnel
|
Consent
|
Count
|
|
FALSE
|
4026
|
|
TRUE
|
18688
|
|
NA
|
24218
|
The series of funnel variables below are set to TRUE if their
respective cleaned variables have any value and FALSE if they are
NA.
data$country_charity_coded_funnel <- !is.na(data$country_charity_coded)
data$main_cause_coded_funnel <- !is.na(data$main_cause_coded)
data$sub_cause_coded_funnel <- !is.na(data$sub_cause_coded)
data$charity_name_coded_funnel <- !is.na(data$charity_name_coded)
#data$treatment_FR_RF_coded_funnel <- !is.na(data$treatment_RF_coded) + !is.na(data$treatment_FR_coded)
data$manipulation_order_coded_funnel <- !is.na(data$manipulation_order_coded)
summary_table(data$country_charity_coded_funnel, "Country Charity Funnel", "Country Charity", "Count")
Country Charity Funnel
|
Country Charity
|
Count
|
|
FALSE
|
29298
|
|
TRUE
|
17634
|
summary_table(data$main_cause_coded_funnel, "Main Cause Funnel", "Main Cause", "Count")
Main Cause Funnel
|
Main Cause
|
Count
|
|
FALSE
|
29806
|
|
TRUE
|
17126
|
summary_table(data$sub_cause_coded_funnel, "Sub Cause Funnel", "Sub Cause", "Count")
Sub Cause Funnel
|
Sub Cause
|
Count
|
|
FALSE
|
30272
|
|
TRUE
|
16660
|
summary_table(data$charity_name_coded_funnel, "Charity Name Funnel", "Charity Name", "Count")
Charity Name Funnel
|
Charity Name
|
Count
|
|
FALSE
|
30306
|
|
TRUE
|
16626
|
#summary_table(data$treatment_FR_RF_coded_funnel, "Free Response Funnel", "Free Response", "Count")
summary_table(data$manipulation_order_coded_funnel, "Manipulation Order Funnel", "Manipulation Order", "Count")
Manipulation Order Funnel
|
Manipulation Order
|
Count
|
|
FALSE
|
38628
|
|
TRUE
|
8304
|
The funnel variables below are set to TRUE if their respective
cleaned variables have any value other than an empty string.
data$donor_type_coded_funnel <- !(data$donor_type_coded == "")
data$arm_coded_funnel <- !(data$arm_coded == "")
summary_table(data$donor_type_coded_funnel, "Donor Type Funnel", "Donor Type", "Count")
Donor Type Funnel
|
Donor Type
|
Count
|
|
FALSE
|
30866
|
|
TRUE
|
16064
|
|
NA
|
2
|
summary_table(data$arm_coded_funnel, "Treatment Arm Funnel", "Treatment Arm", "Count")
Treatment Arm Funnel
|
Treatment Arm
|
Count
|
|
FALSE
|
36089
|
|
TRUE
|
10807
|
|
NA
|
36
|
Manipulation variables
We now create funnel variables for the manipulation variables. Since
the manipulation questions are asked in one of two orders, we create two
funnel variables for each manipulation value.
data$manipulation_value_coded_1_funnel <- !is.na(data$manipulation_value_coded) & data$manipulation_order_coded == 1
data$donate_today_coded_1_funnel <- !is.na(data$donate_today_coded) & data$manipulation_order_coded == 1
data$manipulation_value_coded_2_funnel <- !is.na(data$manipulation_value_coded) & data$manipulation_order_coded == 2
data$donate_today_coded_2_funnel <- !is.na(data$donate_today_coded) & data$manipulation_order_coded == 2
summary_table(data$manipulation_value_coded_1_funnel, "Manipulation Value 1 Funnel", "Manipulation Value 1", "Count")
Manipulation Value 1 Funnel
|
Manipulation Value 1
|
Count
|
|
FALSE
|
43133
|
|
TRUE
|
3799
|
summary_table(data$manipulation_value_coded_2_funnel, "Manipulation Value 2 Funnel", "Manipulation Value 2", "Count")
Manipulation Value 2 Funnel
|
Manipulation Value 2
|
Count
|
|
FALSE
|
44271
|
|
TRUE
|
2661
|
summary_table(data$donate_today_coded_1_funnel, "Donate Today 1 Funnel", "Donate Today 1", "Count")
Donate Today 1 Funnel
|
Donate Today 1
|
Count
|
|
FALSE
|
43295
|
|
TRUE
|
3635
|
|
NA
|
2
|
summary_table(data$donate_today_coded_2_funnel, "Donate Today 2 Funnel", "Donate Today 2", "Count")
Donate Today 2 Funnel
|
Donate Today 2
|
Count
|
|
FALSE
|
42988
|
|
TRUE
|
3942
|
|
NA
|
2
|