Supplementary Online Content
Cerdá M, Wall M, Feng T, et al. Association of state recreational marijuana laws with adolescent marijuana use. JAMA Pediatr. Published online December 27, 2016. doi:10.1001/jamapediatrics.2016.3624.
eAppendix. SUDAAN code for estimated prevalence of marijuana use and perceived harmfulness in states before and after recreational marijuana legislation and difference-in-difference tests
eTable 1. Past-month frequency of marijuana use for Colorado (CO) and Washington (WA) vs states without recreational marijuana laws (RML) before and after passage of RML by grade
eTable 2. Past-month prevalence of marijuana use for Colorado (CO) and Washington (WA) vs states with medical marijuana laws (MML) only before and after passage of recreational marijuana laws (RML) by grade
eTable 3. Parallel assumption test: difference-in-difference tests of marijuana use 12 years prior to passage of recreational marijuana laws (RML), comparing 2010-2012 with 2001-2003 in states that legalized recreational marijuana use in 2012 compared with those that did not legalize marijuana by that time
This supplementary material has been provided by the authors to give readers additional information about their work.
eAppendix. SUDAAN code for estimated prevalence of marijuana use and perceived harmfulness in states before and after recreational marijuana legislation and difference-in-difference tests
Below we provide the SUDAAN code used to obtain Tables 2 and 3.
Variables:
time is a dummy variable = 0 for 2010, 2011, 2012 and =1 for 2013, 2014, 2015 RML is a 3-category variable = 1, 2, 3 where 1=Colorado, 2=Washington, 3 = Other
Data:
The data, trim8, trim10, trim12, include individual level data from students (8th, 10th, and 12th grade respectively) from years 2010-2015 except for Oregon (dropped from all analysis)
Here is the SUDAAN program:
%macro RMLtrends(inputdat, title,outcome,link);
title2 bold color=green &title;
proc &link data = &inputdat;
nest _ONE_ school;
weight _ONE_;
class time RML gender race grade par_ed class_size public pop_dens;
reflevel time=0 RML=3 ; ***this command makes pre-passage time (0) and the non- RML (3) the reference groups;
model &outcome = time RML time*RML /*individual covariates*/ age gender race par_ed /*school level covariates*/class_size public pop_dens
/*state level covariates*/ pct_nohs male_pct white_pct pct10_24;
predMARG time*RML; *****Provides estimated means of CO, WA, and non-RML by time;
pred_eff time=(-1 1)*RML=(1 0 0)/name ="year effect in CO(1)";
pred_eff time=(-1 1)*RML=(0 1 0)/name ="year effect in WA(2)";
pred_eff time=(-1 1)*RML=(0 0 1)/name ="year effect in Other(3)";
pred_eff time=(-1 1)*RML=(1 0 -1)/name ="Diff-in-Diff CO vs Other";
pred_eff time=(-1 1)*RML=(0 1 -1)/name ="Diff-in-Diff WA vs Other";
setenv linesize=132 decwidth=10 colwidth=14 pagesize=58 labwidth=12;
OUTPUT / FILENAME=predmarg_comb_&inputdat._&outcome FILETYPE=SAS pred_mrg = default REPLACE ;
OUTPUT / FILENAME=predcont_comb_&inputdat._&outcome FILETYPE=SAS PRMGCONS=default REPLACE;
run;
%mend;
*by grade;
%RMLtrends (trim8, "MJ_M 8th graders" ,mj_m, rlogist);
%RMLtrends (trim10, "MJ_M 10th graders" ,mj_m, rlogist);
%RMLtrends (trim12, "MJ_M 12th graders" ,mj_m, rlogist);
Explanation of the model specification:
The software creates dummy variables with (k-1) categories for every variable in the class statement. Since RML has 3 categories, two dummy variables are created. Denote CO=1 if the RML state is Colorado (and 0 otherwise) and WA = 1 if the RML state is WA (and 0 otherwise), then the regression equation being fit to the individual data is:
logit (pr Y) = intercept + time + CO + WA + CO*time + WA*time +
age gender race educ + class_size + public + pop_dens + pct_nohs + male_pct + white_pct + pct10_24
The model expected values for pre and post passage in the 3 groups (CO, WA, and non- RML) after fixing the covariates is then (on the logit scale):
intercept Pre passage mean in the non-RML states, intercept + time Post passage mean in the non-RML states, intercept + CO Pre-passage mean in CO
intercept + time + CO + CO*time Post-passage mean in CO intercept + WA Pre-passage mean in WA
intercept + time + WA + WA*time Post-passage mean in WA
The test for Diff-in-Diff on the logit scale is simply the test of CO*time and WA*time terms. We are performing tests of Diff-in-Diff on the prevalence (i.e. additive) scale and not on the logit scale, hence the PREDMARG command (and associated PRED_EFF) are used to back transform each of the above expected logits to the prevalence scale
marginalizing over the covariates. Then a test for trends within WA and CO and non- RML as well as the Diff-in-Diffs for WA and CO are obtained directly by forming the appropriate contrasts using the PRED_EFF command. For example, the Diff-in-Diff for WA is tested with the command:
pred_eff time=(-1 1)*RML=(0 1 -1)/name ="Diff-in-Diff WA vs Other";
which translates into:
[PM(intercept + time + WA + WA*time) – PM(intercept + WA)] – [PM(intercept + time)
– PM(intercept)]
where PM denotes predicted marginal (after back-transformation from logit scale and marginalizing over covariates).
eTable 1. Past-month frequency of marijuana use for Colorado (CO) and Washington (WA) vs states without recreational marijuana laws (RML) before and after passage of RML by grade
Pre RML (2010-2012) Post RML (2013-2015)
Grade
level Frequency State % 95% CI % 95% CI Difference Pre
to Post RML SE P-value
8
0 occasion
CO 91.2% (82.4% 95.9%) 91.3% (89.2% 93.1%) 0.1% 3.3% 0.98
WA 93.7% (91.2% 95.5%) 91.7% (89.2% 93.7%) -2.0% 1.5% 0.18
Non-
RML 92.4% (91.9% 92.9%) 93.7% (93.2% 94.1%) 1.2% 0.3% 0.00
Diff-in-Diff CO vs Non-RML -1.1% 3.3% 0.73
Diff-in-Diff WA vs Non-RML -3.2% 1.5% 0.03
1-2 occasions
CO 2.8% (1.2% 6.2%) 3.2% (2.3% 4.3%) 0.4% 1.2% 0.73
WA 3.6% (2.3% 5.6%) 4.1% (2.7% 6.1%) 0.5% 1.1% 0.66
Non-
RML 3.4% (3.1% 3.6%) 2.7% (2.5% 3.0%) -0.6% 0.2% 0.00
Diff-in-Diff CO vs Non-RML 1.0% 1.2% 0.40
Diff-in-Diff WA vs Non-RML 1.1% 1.1% 0.33
>= 3 occasions
CO 6.0% (2.7% 12.6%) 5.5% (4.2% 7.3%) -0.5% 2.4% 0.84
WA 2.7% (1.9% 3.9%) 4.2% (3.2% 5.4%) 1.5% 0.7% 0.03
Non-
RML 4.2% (3.9% 4.6%) 3.6% (3.3% 4.0%) -0.6% 0.2% 0.01
Diff-in-Diff CO vs Non-RML 0.1% 2.4% 0.97
Diff-in-Diff WA vs Non-RML 2.1% 0.7% 0.00
10
0 occasion
CO 83.0% (80.6% 85.1%) 86.5% (81.0% 90.5%) 3.5% 2.4% 0.15
WA 83.8% (81.4% 86.0%) 80.0% (76.1% 83.4%) -3.8% 1.8% 0.03
Non-
RML 82.7% (82.0% 83.5%) 83.6% (82.8% 84.4%) 0.9% 0.5% 0.07
Diff-in-Diff CO vs Non-RML 2.6% 2.5% 0.30
Diff-in-Diff WA vs Non-RML -4.8% 1.9% 0.01
1-2 occasions
CO 7.2% (6.1% 8.4%) 5.9% (3.6% 9.3%) -1.3% 1.4% 0.35
WA 6.0% (4.8% 7.6%) 6.0% (4.0% 8.9%) 0.0% 1.3% 0.98
Non-
RML 6.7% (6.3% 7.0%) 6.3% (6.0% 6.7%) -0.3% 0.2% 0.13
Pre RML (2010-2012) Post RML (2013-2015) Grade
level Frequency State % 95% CI % 95% CI Difference Pre
to Post RML SE P-value
10
Diff-in-Diff CO vs Non-RML -1.0% 1.4% 0.49
Diff-in-Diff WA vs Non-RML 0.3% 1.3% 0.82
>= 3 occasions
CO 9.8% (8.4% 11.5%) 7.7% (5.8% 10.1%) -2.2% 1.1% 0.05
WA 10.1% (8.3% 12.3%) 14.0% (11.1% 17.5%) 3.9% 1.7% 0.02
Non-
RML 10.6% (10.1% 11.2%) 10.0% (9.5% 10.6%) -0.6% 0.4% 0.11
Diff-in-Diff CO vs Non-RML -1.6% 1.2% 0.17
Diff-in-Diff WA vs Non-RML 4.5% 1.7% 0.01
12
12
0 occasion
CO 72.6% (66.8% 77.8%) 74.6% (70.9% 77.9%) 2.0% 2.9% 0.51
WA 78.8% (74.4% 82.5%) 78.1% (73.9% 81.8%) -0.7% 2.6% 0.80
Non-
RML 77.7% (76.8% 78.6%) 77.9% (77.0% 78.8%) 0.2% 0.6% 0.78
Diff-in-Diff CO vs Non-RML 1.8% 3.0% 0.55
Diff-in-Diff WA vs Non-RML -0.8% 2.7% 0.76
1-2 occasions
CO 9.3% (7.8% 11.0%) 10.5% (9.1% 12.1%) 1.2% 0.8% 0.14
WA 7.8% (5.9% 10.2%) 10.0% (8.0% 12.5%) 2.2% 1.4% 0.12
Non-
RML 7.7% (7.3% 8.1%) 7.5% (7.2% 7.9%) -0.2% 0.3% 0.50
Diff-in-Diff CO vs Non-RML 1.4% 0.9% 0.11
Diff-in-Diff WA vs Non-RML 2.4% 1.4% 0.10
>= 3 occasions
CO 18.1% (13.6% 23.8%) 14.9% (12.1% 18.2%) -3.2% 2.8% 0.26
WA 13.4% (10.3% 17.3%) 11.9% (8.3% 16.7%) -1.6% 2.6% 0.56
Non-
RML 14.6% (13.9% 15.2%) 14.6% (13.9% 15.3%) 0.0% 0.5% 0.99
Diff-in-Diff CO vs Non-RML -3.2% 2.9% 0.26
Diff-in-Diff WA vs Non-RML -1.6% 2.7% 0.56
eTable 2. Past-month prevalence of marijuana use for Colorado (CO) and Washington (WA) vs states with medical marijuana laws (MML) only before and after passage of recreational marijuana laws (RML) by grade
Pre RML (2010-2012) Post RML (2013-2015) Grade level
% used in past month
95% CI % used in
past month 95% CI Difference Pre to
Post RML S.E. P-value
8
CO 8.9% (4.2% 17.7%) 8.8% (7.0% 11.1%) -0.01% 3.3% 0.9971
WA 6.2% (4.4% 8.7%) 8.2% (6.3% 10.7%) 2.0% 1.4% 0.1607
Other
MML 7.8% (7.0% 8.7%) 6.2% (5.5% 6.9%) -1.6% 0.5% 0.0007
Diff-in-Diff CO vs Other MML 1.6% 3.3% 0.6206
Diff-in-Diff WA vs Other MML 3.6% 1.5% 0.0154
10
CO 17.4% (15.1% 20.0%) 13.8% (9.6% 19.3%) -3.6% 2.5% 0.1360
WA 16.5% (14.3% 19.0%) 20.6% (17.2% 24.5%) 4.1% 1.8% 0.0221
Other
MML 18.2% (17.1% 19.4%) 16.5% (15.2% 17.8%) -1.7% 0.8% 0.0346
Diff-in-Diff CO vs Other MML -1.9% 2.6% 0.4643
Diff-in-Diff WA vs Other MML
5.8% 2.0% 0.0030
12
CO 27.6% (22.3% 33.6%) 25.6% (22.3% 29.2%) -2.0% 3.0% 0.4998
WA 21.3% (17.5% 25.7%) 21.8% (18.1% 26.1%) 0.5% 2.7% 0.8436
Other
MML 25.1% (23.7% 26.6%) 24.5% (23.1% 26.0%) -0.6% 0.9% 0.4940
Diff-in-Diff CO vs Other MML -1.4% 3.1% 0.6598
Diff-in-Diff WA vs Other MML 1.1% 2.9% 0.6815
eTable 3. Parallel assumption test: difference-in-difference tests of marijuana use 12 years prior to passage of
recreational marijuana laws (RML), comparing 2010-2012 with 2001-2003 in states that legalized recreational marijuana use in 2012 compared with those that did not legalize marijuana by that time
Grade Effect Difference
estimate SE T value P value
8
2010-2012 vs. 2001-2003 in CO 0.01 0.03 0.41 0.68
2010-2012 vs. 2001-2003 in WA 0.00 0.03 -0.13 0.89
2010-2012 vs. 2001-2003 in Non-RML States -0.01 0.00 -1.37 0.17
Diff-in-Diff 2010-2012 vs. 2001-2003, CO vs Non-RML States 0.02 0.03 0.58 0.56 Diff-in-Diff 2010-2012 vs. 2001-2003, WA vs Non-RML States 0.00 0.03 0.08 0.94
10
2010-2012 vs. 2001-2003 in CO 0.03 0.08 0.41 0.68
2010-2012 vs. 2001-2003 in WA -0.06 0.03 -2.35 0.02
2010-2012 vs. 2001-2003 in Non-RML States 0.00 0.01 -0.41 0.68
Diff-in-Diff 2010-2012 vs. 2001-2003, CO vs Non-RML States 0.03 0.08 0.44 0.66 Diff-in-Diff 2010-2012 vs. 2001-2003, WA vs Non-RML States -0.06 0.03 -2.23 0.03
12
2010-2012 vs. 2001-2003 in CO -0.05 0.04 -1.14 0.26
2010-2012 vs. 2001-2003 in WA -0.05 0.04 -1.21 0.23
2010-2012 vs. 2001-2003 in Non-RML States 0.00 0.01 -0.10 0.92
Diff-in-Diff 2010-2012 vs. 2001-2003, CO vs Non-RML States -0.05 0.04 -1.11 0.27 Diff-in-Diff 2010-2012 vs. 2001-2003, WA vs Non-RML States -0.05 0.04 -1.17 0.24