We've got a bunch of brand new faces today, so I'll introduce myself and then we can do
a round of introductions.
So my name is Keegan.
I've been in the cannabis space since the beginning of 2018.
Started as a laboratory analyst at a lab that tests for cannabis.
Then I started developing software and then I decided, you know what, it's time to just
help everybody in the cannabis industry.
So I started CanLinux to principally help laboratories, but really anyone who needs
help with data.
Now I would love to hear about what your interests are and what brings you to the group and what
you may hope to learn.
So I'll just start in my top left corner.
Jerry, would you be interested in introducing yourself to the group?
Sure.
I'm a marketing communications and data analytics consultant.
Just finished a very big project and don't have anything to do.
So I want to do something, you know, get involved in doing an analytics project just to keep
my hand in the game.
And I saw the meetup and I said, wow, yeah, maybe I should do something with cannabis.
And new and growing industry is probably something very interesting.
Awesome to have you, Jerry.
You're in the right place for certain.
Yeah, I hope so.
You are.
You said, would you be interested in introducing yourself to the group?
Hey, everyone.
My name is Youssef.
Actually, I work right now as a cloud solution consultant.
And I discovered the meetup yesterday and told myself, why not try to meet people eager
to learn like me, because I'm doing I'm trying to learn data science on the side on myself
on my own.
So yeah, it's a great opportunity to meet like minded people and ask for help and advice.
Awesome.
Great place to learn data science.
Patrick, would you be interested in introducing yourself, please?
Yeah, sure.
Thanks.
My name is Patrick Callahan in Wilmington, Delaware.
It's 20 minutes outside of Philadelphia.
And we have some clients in the cannabis space and we're a data science and analytics company.
I compass read.
Sorry.
Awesome.
Delaware is on the agenda for today.
So in fact, we're going to be talking about each and every state.
So stay tuned.
It's going to be an exciting day.
Michelle, would you be interested in introducing yourself?
Hello.
Like some people said, I saw the meetup and I was like, this is a yes for me.
There's a couple of companies that I follow to get information on a couple of doctors
who have companies in other states who have been practicing medicinal use of marijuana
for like a decade.
So I'm basically just trying to get as much exposure as I can.
I started my own cannabis coaching company last year to help people and teach people
how to microdose cannabis for ADHD, anxiety, depression.
I'm autistic, so it helps with that.
Also, trauma, yada, yada, yada.
And I created my own dosing system and it's an oral delivery and very easy to dose.
It's not by milligrams, it's by ounces.
So it's by volume.
But anyway, it's helping people be able to microdose it without having to deal with being
like affected and stuff.
So I'm filling in gaps with science in this way also.
Awesome.
Your expertise is going to come in real handy in some future meetups.
So we're going to be diving a lot into the production and consumption of cannabis here
in 2022.
So today we'll be wrapping up a sales forecast.
So in future meetups, as well as today, your expertise will be valuable.
Happy to help.
Awesome.
My board changed a little bit here, but Devon, would you be interested in introducing yourself?
Hi.
Yes, just working on my camera now.
Devon Moftano.
I'm working in Wilmington, Delaware at Compass Red.
Awesome.
Raul, would you be interested in introducing yourself, please?
Yes.
Hi.
Good morning.
My name is Raul Infante.
I am a medical marijuana patient in Connecticut, and I am also a grower as Connecticut.
Ever since October, we've been able to grow our own cannabis.
I have volunteered and I have been an employee at multiple hemp farms ever since the year
2019, helping them with the harvest and helping them with the seeding and with the taking
care of the plant through vegetation stage.
I got a few grows under my belt, even though the patient program just started in October.
I've got a few grows.
I've been growing since about 2017 in Massachusetts with my cousin for himself.
I've shown and helped him how to grow.
Right now, I am currently the head intern at a farm in Danbury called Seymourone Farmstead,
S-E-A-M-A-R-R-O-N Farmstead.
We will be growing hemp this upcoming spring season.
That's just a little bit of background of where I'm coming from.
I'll be starting horticulture classes in June in one of our local community colleges here
in Southern Connecticut.
That's just a little bit of background.
I'm a father.
I have a four-year-old.
Yeah, things are pretty high energy at my crib, at the house.
Thank you for having me and I appreciate you very much.
Thank you for joining us.
Love to have your expertise as well.
We have a lot of data scientists.
Sorry, I didn't mean to interrupt, sir.
I'm probably just going to have you in my ear because I'm at work right now and I just
wanted to be a part of it.
Definitely.
You can listen in and then watch the recording later.
Always happy to have your expertise too because it's so important to hear from the producers
and processors and retailers and everybody in the industry.
Really interested about the Northeast because I don't know as much about the industry.
What part of the country are you in?
California, sir?
What's your name?
Well, Kenlytics is based out of Olympia, Washington.
Right now I'm visiting family in North Carolina.
So worked with people all over the country, worked with a couple of people in Massachusetts,
but I only know a cursory amount.
So always happy to learn myself.
Yeah, me too.
Always.
Me too.
What's your name, sir?
What can I call you?
Kenlytics.
What was that?
Exactly.
And I got into this space helping out laboratories and my background's in data science.
So just trying to combine the two.
What's your name?
Megan.
Megan?
Yes.
Megan?
All right, Megan.
Nice to meet you, sir.
Good to meet you, Ronald.
I'll be I'm gonna be on mute.
All right.
Okay.
Thank you.
David, would you be introduced?
I need to think of something else to say.
David, would you mind introducing yourself?
Sure.
So hello, everybody from Denver.
So I work for the state of Colorado in marijuana enforcement division, and I am a data scientist.
So I'm happy to be here.
Awesome to have you here, especially from the state of Colorado.
So love that you're joining.
So hopefully you can feel free to share and then maybe you could learn a thing or two.
So it's awesome to have you.
So we're just here to learn from each other.
Thanks.
Awesome.
So got four other people here.
There's Kelvin, it looks like.
Would you mind introducing yourself?
Okay, let's see.
Okay, we may come back to you, Kelvin.
Matthew, would you mind introducing yourself?
Yes, absolutely.
So I'm a software developer.
I'm actually one of the people also.
Looks like we're about half the group here, which is kind of cool.
But yeah, just this is kind of a unique meetup.
And so we wanted to be here since we heard about it.
So thanks for putting this on.
I appreciate it.
Thanks for joining.
And I always say to everybody, there's a shortage of data scientists and software developers.
So your value you can bring will go a long way.
Thank you.
So we've got Michelle.
Let's see.
Ben, would you be introduced?
Would you like to introduce yourself?
Yeah.
Hi.
Also from the Compass Red team here in Philadelphia, data analysts and product developer.
On the team, like was mentioned, we have some clients in the cannabis space.
Our team primarily works in R and R Shiny, as well as all of the dashboarding applications
under the sun.
The focus of my work has primarily been in data visualization in the R world as well
as D3.
So happy to be here.
Awesome to have you.
And we've had a lot of people who've worked with R in the past, and I always think it's
just a programming languages are a tool, a means to an end.
So I do a lot of work in Python.
So I've got a bit of code to show you today in Python.
However, it'd be awesome if you were ambitious enough to rewrite it in R. So that would go
a long way too.
All right.
I may have butchered the pronunciation of that.
Would you mind introducing yourself if you would like?
OK.
So like D or Kelvin, you're welcome to speak up at any point if you want to introduce yourself.
You don't have to.
So options always there on the team.
All right.
Well, for those of you who are new to the group, I don't really like to steal the show.
It just ends up happening.
It is a meet up here after all.
But long story short, I usually prepare a script and a short presentation just to sort
of give the group a direction.
And then usually that takes around 30 minutes or so.
And then have a 15 minute or so discussion at the end.
However, we've got a huge group today.
So if you want to chime in at any point, just start talking up.
And we can start a dialogue at any point.
But without further ado, I'll just go ahead and share my screen just so you can follow
along.
So for those of you who are new, everything's available on GitHub.
So you can check out all the work we've done in 2021.
And then I try to give more than 20 minutes.
But I try to get the script for the day uploaded beforehand so that way you can follow along.
And then just put together just a short presentation just to start talking about the subject for
the day.
And so last week, we started talking about, OK, what is data science and where did it
come from?
And I said, OK, it's a mixture of statistics and computer science.
And my background is in economics.
So I like to splash in a little bit of economics.
But really, it just picks from a lot of different fields.
So I did a little research.
And it looks like, OK, data science has been around 40 plus years now.
So we've got Peter Noir, who didn't like the term computer science.
And he thought it would be better called data science.
So that's interesting.
And then you've got CF Jeff Wu, who is an engineering statistician at the Georgia Institute
for Technology.
And he was the first one to use data science as an alternative name for statistics.
So just a little bit of history.
It's always kind of interesting to know where these things came about from.
Latonya Sweeney, she was the chief technologist at the Federal Trade Commission, I believe.
For a period.
And I believe she's currently a Harvard professor.
So she's probably forgotten more than I know.
And she's just an expert here.
And so she said, OK, there's three trends to watch for in data science.
One, we're just going to be collecting more data.
Two, the data is going to be getting more granular, to the point where it's sort of
like collected if you can.
The data is getting so granular.
And there's so much of it that we've now reached what some are calling the data deluge, which
is there's just, I like to call it a fire hose of data.
So think of a fire hydrant that's bust a cap, and it's just spraying out data.
And so first things first, you have to wrangle it.
And then collect it.
And then think about what you're going to do with it.
So essentially, you need to design your data.
And you need to collect it.
Then you can't forget about analyzing your data.
So there's a little bit of data science for today.
And now what we're all here for is about the cannabis industry.
So as a good Bayesian, I thought I would ask some of you what your priors may be.
So here are three topics that we'll be talking about today.
And we can make forecasts and check our forecasts.
But before we begin, does anybody have any expectations of what states may permit medicine
or adult use in 2022?
And what you may expect sales to be in, say, New York or just in the US in general?
Anyone?
Feel free to...
I'll speak on New York.
I'm in Brooklyn.
Yes.
I'm from Western New York.
So I'm just in this area in general.
And it obviously recently became legal here.
I've seen some head shops go up and come down really quickly, like block by block.
There was so many.
But you needed a card.
So now that you don't need a card, it's a little different.
But every single deli here sells in some form.
Like liquid, like there's beverages.
You can literally get it on every single corner.
And it's not like weed for sale here.
It's like we have this, but we call it this.
But you can literally buy weed from any single deli that sells it.
And then there's the other things.
I don't know if people have heard of like kratom and all the other plants that are alternatives
to marijuana.
So there's a lot of that going on.
So I feel like for me, it's really chaotic.
And it's not something I pay too much attention to because my focus is more...
My target is...
I also have a marketing background and I'm a hairstylist of 22 years.
So I have a chemistry brain in that field.
But my target is mostly middle-aged women, two or three kids deep, or stoners.
There's like no in between.
But for me here, it's very chaotic because there's a lot of dealers here that are half
legal and half not legal.
So they'll do events out in the streets and they won't need any permits because they can
just go before they get in trouble.
But everyone loves it and nobody cares.
Cops don't care about it.
It's just a very bizarre vibe.
So I can't even answer any of these questions because it still feels like chaos.
And I feel like it's going to be like that here, at least in New York City for a while,
like years.
Yes.
I'm also wondering in New York State, just passed a deadline for individual municipalities
to opt in or opt out for allowing retail sales and consumption venues for recreational marijuana.
And I don't know the results on that yet.
That would be interesting.
I know my...
I live in a village within a town.
The village voted yes.
The town voted no.
They voted to opt out.
So talking about chaos.
Then there's also the question, I had a client a while ago who makes non-consumable hemp
products.
He has a cannabis farm up here.
So I'm just wondering how that relates because there are so many products that you can get
from hemp that are not psychotropic.
Is that the right word?
I think so.
Yes.
Well, after listening to you two, I may have to update my priors.
That's real informative.
So it's going to be interesting to see...
Let's just make sure this...
It's going to be interesting to see, one, if the gray market in New York becomes legalized,
by the end of 2022.
And then as far as the towns or locales opting out, from the research I've done, the demand
for cannabis appears to be fairly inelastic.
So that would suggest that people will just drive to the next town over and just bear
the cost.
But only so many people will do that.
And it still may curtail consumption a little bit.
So that may curtail sales to a certain extent.
Hard to say.
Awesome predictions.
So for me, my Bayesian prior was, I'm not certain...
Just to be honest, I'm not certain New York was going to get online in 2022.
But after hearing from you two, it sounds like maybe the ball is moving a bit quicker
than I anticipated there.
And then for the US sales, I just had really no idea what a good prior would be.
So not the best prior, but basically if I had to give one, I would say between like
15 and 60 billion.
But we'll get to that in just one second.
But some states to look out for.
So just want to let you know that I got this from the Cannabis Business Times.
They published an article recently, 15 states that could legalize in 2022.
And here they are.
There could be some wild cards that just come that you don't expect.
That's happened before.
But these are the ones that they said to watch out for.
So of course, states like New York, they've already permitted adult use.
We're just waiting for the rollout similar in New Jersey and so on and so forth.
But just starting from the top, Delaware, Oklahoma, Mississippi, Maryland.
I think maybe one of the more likely ones.
Same for Oklahoma.
I would, Oklahoma has such a permissible market that it's essentially already adult use.
You still technically have to be a patient.
So I wouldn't be surprised if they formally allow adult use in Oklahoma.
Ohio, things are trying to move along there with signatures.
Same with Wyoming.
There's efforts in Pennsylvania.
Rhode Island looks like another one that I would say is a bit more likely.
So I think they're waiting on a special session there.
But basically, a lot of trying to think about Rhode Island's geography.
But you've got states nearby that are all allowing adult use.
So right in that northeast, you've got Massachusetts.
Connecticut is moving the ball forward, if not already has.
Then of course, New York and New Jersey.
So I think that'll put pressure on Rhode Island.
And so I wouldn't be surprised if it moves quickly.
Nebraska may allow medicinal.
Arkansas is working on adult use, or advocates are working on it.
Florida, people are trying to get adult use onto the 2022 ballot.
Same for Missouri.
Just going to allow some people in.
In all of the newcomers, I'll try to give you a chance to introduce yourselves
and talk here at the end.
North Carolina, I was surprised about this.
But there's some efforts there for medicinal cannabis.
But moving quite slowly, that would be expected.
And then South Dakota, an interesting one.
They're trying to get adult use on the 2022 ballot.
And Idaho.
Idaho is an interesting one because you've
got some neighbors like Washington and Oregon
who have had adult use cannabis for a long time now.
And so Idaho is thinking about getting medicinal.
So these are some states that are coming along.
And the reason why these matter is I saw CNBC put out a forecast for,
they beat me to it.
So they put out a forecast for 2022.
And so as a Bayesian, I have to incorporate this into my prior.
So I would have liked to had it made my forecast before seeing this.
But oh, well, I saw these numbers.
So CNBC is predicting total sales in the US
is going to be $31 billion, up 28%.
And that large growth is probably going
to be from potentially new states coming online or things
quickening in certain states.
And they're estimating, it was hard to tell from the audio clip,
but it sounded like they were estimating New York
to hit $4 billion in 2022.
Personally, I don't know how realistic that would be,
but never rule anything out.
So New York is a big populous state.
So it may be possible.
Question, comment?
New York is eager to make money off of it for sure.
So it doesn't surprise me the speed at which they
think it's going to grow, because especially here
in New York City, one of the other things that I was going to say
was there's a lot of fraud here.
So when CBD became a thing, and you
could get that at every deli, then there
was a realization about how much of that product
was just being sold willy nilly, and it's not right.
So I feel like the same thing is going
to happen with cannabis, especially with carts
and stuff like that.
So I think that New York doesn't care.
They're just interested in the revenue.
So the faster everything can roll out.
So maybe that's why the prediction is so large.
You think?
Yes, and like you said, it sounds like people are already
set up.
So the infrastructure may be in place.
So once they permit it, it could go quickly.
And I've said this in prior meetups,
but I'd like to say states, there's always
an opportunity choice.
When you choose to do something or not to do something,
there's an opportunity cost.
And so what I basically am saying is like, hey, states,
if you're not permitting this, then like you said,
there is this, it's not even gray,
it's a black market going on that you're not taxing.
And so the tax revenue could potentially
go to socially beneficial things.
I always use the example of building schools
because you can put a price tag on that,
and you can say, OK, how many schools can we build?
And I say, OK, that's your opportunity cost.
You can either let a lot of money.
So we've been doing the math, and it's
hundreds of millions, if not billions of dollars flow
into the hands of who knows who.
Or you could build dozens of new schools.
So the choice is yours.
But now you know my perspective.
But anywho, so those are the sales predictions for 2022.
And what I always tell people here in the Meetup group
is always take numbers on these data points at face value.
So CNBC has put forward their prediction, 31 billion,
4 billion.
But it would be nice to see, OK, what
was their underlying data?
What was their forecasting model?
How did they come to these conclusions?
What assumptions did they make along the way?
And so that's what we do here at the Cannabis Data Science
Meetup group.
We're going to do an open source forecast.
So open source, open data.
So that way, all of you can check it.
We can all improve it.
And then we can apply the whole open source mentality,
where we can improve upon each other.
So what I'm putting forth is not even a good.
It's just it's in a crude initial draft of a forecast.
But I always like to say something, a forecast,
any forecast is better than no forecast.
You can debate that, but that's my opinion.
So without further ado, let's build a forecasting model
here.
And so I always like to give a shout out to John Sylvia
and Azair Iqbal.
They were two professors of mine at UNC Charlotte.
And they wrote a book, Economic and Business Forecasting.
I just keep this with me at all times.
This is a really simple, easy to read book
that is a great foundation for forecasting.
So just would highly recommend this book.
And so long story short, for long term forecasting,
which is 2022, that's a whole year ahead.
So we've done eight theoretical models
for short term forecasts, which are useful for,
which are incredibly good for month ahead,
three month ahead forecasts.
But once you get beyond three months or so,
we're looking at a year here.
And you want a bit more of a structural model
that can capture some economic relationships.
At the same time, they recommend keep it sophisticatedly simple.
So it shouldn't be too technical or complex.
And it shouldn't ignore economic theory.
So you basically want something simple,
but still incorporates economic theory.
So not too complicated, but not too simple
in ignoring economics.
And then reading a good book here,
and John Maynard Keynes is known for a different quote
about the long run.
But I thought this quote was a bit more optimistic.
So in the long run, almost anything is possible.
So I thought this ties in today because we're talking
about states coming online.
So if we're just using an eight theoretical approach,
it's going to be hard to forecast
these states coming online.
So that's just a bit of background.
Here's the actual model.
So essentially, this is super simple, probably too simple,
probably more economic variables can be included.
In their book, Sylvia and Iqbal say
they're using forecasting models with hundreds of variables.
So this has five.
So we could probably add more variables here
to get this more complex.
But you got to start somewhere.
So these were variables that we have.
And we can forecast them into the future pretty well.
So what are we saying here?
I'm basically saying, OK, sales is a function of population.
The more people you have in the state, the higher demand is,
the higher sales are going to be.
Whether or not the state has adult use or not,
just empirically, we've seen that states that
have enacted adult use see their sales increase.
So there must be something going on there,
perhaps on the supply side.
Well, actually, I mean, that's both a supply and a demand
side variable.
Then a couple more things that I was going to include
were the months that this date has permitted medicinal.
And I was thinking this would factor in learning
by doing.
So as you were talking about in New York,
New York's built up the infrastructure
to be able to roll out adult use fairly quickly.
So I was thinking the months that it's had medicinal
may factor into the amount of sales.
Similarly, the months that the state has had adult use.
So for example, Oklahoma and Nevada,
and probably more, were states that enacted adult use,
but the market couldn't quite, the supply
couldn't meet up with the demand right out of the gates.
So cannabis takes some time to grow.
So you need some months to go by for the supply to build up.
Plus, we would expect in the long term,
costs are going to be coming down.
People are going to be inventing new technologies.
So this is sort of an abstract way to cover that.
And then I just tossed in a month dummy variable
just to control for a bit of seasonality.
And not every month is the same.
So without further ado, let's go ahead and estimate
this model here.
So I'm going to just be using Python,
but I always think the data is more
interesting than the software.
So this is just a means to an end.
So for example, if you're going to write this in R,
it should be possible.
So this is just Python.
So just going to read in a handful of useful packages,
just to name a few.
Matplotlib for plotting, Pandas for data wrangling,
stats models for doing statistics,
GrabPopulation from the Federal Reserve, FedFred.
So those are some useful ones, and the rest
are just sort of software manipulation.
Just going to define a couple of handy functions.
So this function will just get data from the Federal Reserve
whenever we need population data.
And then this is just a little helper function,
just to find the months elapsed.
And then just going to read in the API key
and format the plots.
OK, as I said, the data is more interesting than the software.
So let's look at some of this data here.
So in prior weeks, we've just primarily
been working with Excel workbooks,
just because it's pretty simple to create an Excel workbook
and look at it.
But all these software developers and data scientists
probably are already familiar.
This is JSON, so JavaScript Object Notation.
And it's just another way of displaying data.
And it's quite handy, because you can do nested data.
So I love JSON.
So I think it really helps to think about these objects.
So I'd like to use the analogy of a duck or ducks.
So these are all states.
So say you've got a group of ducklings.
You've got a whole bunch of ducklings.
But each duck, each duckling, is going
to have different properties.
So these are all our states here.
And we can keep track of different properties
for all the different states.
And what I've done is basically just indicated, OK,
are the states permitting medicinal or adult use?
And then when was medicinal permitted?
And when was adult use permitted?
And this is easier said than done.
So this is where I say this can be improved upon.
So I would actually highly recommend you do this,
because I did this really quickly.
And I still need to go back over and double check everything.
But check out the source, because so for example,
this just says, oh, California permitted medicinal in 1996.
Well, we're going to have to hit the history books and newspapers
and find out what month in 1996.
And when the actual stores were opened.
So I'm trying to set these dates when the actual stores were
opened.
So for example, our representative here
from Colorado, I'm not certain I got these dates correct.
I tried to do my best of identifying
when dispensaries actually opened their doors.
So if you notice any mistakes here, please correct.
Because we've pointed out in the past
that measurement error can lead to bias in your results.
So if, say, some of these, I'm using the date
where the legislation was passed,
but not actually when the dispensaries were opened,
that's measurement error and will
lead to bias in our results.
So this is our first assumption along the way, major assumption,
is that sales start when things are permitted.
But you'll see, if you start reading through these sources,
you'll see that various states rolled things out quickly.
And sometimes things were delayed.
So maybe they permitted cannabis at a certain point,
but the dispensaries didn't open until years later.
So long story short, I've done my best
to identify when each state permitted.
And then the other data set we'll be using
is this is basically all the sales data
that we've collected in 2021.
So we were collecting Colorado sales, Illinois sales,
Massachusetts sales.
Notice Massachusetts was closed for a month there.
But anywho, there are still more data points to be collected.
But these were the ones that we diligently collected.
So as a good Bayesian, we can use our prior knowledge
or prior data in our forecasts here.
So basically, we'll be using the combination
of historic sales data to train our model.
And then we'll use these variables
to try to predict for states where
we don't have good historic data.
What's the data source of the sales data?
Yes, I still need to finish adding them.
I've started to add some here on the sources tab.
There's still some missing.
They're scattered throughout our 2021.
What I'll do is I've ended today.
I'll update all these sources here.
So that way, you can have the sources.
But essentially, they're all public data sources
where those various states are publishing various data points.
Great, thanks.
But good question.
It's always important to show your sources.
And that's what we're doing here, open data, open source.
Awesome.
So we've got our data.
Let's go ahead and read it in.
Awesome.
Just take a quick look at it.
There it is.
There's the exact same data we were just looking at.
Now, time to start doing data science.
So one of my favorite things to do
is create and retrieve supplementary variables,
because you'd be surprised what you can calculate.
So for example, we're going to basically use
when the state permitted medicinal or adult use.
That way, we can calculate how many months the states
had medicinal or adult use.
So don't want to spend too much time on the code.
But basically, just checking, OK,
is the state an adult use state?
And then I'm calculating down here how many months elapsed
since then for each point in time.
And then just creating a set of month effects.
So we get to look at an observation.
So for example, here is Washington.
The last data point we have for there is October of 2021.
And we say that, OK, there's been 160 months of adult use
and 285 months of medicinal use.
And so we're hypothesizing that that has been the case
and that that has an effect on total sales.
So those are our main metrics here.
And then month effects are basically just 0 or 1
if it is a certain month.
And you need a baseline comparison month.
So I've excluded January.
So basically, our month effects will tell us
how different a given month is from January.
So here, the parameter beta 5, it's actually
beta 5 through 15 because we have to include 11 dummy
variables.
So if we're going to do a much coefficient, we'll say, OK,
this is how much different February is from January,
how much different July is from January.
So the idea is you should be able to exclude
any given month and our estimates
for the other parameters should be the same.
Should be.
I have to double check my statistics here.
Without further ado, let's estimate this regression model.
So here it is.
So it's basically just a constant, a coefficient
on population, coefficient on a dummy variable, 0 or 1
if the state has adult use, the months
that it's been medicinal, the months
that it's been adult use.
And this is called an interaction with adult use.
So basically, if the state doesn't have adult use,
then this will just take a value of 0.
I thought that was reasonable.
And then the dummy variable for the month.
So here is the regression of sales on these variables.
And I just did this cursory earlier,
so I actually haven't analyzed this regression.
So just going to do it right here for you.
So first things first, I'd like to look at the r squared.
You can roughly interpret this as how much variation
are we explaining with our variables.
And so you would love an r squared close to 1
because you're explaining almost all of the variation
at that point.
0.47 is actually not the worst for a structural regression.
I've seen r squared is much lower,
but it would also be nice to have an r squared much higher.
So what you can do is you can start to add variables.
And what you can do is you can actually,
there are some statistical tests you can do to see,
you can see, OK, let's try to add some variables
and basically penalize ourselves for adding more variables
while rewarding ourselves if we're
able to explain more variation.
So long story short, you can compare models.
And I would highly recommend all of you to,
maybe you can think of creative independent variables here
that you would like to add.
So personally, I would just start
thinking of demand and supply side variables
and see if we can't include those.
Keep in mind, if you add a variable,
you're going to have to forecast it into 2022.
For population, I used the most naive forecast you can have.
And I just said, OK, the population in 2022
is going to be the same as it's going to be in 2021.
Another big assumption, you can improve upon this model
by forecasting population.
So if you've, once again, it's going
to add a bit more uncertainty.
But it may result in a better forecast
because it's a stretch to assume that population is going
to remain constant in every single state
across the country.
That's not realistic.
So I like to kind of preface the work I'm doing here
in this meetup.
It's a lot of a demonstration.
So please take these numbers at face value
and know that all of these forecasts can and should
be improved upon.
So for example, if you're actually
doing something for the state of Colorado,
definitely want a bit more rigor than I'm using today.
But it's more just a thought exercise, a proof of concept
that we're doing today.
So just for the sake of time, just
going to use these five variables plus the month
effects and know that there's ways to improve upon this.
So let's see if we can't do any rough interpretations
of the data here.
So for example, our coefficient on population
is 6.6, so roughly speaking, for each additional person
in a state, you would expect around $6.60 additional sales.
I've seen a lot of people use adult population, right?
Because just say somebody's born,
they're not going to be consuming cannabis in 2022.
So long story short, you could improve upon this
by perhaps using a measure for adult population.
Maybe I missed something, but where did you factor in price?
I thought we were talking numbers.
Excellent, excellent question.
I'm not factoring in price.
That could be and is an omitted variable.
So as we've seen in states such as there's
a large price discrepancy between prices in, say,
the two states we have price data are Oregon
and I want to say Massachusetts perhaps, or yes, in Maine.
So we have prices in a handful of states
and we could get prices in Washington if we wanted.
Long story short is we don't really
have price data for most of these states.
So then I'm not clear what the population coefficient means.
Would it be number of sales rather than dollars?
It would just be dollars.
So basically, our dependent variable here is sales.
So this is just sales in dollars.
So the total gross amount grossed by cannabis sales
in a given state.
Does that answer your question?
So basically, what I'm saying here
is for each additional person in the state,
you would expect the total sales in the state
to increase by $6.60.
How much actual cannabis that is, like you said,
depends on the price.
So for example, $6 goes a lot further in Oregon
than it does in Massachusetts or Maine
because the prices in Oregon are like a third of what they
are in Massachusetts and Maine.
So long story short, I would love
to include a measure of price for each state,
like for example, maybe average price in a given state.
I just don't have that data.
And I would have to forecast that data in the 2022.
So once again, there are companies
out there that actually do a really good job
at measuring price.
A lot of that's private data.
However, they could improve upon these forecasts
by including a metric for price.
Excellent point.
Surprisingly, we have this negative coefficient
on adult use.
So that would say, oh, having adult use actually
lowers your baseline.
But we've got a positive coefficient
on the months of adult use.
So it seems that the more and more months
that you have adult use, the higher and higher
your sales are going to be.
Similar for medicinal, however, the coefficient
is smaller than adult use, around a third of the size.
So the effect of having adult use is almost three times
as great per month as medicinal.
If you're a frequentist, they're looking fairly significant here.
One thing that you'll see is not many of these month effects
are statistically significant, except for perhaps July
and August at the 95% confidence level.
So basically, you really couldn't
conclude that any month is different in sales.
Keep in mind, our training data is limited.
I showed you that earlier.
Our training data doesn't include all of the states.
So I need to expand our training data,
because there is still public data that's not been collected.
So that's another way to expand on our forecasts,
is we can add more training data to just train a better
and better model here.
So long story short, I'm including them anyways.
But you may want to try to re-estimate this model
without month effects and see maybe
you don't need these month effects.
I'm including them because they're
one thing that we can forecast with 100% certainty.
We always know that in October of 2022,
it's going to be October.
So we know that with 100% certainty.
So I think they're a nice go-to when forecasting.
Awesome.
So without further ado, just going
to define the parameters here.
And here's just a whole bunch of software.
But basically, what I'm doing here is, OK,
we've got this list of states here.
So I'm just going to iterate over all of the states,
find out when adult use was permitted in each state,
when medicinal was permitted in each state,
get the population of 2021, which was actually just
published a few weeks ago.
So long story short, we've got those variables for each state.
And then I'm just going to iterate over our forecast
horizon, which is 2022.
So iterating over each state, iterating over each date,
and then just a handful of if statements
to figure out, OK, what are the variables we need to include.
But nothing too fancy, really just
this is where the magic happens, where we actually
estimate the forecast, beta naught plus beta 1 times
population, beta 2 times adult use,
beta 3 medicinal, so on and so forth,
just as we specified in our regression model.
So let's do that.
So basically, I'm just plugging in variables
into the regression model that we just estimated.
Takes it a handful of seconds because I didn't write
the most optimal routine here.
There's a lot of ways you can optimize this.
But as Edward Tufts says, show the data.
So here are, whoops, I didn't quite do that right.
Give me one second here.
I can fix this.
Actually, I think all we need to do is add a time index to this.
Hold on.
Yes, question?
Is there a question at hand?
OK, so we may have to just save this part because we can still
look at, I'm going to try this one other thing
and then we'll just move on.
Awesome.
Just had to add the index just to kind of line everything up.
So this isn't actually the most informative chart ever.
Was there a question?
Some people have to jump.
And I always try to wrap it up.
So I'll be wrapping this up shortly.
And then if you do have to draw, you
can check out the recording on YouTube.
So I'm going to try to add a time index.
And then I'm going to try to do some more
of the recording on YouTube.
So not the best plot in the world because there's
just so many states.
And I think I'm reusing some colors over and over again.
But we've got our forecast for California on top.
Oh, yes, let's just list these because I think the list is
a bit more informative than this big plot.
So here's just the predicted sales by state.
And I'm going to order this by the most sales.
So that way, it's a little easier to read here.
And as you'll notice, our forecasting model
has some wonky predictions.
So basically, Texas does technically have medicinal use.
And they've got a giant population.
So because of the way our forecasting model was
constructed, Texas is taking the number two sales.
I don't think this is realistic per se.
So I think this can be improved upon.
So for example, Florida is number three.
Once again, I'm not certain about this.
But we don't really have good data from Florida.
So if you look at our regression model, all we're really using
is their population, whether they're allowing adult use,
whether they're allowing medicinal use.
So our model can probably be improved upon.
But really, the population is what's
carrying our estimations here.
But like I said, any forecast, I think,
is better than no forecast.
So we're way underestimating Colorado
because we have done eight theoretical forecasts.
And I think our eight theoretical forecast
was that Colorado would be around 1.6 billion plus in 2022.
So this model has some huge shortcomings.
But we just needed to sort of do something
because we just wanted to get a number for each state here.
Because now we can compare our estimates
to CNBC's estimates.
So given our crude forecasting model,
we're predicting 1.5 billion in New York in 2022.
And if you look at my assumptions here,
that is under the assumption that New York permits
adult use on October 1.
My source was this website, which
suggested that New York would do it near the end of 2022.
So that's an assumption built into the model
that can be improved upon.
But long story short, our total estimate for the US,
given all our imperfections along the way, is 26.9 billion.
So now we actually have a number to put on it.
And I would like to say that now we can actually say, OK,
whose model predicts better?
Because we can actually tell.
So we can wait till the end of 2022.
And we can basically calculate the root mean squared error.
And we can basically see whose model predicts better.
Does CNBC's model predict better?
Does this crude model predict better?
Or perhaps you.
You can create your own forecast.
And so I was thinking about maybe we
could do some sort of competition,
where we all could make our own forecasting model.
Maybe we could do a mix.
So I think that may be the best sort of mixed model, where
we use the a theoretical model when we do have sales data,
such as in Colorado.
And then we can use the a theoretical.
I mean, we can use the structural model,
the theoretical model, for states where we don't have good data.
A lot of the states, we don't have fantastic data.
So we still need to look a bit more.
But long story short is a lot of this
is chalked up to medicinal sales,
which I'm skeptical will be as high as our estimates are.
But any estimate's better than no estimate.
So there we have the numbers.
We've run a little long.
So I'm going to go ahead and end the presentation.
But does anybody have any thoughts or comments?
Yeah, I'm a little overwhelmed.
I mean, it's a lot.
But my first thought is why concatenate medicinal
and recreational use just to get a total number
or because they're kind of different.
Wouldn't a more granular focus?
I mean, yeah, you want to have an overall number, I guess,
the farmers, because they're going to be producing it.
But wouldn't a more granular take on it help?
Yes, 100%.
And that sort of brings us back to sort of this day to day
luge, where I think you're 100% right.
I think you're right.
I think it would be good to have an estimate of adult use
in medicinal because I think they're different things.
I was primarily doing this just to compare to CNBC's number
because they said that was their estimate of total legal sales.
So medicinal sales, they're still legal.
So I was including them.
And it's really important to have
a set of estimates for states with medicinal use.
And it's really tough to distinguish these, right?
Because, for example, Oklahoma is a medicinal state,
but it's fairly permissible, whereas other states may only
permit, they may have heavily restricted medicinal programs.
So that's why I was saying a lot of these estimates
because I don't know how much faith I would put in those
forecasts because I think there's
a big discrepancies in how the medicinal programs behave
from state to state.
So if there's a way to capture that in a variable,
then we should all brainstorm and we could probably
improve upon them all.
But I'll just leave you with this.
This is a starting point.
It's crude.
It's not set in stone.
It's imperfect.
It's just a starting point.
So I'm just putting that out there.
Just this is what we have.
So I think it's better than nothing.
I think it can definitely get a whole lot better.
So definitely hedging it.
So now you saw the process and you can see, OK,
there's a lot of assumptions built into this.
The model is imperfect.
The data is imperfect.
But it's all transparent.
I want to say that there's a lot to get your teeth into with
this.
Yes.
And so instead of just seeing, oh, $31 billion
and just having to take that at the expense of the state,
just having to take that at face value,
you can dive into all the different layers that
are involved.
You've got to have a baseline somewhere.
So here we are.
Exactly.
And the cool thing about forecasting
is we can check it, if we can get the data, that is.
So as 2022 unfolds, we can see how right or wrong we were
and adjust our model.
And that's part of the process.
So we've got to learn from our mistakes.
And inevitably, we've made some mistakes.
So the model can be improved upon.
And we can keep at it.
So for example, as January comes, some of these states
are coming online.
What was the state that just permitted here?
Delaware.
Yeah, Delaware and, oh, yes, Montana
just permitted adult use.
So as we see these various states unfolding
and collect more data, then each month
we can revise our forecasts for each month ahead.
So we can measure ourselves as we go
and then make better and better forecasts for the future.
So it's the best we can do.
I'd just like to thank you all for coming.
Thank you all for staying a little extra.
I know your time's precious.
So I'll go ahead and wrap it up here.
Thank you all for coming, though.
Thank you.
See you.
It was great.
Thank you.
Awesome.
Have a productive week.
Thank you for notes to the grindstone, and I'll see you next week.
Thank you.