Significance How does the legislation passed by governments influence citizens’ attitudes? We take advantage of the staggered manner in which same-sex marriage legalization occurred in the United States to examine this question with regard to antigay bias. By geolocating approximately 1 million respondents as they completed measures of bias over a 12-y window, we tested whether the local legalization of same-sex marriage was associated with changes in citizens’ implicit and explicit biases. While antigay bias had been decreasing over time, following local same-sex marriage legalization antigay bias decreased at roughly double the rate, indicating that government legislation can inform attitudes even on religiously and politically entrenched positions. These results have important implications for those interested in intergroup bias, norms, and how policy shapes attitudes.

Abstract The current research tested whether the passing of government legislation, signaling the prevailing attitudes of the local majority, was associated with changes in citizens’ attitudes. Specifically, with ∼1 million responses over a 12-y window, we tested whether state-by-state same-sex marriage legislation was associated with decreases in antigay implicit and explicit bias. Results across five operationalizations consistently provide support for this possibility. Both implicit and explicit bias were decreasing before same-sex marriage legalization, but decreased at a sharper rate following legalization. Moderating this effect was whether states passed legislation locally. Although states passing legislation experienced a greater decrease in bias following legislation, states that never passed legislation demonstrated increased antigay bias following federal legalization. Our work highlights how government legislation can inform individuals’ attitudes, even when these attitudes may be deeply entrenched and socially and politically volatile.

Social norms can exert a strong influence on attitudes and behaviors (1, 2). People often modify their views and actions to align with the perceived norms in their environment (3). Norms are not necessarily explicit and often must be inferred (4). People tend to infer and reinforce social norms through social interaction (5, 6). Given the implied nature of social norms, the attitudes and behaviors deemed acceptable are prone to change over time. Even when an individual personally disagrees with a normatively accepted behavior, they may uphold it through cognitive dissonance (7). Specifically, to the extent that one consistently modifies their behavior to be congruent with perceived norms (8, 9), personal attitudes, including prejudice toward social groups (10), might change over time as well. The current research focuses on local government’s role in signaling such norms. Specifically, we examine whether the local changes to government policy supportive of a marginalized social group informed the biases of citizens toward that group.

There are multiple reasons why legislation passed by a democratic government might be perceived as a norm. The literal translation of democracy is the “rule of the people,” and theoretically a democracy is a system of government in which elected representatives create laws aligning with the interests of the majority of the population. Realistically, while the way in which legislation is formed is far more complex, people within a democratic system may generally perceive laws to reflect the will of the people. Consequently, they may interpret enacted legislation as consistent with the values and beliefs of the majority. Consistent with this view, people do infer that policies enacted by a group reflect the group’s approval, even if the policy was not enacted by a majority opinion (11). Therefore, enacted legislation might be perceived as a strong signal of current local norms. Should any legislation impact the outcomes of specific social groups, this legislation might be perceived as reflecting prevailing societal attitudes toward those groups more broadly. Indeed, individuals update their perceptions of social norms over time based on environmental cues (12). Similarly, from local legislation, individuals can learn to what extent they may be in the majority or minority, and therefore how acceptable it is to express any attitudes regarding those social groups.

The opportunities to examine the impact of government policy on attitudes toward marginalized social groups are very rare, yet there is some evidence that government policy can change attitudes. For example, there was a 60% increase in support for interracial marriages following legalization in 1978 (13), a change various scholars have partially attributed to the Supreme Court’s verdict (14, 15). In more recent history, following the 2016 United States presidential election of Donald Trump, participants reported an increase in the acceptability of prejudice toward stigmatized groups (16). Furthermore, experimental work is supportive of these conclusions, finding that consensus information causes changes in participants’ attitudes (17, 18).

Same-sex marriage legalization is a unique phenomenon providing an opportunity to study the relationship between local legislation and citizens’ attitudes. This is because, while the US Supreme Court adjudicated that the right to marry was fundamental and inalienable (19) on June 26th of 2015, 35 states and Washington, DC, had passed state-level same-sex marriage legalization in some form before this date at different times over the previous 11 y. This pattern of legalization over time provides a natural, quasi-experimental, multiple group, interrupted time series, with staggered treatments across groups (states), a design that mitigates many of the threats to causal conclusions typically associated with observational data (20⇓–22).

The evidence regarding whether government legislation has an impact on citizens’ attitudes is mixed. Although institutions can successfully change personal attitudes surrounding political or social issues under given conditions (17, 23), attitudes about contentious issues involving personal experiences, or strong religious and political views are less malleable (24, 25). Therefore, attitudes regarding same-sex marriage legalization and sexuality issues in general may be less likely to change. There has been only limited previous research, with mixed conclusions, on the impact of same-sex marriage legalization on personal attitudes. For example, researchers found increased support for same-sex marriage legalization following legalization, but only among some demographic groups, and their data were from Iowa only (26). Others found warmer attitudes toward gay men and lesbians following legalization, although the panel data were limited to three states (27). In contrast, researchers examining nationally representative two-wave panel data found that residents of states in which same-sex marriage legalization policies were introduced had the greatest reduction of explicit antigay biases, but these data were collected before state-level legalization for a majority of legalizing states and before national legalization (27). Recent research focusing on the 1-y time period around federal legalization found no attitude change toward gay people following legalization, but it did find changes in the perceptions of social norms (18).

We extend from this work in several key ways. First, we analyze the attitudes of ∼500,000–1 million people, depending on the analysis, whereas the largest samples collected previously were around 1,000 participants. Second, attitudes toward gay people were collected over a 12-y period, compared with 1- to 2-y windows of prior research, providing a wider lens with which to capture continuity or change in social attitudes over time. Most importantly, the current work uniquely explores attitudes assessed with methods other than self-reports that are less susceptible to social desirability (28).

We focus on how state-level same-sex marriage legalization changed implicit and explicit antigay bias over time. Bias can be measured relatively directly (i.e., explicitly) or indirectly (i.e., implicitly). Biases measured explicitly are thought to reflect relatively deliberate and conscious mental processes, often predicting intentional judgments and behaviors, whereas implicit biases have traditionally been conceptualized as reflecting less intentional or controlled processes (29, 30) that can influence judgments and behaviors outside of conscious awareness. All previous research examining changes in attitudes toward gay people as a result of same-sex marriage legalization has measured attitudes via explicit responses (e.g., “How warmly or coldly do you feel toward gay men and lesbians?”). These previous results may have been at least partially due to respondents’ reluctance to report attitudes at odds with perceived norms. To conclude that changing governmental legislation can inform peoples’ actual attitudes, it is critical to examine those attitudes with measures that are less susceptible to social desirability than explicit self-reported attitudes. The use of implicit measures to assess bias address this issue, because they measure bias indirectly from the speed or accuracy with which a response is made, rather than from the contents of the response itself (31, 32). The current research addresses this concern by examining both implicit and explicit antigay biases over time.

Current Research We did so by geolocating ∼1 million respondents when they completed implicit and explicit measures of antigay bias at Project Implicit (Fig. 1). Since 2002, Project Implicit has operated a website that people can visit to complete an implicit association test (IAT), one measure of implicit bias (33). The vast majority of prejudice research has focused on individuals, but by geolocating the millions of responses at Project Implicit, researchers have very recently begun examining associations between various outcomes and regional trends in prejudice (34⇓⇓⇓–38). Here, we examine changing regional implicit and explicit antigay biases over time, comparing these trends before and after local state-level legalization of same-sex marriage in each state. Fig. 1. State-level antigay implicit and explicit bias, averaged across all responses between 2005 and 2016. Consistent with the research finding that norms influence personal attitudes and vice versa (2, 5, 7), evidence in support of our hypothesis would be obtained if implicit and explicit antigay bias diminished following state-level legalization. In other words, we hypothesized that government legislation would contribute to changes in the attitudes of those locally impacted by the policies. Our inferences were allowed by the manner in which state-level same-sex marriage legalization occurred in the United States. Legalization occurred in a natural, quasi-experimental, multiple group, interrupted time series with staggered treatments across groups (i.e., states). Because we have a large number of observations of bias pre- and post legalization, and because the treatment (i.e., same-sex marriage legalization) happened over a 12-y period to a broad sample of different states in a staggered manner, it is unlikely an unmeasured variable is systematically explaining reductions in bias (20⇓–22). Given that the data are observational, this design is not definitive proof of causality. Nonetheless, it does allow for stronger conclusions regarding whether same-sex marriage legalization caused the decreases in antigay implicit and explicit bias. We tested our hypotheses in a multilevel regression model, in which Project Implicit respondents (n = ∼1 million) were clustered within states and Washington, DC (k = 51). In separate models, implicit and explicit antigay biases were regressed on our primary variables of interest (i.e., time and whether the date was pre- vs. post same-sex marriage legalization) and demographic covariates. At the respondent level, all models controlled for gender, age, and racial majority-minority status. At the state level, all models controlled for average employment rate, education, income, and population density. Conclusions were identical when examining zero-order correlations. We believe our first model to be the strongest test of our hypothesis, restricting analyses to those who self-identified as heterosexual. However, we performed a number of additional analyses on variants of this dataset to ensure our conclusions were not a result of subjective researcher decisions made throughout the analytic pipeline. Model 2 included participants of all sexualities, to confirm our initial results were not due to the sexuality of our sample. Using a self-identifying heterosexual sample, model 3 addressed the generalizability of our conclusions by replicating results with a nationally representative American National Election Studies (ANES) dataset. Model 4 compared changes in bias following same-sex marriage legalization in states that passed laws locally to those in which same-sex marriage was legalized only following federal legalization. In sum, we adopted a “multiverse” approach (39), examining how robust our effects were to unavoidable subjective researcher decisions made in the course of analyses. We examine the influence of same-sex marriage legalization on both implicit and explicit bias in separate models throughout. Consistency across all analyses is stronger evidence in support of our conclusions.

Results Model 1: Heterosexual Only. Our primary hypothesis was tested by examining whether the relationship between time and antigay bias varied depending on whether it was before or after state-level same-sex marriage legalization. In other words, did the within-state trend of antigay bias over time change following gay-marriage legalization? Model 1 was implemented on Dataset 1 (https://osf.io/prcd8/) (40), restricted to self-reported heterosexuals. First examining implicit bias, consistent with our hypotheses, a Year × Legalization interaction emerged (B = −0.0025, SE = 0.0003, P < 0.001). Simple slopes revealed that, while bias was decreasing over time before legalization (B = −0.0062, SE = 0.0003, P < 0.001), this decrease doubled in magnitude following legalization (B = −0.0111, SE = 0.0006, P < 0.001) (Fig. 2). Fig. 2. Contour plots of implicit bias over time before (Left) and after (Right) legalization of same-sex marriage, across all states, showing the decreasing trend in implicit bias over time post legalization. Because there are several hundred thousand data points, contour plots used as data are too high density to visualize with scatterplots. Higher density values (brighter colors) represent more observed data points in that region of the figure. An identical pattern was present with explicit bias. A Year × Legalization interaction (B = −0.0053, SE = 0.0016, P < 0.001) indicated that, while bias was decreasing over time before legalization (B = −0.0915, SE = 0.0016, P < 0.001), this decrease was sharper following legalization (B = −0.1022, SE = 0.0029, P < 0.001). See SI Appendix, Table S1 A and B, for full models. Therefore, both implicit and explicit bias showed steeper declines over time following same-sex marriage legalization. The full model explained 4.29% of the total variance in implicit bias, and 3.27% of the within-state variance. Our effects of interest uniquely explained 1% of the within-state variance beyond demographic covariates. The full explicit model explained 8.79% of the total variance in explicit bias and 6.46% of the within-state variance. Legalization uniquely explained 1.67% of the within-state variance beyond demographic covariates. One concern threatening the validity of our conclusions is that Project Implicit respondents following legalization might be a different population from that visiting the site before legalization. We examined this possibility with the demographic data available, comparing respondents pre- and post legalization on age and gender breakdown. Project Implicit respondents before (M = 24.56, SD = 10.64) vs. after legalization (M = 25.06, SD = 11.13) on average were 6 mo older [t(632,413) = 20.70, P < 0.001]. Furthermore, 2% more of the respondents self-identified as female following legalization [t(38,810) = 13.12, P < 0.001]. These comparisons are significant due to our high statistical power, but small and not particularly meaningful (for more information, see Model 3: Replication with a Nationally Representative Dataset). We interpret these differences as unlikely to be responsible for the observed changes in bias over time and consider the populations pre- and post legalization to be functionally the same age and gender percentage. Model 2: Unreported Sexuality. Model 2 was identical to model 1 but performed on Dataset 2 (https://osf.io/prcd8/) (40), which relaxed the restriction that respondents self-identified as heterosexual, and therefore was 11% larger (n = 765,425). Repeating our primary analyses in this dataset provided identical conclusions. For implicit bias, a Year × Legalization interaction was present (B = −0.0046, SE = 0.0003, P < 0.001). Again, bias decreased more sharply over time following legalization relative to prior conditions. The pattern was identical when examining explicit bias. The effect size was slightly larger, with effects of interest explaining 1 and 2.2% of the within-state variance for implicit and explicit bias, respectively. See SI Appendix, Table S2 A and B, for full models. Model 3: Replication with a Nationally Representative Dataset. A major threat to the conclusions of the above analyses are that the subpopulation visiting Project Implicit is not representative of the US population and thus that any change in Project Implicit respondents’ biases cannot be generalized. To address this concern, we turned to a publically available, nationally representative survey sample, the ANES dataset (https://electionstudies.org/data-center/). The ANES gathers information on public opinions and political participation during every presidential election cycle and is representative of the both spatial and temporal demographics of the United States. Ideal for our purposes, the ANES surveys contained an explicit thermometer item similar to that of Project Implicit, regarding the extent to which participants felt warmth toward gay men and lesbians, with a score between 0 (cold) and 100 (warm). Critically, these data were collected across all 50 states and Washington, DC, before, during, and after same-sex marriage legalization. Therefore, we could test a model identical to models 1 and 2 reported above, examining whether antigay biases decreased at a greater rate following same-sex marriage legalization, but with a dataset weighted to be representative. It is noteworthy that state-level antigay biases from the Project Implicit and ANES data were highly correlated [r = 0.75, P < 0.001, 95% CI (0.60, 0.85)], indicating that, despite sampling differences, the antigay bias captured by Project Implicit was highly correlated with a nationally representative estimate of explicit bias. Most importantly, we repeated model 1 with the ANES data across the three most recent time points corresponding with the passing of same-sex marriage legislation: 2008, 2012, and 2016. Identical to models 1 and 2, a Year × Legalization interaction was present (B = 1.1142, SE = 0.3943, P = 0.005). Unlike the Project Implicit data that indicated prelegalization bias was declining slowly, simple slopes indicated that prelegalization warmth toward gay men and lesbians was stable over time (B = 0.1466, SE = 1.5062, P = 0.813). However, consistent with Project Implicit data and our hypotheses, warmth toward gay men and lesbians increased over time after legalization (B = 2.3750, SE = 0.6107, P < 0.001). See SI Appendix, Table S3, for the full model. Because the ANES is a US representative sample, these results provide evidence that our conclusions generalize beyond Project Implicit respondents. Model 4: State- vs. Federal-Level Legalization. Although models 1–3 revealed that antigay prejudice was, on average, decreasing at a sharper rate across all US states following same-sex marriage legalization, it is possible that this broad effect is concealing important moderators. For example, we have hypothesized that local norms influence individuals’ attitudes. While 35 states and Washington, DC, passed same-sex marriage legalization before federal legalization, 15 states did not. Therefore, any norms signaled by federal legalization would not be local within-state and may have different implications for local antigay attitudes. To test this possibility, we coded states for whether legalization was first passed at the state or federal level and included a Year × Legalization × State–Federal interaction testing whether the Year × Legalization effects reported above varied by whether legislation was passed at the state or federal level. For implicit bias, this three-way interaction was significant (B = 0.0088, SE = 0.0016, P < 0.001), indicating that the pattern of change in bias over time depended on whether same-sex marriage legalization happened as a result of local (i.e., state) or federal law. Before legalization, antigay bias was decreasing both in states that ultimately passed same-sex marriage legislation (B = −0.0051, SE = 0.0004, P < 0.001) and in those that did not (B = −0.0077, SE = 0.0005, P < 0.001). For the states passing same-sex marriage at the state level, the demonstrated pattern was identical to that evident in models 1–3 (Fig. 3). Bias decreased at roughly double the rate over time following legalization (B = −0.0112, SE = 0.0006, P < 0.001). In sharp contrast, for the 15 states that did not pass same-sex marriage legalization locally, antigay bias increased over time following legalization (B = 0.0215, SE = 0.0065, P < 0.001). An identical pattern was present with explicit bias. Effects of interest explained 1 and 4.4% of the within-state variance for implicit and explicit bias, respectively. See SI Appendix, Table S4, A and B, for full models. [Model 4 could not be replicated with the ANES dataset as the measurement over time was at a lower resolution (i.e., data were collected only around the presidential election in 2008, 2012, and 2016), which did not capture differences between states passing legalization at the state vs. federal level.] These results, while exploratory, suggest that the locality of legislation may be an important moderator in influencing the biases of local residents. We return to this issue in greater detail in Discussion. Fig. 3. The trends in implicit and explicit antigay bias over time, comparing the trend before and after same-sex marriage legalization in states that passed same-sex marriage legalization locally compared with states that did not pass same-sex marriage legalization locally. The dates of these trends vary across different states, so they have been plotted on the same panels for purposes of comparison.

Discussion We find consistent evidence in support of the hypothesis that local government legislation informs changes in citizens’ attitudes. Consistent with previous research (41), we find that both implicit and explicit antigay bias was decreasing or stable over time before same-sex marriage legalization. However, following the passing of legislation perceived as supportive of this marginalized population, on average, antigay bias declined at a steeper rate. This conclusion converges with previous research finding that citizens of states passing state-level legislation had the greatest decrease in antigay attitudes (27). Evidence is consistent across five different operationalizations and data from two distinct sources. The limited “multiverse” approach (39) that we pursued helps ensure that these conclusions are robust to unavoidable subjective researcher decisions. The manner in which same-sex marriage legalization naturally unfolded across the United States, as a multiple-group, time-staggered quasi-experimental design, mitigates many of the threats to causal conclusions typically associated with observational data (20⇓–22). Results indicate that attitudes and legislation may be mutually reinforcing. More specifically, because results generally indicate that attitudes toward the gay community were improving in all states before legalization (although see Model 3: Replication with a Nationally Representative Dataset), evolving attitudes toward same-sex marriage may have served as impetus and momentum for both state and federal legalization. These enacted legislations in turn strengthened and consolidated favorable attitudes toward lesbians and gay men. Importantly, we find identical effects among both implicit and explicit measures of bias. The limited previous research on whether same-sex marriage legislation was associated with changes in attitudes used self-reported measures that were susceptible to concerns regarding social desirability (28), especially so given the politically sensitive and controversial nature of the topic. That a similar pattern is evident among implicit measures, which are less susceptible to conscious control and social desirability, is important evidence supporting that government legislation is associated with true changes in the attitudes of its citizens. Traditionally, implicit and explicit biases at the individual-level have been treated as weakly positively correlated but distinct phenomena (42), yet throughout all analyses here results were identical across both, and the correlation between the two constructs was surprisingly high (r = 0.88, P < 0.001). Determining how regional biases may differ from individual-level biases is beyond the scope of the present research, but future work might examine this discrepancy to better understand regional biases. Here, examining both implicit and explicit biases revealed identical conclusions. A critical moderator of this effect appears to be whether same-sex marriage legalization was passed locally or at the federal level. In states that did not pass same-sex marriage legalization locally, we find a reactive or “backlash” effect (27) such that federal legalization was associated with increased antigay bias over time, despite the decreasing trend in bias in these states before federal legalization. The specific factors driving this effect cannot be addressed by the present data. One possibility is that, even though attitudes were improving, a tipping point of local support had not yet been reached for the majority to accept the federal ruling. Research at the individual level suggests that the attention given the federal decision may have sharpened some respondents’ sense of symbolic threat to their lifestyle and values (43), and this sense of threat could have exacerbated antigay biases among those individuals. Most of the 15 states that did not pass state legislation are those with generally stronger and more traditional social norms (44⇓–46). These increasingly positive attitudes in some states and increasingly negative attitudes in others indicate that the federal legalization of same-sex marriage may have prompted national group polarization on attitudes toward gay people. We have proposed that legislation signals majority norms, and this polarized result highlights the potential importance of the perceived locality of that norm. Should legislation be perceived as imposed upon the local culture, a backlash effect might be expected. The analyses marshalled above provide tentative evidence that more localized policies may be more strongly associated with attitude change, perhaps because the norm is perceived as stronger and arising from a more local population. One limitation of the present work concerns the representativeness of Project Implicit respondents. In general, these respondents are unlikely to be representative of the North American population, and indeed, our comparisons in the present research reveal they are younger and more likely to be female. And yet a growing body of literature using this sample finds that it is predictive of meaningful population-level behaviors. Thus far, these include outcomes such as being killed by police (36), mortality rates from cardiovascular disease (37, 38), segregation (35), and Google searches for racial slurs (35). These results collectively indicate that Project Implicit is tapping meaningful variation in the population, but the generalizability of these results was a concern. Accordingly, a strength of the present research is finding an identical pattern of results in a representative sample, the ANES dataset. That we find that antigay bias declines at a sharper rate following same-sex marriage legalization in a representative sample strongly buttresses the conclusions of the present research. Furthermore, it should be noted that the effects of same-sex marriage legalization reported here are modest in size, with models explaining between 1 and 5% of the within-state variance. In the field, smaller or similar effect sizes have been considered meaningful across diverse domains, including a baseball player’s batting skill on their likelihood of getting a hit (R2 = 0.0033) (47) or the daily use of aspirin on heart attacks (R2 = 0.0011) (48). As others have pointed out, these seemingly small effect sizes may be societally meaningful when scaled across entire populations (49). See SI Appendix for more detailed contextualization of our effect sizes. The broad conclusion of the present research—that representative governments can contribute to and/or intensify change in the attitudes of citizens by passing legislation—has important implications. For example, research reviewing the effectiveness of bias interventions found limited effects, and no effect that persisted beyond several days (50). However, the current results suggest that perceived norms may evoke more persistent change. Additionally, we examine attitudes toward a sexual minority, which previous research has found to be particularly entrenched (24, 25), and the current results therefore provide a strong test of our hypotheses. In this case, attitudes toward minority groups became more positive, although government signaling of norms might increase prejudice as well. For example, recent research using a different theoretical lens has found increased xenophobic attitudes following Trump’s election (16), which might be interpreted as signaling support of such attitudes. Furthermore, results might be extended toward other more malleable attitudes not involving social categories, such as toward littering or marijuana use. In addition, the amount of publicity any legislation receives may moderate these effects (51). For example, should legislation pass with little media attention or fanfare, the possibility that this legislation represents the attitudes of the majority will be less salient to citizens. Subsequently, the norm-based model of legislation changing attitudes would predict little change in citizens’ attitudes. Finally, as government legislation may only be perceived as signaling “the will of the people” in representative governments, effects may be limited to such governing styles (i.e., not extending to citizens’ of autocratic governments). In summary, our results evince that state and federal legalization was associated with changes in antigay bias, providing important evidence supporting the idea that government legislation can cause changes in the attitudes of its citizens regarding minority groups.

Materials and Methods Source of Data. Antigay bias. Measures of implicit and explicit antigay prejudice were obtained from Project Implicit (33). Implicit bias was represented by the IAT d score (52) from an IAT task requiring participants to respond to social targets (e.g., Gay, Straight) and attributes (e.g., Good, Bad) simultaneously by timed keyboard input. Explicit bias was calculated from thermometer items. Participants had reported how warm they felt toward straight men, straight women, gay men, and lesbians on a 0 (coldest feelings) to 10 (warmest feelings) scale. Ratings of heterosexuals were averaged, and ratings of gay men and lesbians were averaged. Consistent with previous research (36⇓–38), explicit bias was represented by the difference between rated warmth toward heterosexuals and gay people. Greater positive values for both implicit and explicit biases thus reflected more positive attitudes toward heterosexuals relative to the gay community. Legalization. Same-sex marriage legalization date was defined as the date on which state-level institutions passed legalization locally. The earliest available data in the Project Implicit antigay dataset was 2005, after Vermont and Massachusetts had already passed forms of same-sex marriage legalization. All data from these states were coded as post legalization. California initially enacted same-sex legislation in 2008, but it was subsequently blocked 5 mo later. In 2010, legislation was again enacted legalizing same-sex marriage. Thus, implicit and explicit responses from California were coded as post state legalization if they were performed on or after the 2010 date to be as conservative as possible. (See SI Appendix for analyses examining changes in California specifically.) In some states (e.g., Utah, Colorado, Oklahoma), we defined same-sex marriage legalization as the date on which legislation defining marriage as “between woman and man” was ruled unconstitutional by state courts. Time-varying covariates. A number of demographic variables were included as controls. These variables varied by year. Employment was represented by 5-y estimates of state-employment rates reported by the 2005–2016 American Community Survey (53). Education was represented by the percentage of state residents with a BA or equivalent degree (53). Population density was computed based on 2000 and 2010 census data (53). Socioeconomic status was represented for by 5-y estimates of mean household income (53). Datasets. A number of different datasets with different exclusion criteria were created for different analyses. The antigay bias dataset had 949,664 respondents, completed between 2005 and 2016. Across all datasets, participants (M age = 24.72, SD = 10.8; 60% female, 32% male, 8% undisclosed) were included only if they were US-based, had state-level geographic information included and either implicit or explicit data, and gender, age, and racial majority/minority status reported. All reported effects are robust to inclusion of participant-level covariates, as models fully replicate when not included. In Dataset 1 (https://osf.io/prcd8/), analyses were restricted to participants who had self-identified as heterosexual, resulting in a sample of n = 680,376. In Dataset 2 (https://osf.io/prcd8/) we relaxed this assumption, including both gay respondents and those who had not answered this question, resulting in a sample of n = 765,425. ANES data. Commencing in 1948, the ANES has gathered information on public opinions and political participation. We limited our analyses to the time-series cumulative dataset (n = 10,870; M age = 49.11, SD = 17.2; 52.6% female, 47.1% male, 0.3% undisclosed) from 2008, 2012, and 2016, corresponding with the Project Implicit data. All ANES models were identical to Project Implicit models with the exception of racial majority or minority status. Models were weighted with the sample weight from online sampling only (“VCF0011y” in the ANES data), as it uniquely included Alaska and Hawaii. See https://electionstudies.org/ for more information on sampling methodology. Analytic Approach. Results were analyzed in a multilevel framework using lme4 (54) in the R environment, with respondents nested within states and Washington, DC (k = 51). States were selected as the clustering unit since same-sex marriage legislation was passed at the state level. State-level variables were grand-mean–centered. Degrees of freedom, test statistics, and P values were derived from Satterthwaite approximations in the lmerTest R package (55). Models included random intercepts and fixed slopes. Intraclass correlation coefficients across all three datasets consistently revealed that ∼3–4% of the variance was between states for implicit bias and that 1–5% of the variance was between states for explicit bias. The vast majority of variance was within-state. Model-explained variance was calculated using the formulas laid out by Rights and Sterba (56).

Footnotes Author contributions: E.K.O., M.K.C., J.M.C., and E.H. designed research; E.K.O., M.K.C., and E.H. performed research; E.K.O. and E.H. analyzed data; and E.K.O., M.K.C., J.M.C., and E.H. wrote the paper.

The authors declare no conflict of interest.

This article is a PNAS Direct Submission.

Data deposition: Datasets 1 and 2 have been deposited in the Open Science Framework, https://osf.io/prcd8/.

This article contains supporting information online at www.pnas.org/lookup/suppl/doi:10.1073/pnas.1806000116/-/DCSupplemental.