Home > Articles

This chapter is from the book

11.2 Estimating the Causal Effect of Gaining a Badge

Let’s say we create a badge for snowmobile enthusiasts who reach 50 points in the first day. Snowmobile enthusiasts can achieve a badge for doing a myriad of things like reviewing snowmobile products, completing their user profile, and signing up for our newsletter. There is no clear way of finding your points as a new user. You’re given the badge if you reach 50 points on the first day. Otherwise, you do not receive the badge.

We want to find the effect on retention of gaining a snowmobile “enthusiast” badge. The “enthusiast” badge has a nice design and can be added to a user’s profile page or flair when reviewing. It can affect how users feel about themselves and how other users view them. The hypothesis is that gaining this enthusiast badge leads to greater user retention in our product.

We decided to test this with an RD design. To ensure the validity of this design, we need to address the following issues:

  1. Does this design meet the requirements of a RD design (i.e., cut point in treatment variable, hypothetical randomness)? Check.

  2. Figure out how large a group we need or is sufficient for the treatment and control.

  3. Create a model to estimate the y-value from either direction at the limit.

  4. Check selection on other variables.

The data has five variables: user_retention (days), score at end of first day, profile_description_length (characters), user_friends (count), and viewed_pages. Note that all the variables, except user days, are all defined at the end of the first day.

In Figure 11.1, user score is plotted against user days in product, which is our core retention metric. The cut point is at 50, as discussed earlier. In this case, it’s not particularly visually clear that there is an effect at the cut point. There does seem to be a difference in the estimates from the linear model as we get closer to the cut point. As we discussed, RD is only defined in the limit, so the closer we get to the cut point, the better the design. This graph is implemented in R in Listing 16.3.

FIGURE 11.1

FIGURE 11.1 RD plot of the enthusiast badge example.

11.2.1 Comparing Models

In this section, we’ll apply three models (really six models, since we need to apply the model from both sides) to the data to try to estimate the “causal” effect of gaining a badge on user days in product. The three models are plotted in Figure 11.2. We implement this in R in Listing 16.3 in Chapter 16.

FIGURE 11.2

FIGURE 11.2 RD plot of the three models from the left and right side of the cut point.

First, we plot our data with user score on the x-axis and user days on the y-axis. Our outcome variable is user days. We need to estimate the user days, given a score of 50, using the data from both the right and the left.

The first model is an OLS model. We estimate the “causal” effect by estimating two regression models from the right and left sides at the cut point and subtracting the difference of the right model from the left model. The right model estimate at 50 minus the left model estimate at 50 is our LATE. Note that these models have only one x variable; that is, we’re not including any confounders. (Listings 16.2 and 16.3 go through graphing and RD models in R.)

The second modeling type is a quadratic model. We will fit a quadratic model to the right and left sides. For reference, the quadratic fit is based on the quadratic equation, y = ax2 + bx + c.

Finally, we’ll apply a localized regression model or a LOESS (locally estimated polynomial smoothing) model. LOESS is a localized estimator, meaning that we estimate using values within a small range (i.e., the bandwidth), rather than using the full data set as with the normal linear regression. We also weight the points closest more highly, compared to those located farther away. The modeler must set the bandwidth, which is the fraction of the data used to build the model. LOESS, then, fits a low-degree polynomial, generally either linear or quadratic, locally. If you’re interested in a more technical explanation of these methods, check out Hastie et al.’s (2009) The Elements of Statistical Learning.

Generally, LOESS or some type of localized model will provide better estimates, since it’s defined close to the cut point, compared to models over the full range for RD. Be wary of just modeling noise at the cut point as well. In cases of a low number of observations or very high outlier observations, this can radically drive up or down estimates at the cut point.

We find that the three models have different estimates of the LATE. We get the LATE by subtracting the left-hand model at x = 50 from the right-hand model estimate at x = 500 (Table 11.1). To see how this is estimated in R, see Listing 16.3.

Table 11.1 RD-Estimated LATE for OLS, Quadratic, and LOESS Models

 

Left Estimate 50

Right Estimate 50

LATE Estimate

OLS model

4.46 user days

5.44 user days

0.98 user day

Quadratic model

5.07 user days

6.72 user days

1.65 user days

Loess model

5.17 user days

5.75 user days

0.58 user day

The OLS model has a LATE estimate of 1 user day increase in retention. The quadratic model LATE shows an increase of 1.65 user days, and the LOESS model LATE estimate is an increase of 0.6 user day. Since the LOESS model is estimating the effect close to the cut point and the LOESS graph looks like it’s adequately fitting the data, we would be inclined to use the LOESS estimates of effect. From this example, you can see the variation of effect size by model is large—a full user day, which could be larger than the actual effect.

Estimating LATE in RD designs can be difficult in case of small sample sizes and clumpiness around the cut point. It’s best to use methods defined as close to the break point as possible.

11.2.2 Checking for Selection in Confounding Variables

We cannot assume that this “causal” effect is real until we check for similar patterns in confounder variables. We can overlay confounders with those who progressed and those who did not, and check for selection at the cut point. We create the graph in Figure 11.3 in R in Chapter 16, Listing 16.4.

FIGURE 11.3

FIGURE 11.3 Confounder variables (user friends and length of profile).

In Figure 11.3, we can see that there is selection at the cut point in our confounder, length of profile, because there is a huge jump in our estimates at the cut point. Assuming we have completed our profile before we “gain” the badge, this means we are selecting users who have longer profiles and that “getting the badge” is, in fact, not random at the cut point. This would invalidate our design. Basically, users with longer profile descriptions also seem to have a discontinuity with game score. The discontinuity in this graph means that there is selection of users based on other variables into the enthusiasts’ badge.

We can also overlay this plot and see selection with user friends: There is clumpiness of user friends on the left side compared to very few user friends on the right side. Thus, users with more friends are getting the badge, so once again there is nonrandom selection at the cut point.

An alternative hypothesis for the treatment effect could be that users with friends are more engaged in the product and likely to be retained longer, such that the enthusiast badge has no causal effect. At this point, we cannot differentiate between our original hypothesis and this alternative.

We might be able to drop all users with friends and see if this discontinuity at the cut point persists. If it does not, then we could try to estimate the effects on just that subpopulation. In this case, this approach is unlikely to work, as there seems to be a jump in the profile length variable as well.

Here are some tips when working through an RD design to improve “believability” of the results:

  • Compare a variety of models and sizes of treatment and control group. What’s the right model and the right sizes of groups? No one knows, and the best choices are data-specific. We can compare different types of models and group sizes and see how robust our results are. If we get the same effect sizes with different types of models and treatment and control group sizes, then the effect size is likely to be correct. In such a case, we need to check that it’s not being driven by selection.

  • Check all potential confounder variables. It is essential to check all confounding variables. If there is at least one confounding variable, the design becomes much harder to believe. We might be able to create a model with the confounder included (if it’s relatively unimportant). In the regression example, for instance, we could add the confounder as the covariate. However, do not be lulled into a false sense of security. This could signal a much larger problem:

    • Selection at the cut point might actually signify core problems with the randomness assumption. Many RD designs do have confounding at the cut point on many variables because randomness does not exist. For instance, a popular RD design was to look at the effect of winning elections on policy outcomes. It was theorized that close elections were random. However, there was selection on key variables such as campaign donations and incumbency, meaning that candidates who had more money were more likely to get 50.0001% of the vote than 49.9999% of the vote. It could be impossible to control for campaign donations and incumbency advantage, and those two factors could be the driving force behind all policy outcomes you are looking at as an outcome variable. The close election example in majoritarian elections in the United States fails for this reason.

    • No coverage might signal a lack of support in the data, which means you’ll have to look for a smaller subpopulation to consider. Lack of support means that selection is occurring at the cut point, leaving no users of a certain type in the control group and creating an unrepresentative or unbalanced treatment group. For instance, in our earlier example, perhaps users with friends are all progressing. A practitioner might even want to try statistical matching (described in Chapter 12) over RD. RD sometimes buries the selection issues because many practitioners do not adequately explore all the potential confounders and that step is not mandatory for carrying out the design. In many RD designs, there are confounding variables.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020