Rare CQ Cumbers, welcome back everybody, let's get into it and before I get right back into the material, I want to show you how to draw an owl. So surely somebody knows this but I'll pause, I should read it, yeah okay they're all nodding like yes we've heard this joke before, it's been a lot, now okay why is this here, I assumed you'd all seen this but I want to show it to you because this course is like that, like this right, and I'm sympathetic to that. So what I'm showing you how to do in the lectures is to draw some circles, that's what I'm doing, and then I send you up to your homework and I draw the rest of the owl and you're supposed to submit some owls or something right, I know it's like that and it just kind of has to be that way, there are things that are hard and you can show people the outline of the steps but there's a lot of things you just have to practice yourself to get it right and we're entering a part of the course in particular where I've drawn a lot of circles for you, geocentric circles if you will and you can go quite far with those things and now we're getting into you know the finer techniques of drawing feathers and such and it is necessary that I skip over a lot of that detail in lecture but the notes have a lot more detail, the book has a lot more detail that I can possibly give you in the lecture now because of all the little moving bits of these things so there's a lot of code that makes things happen, the things that I'll show you in the lecture and that code is in the book, it is, it's there, I had to write the code to draw the figures and it's there in the book but I won't show it to you and so if you're feeling like oh my god how does that work that's okay you got to go read the book right and then you can draw the rest of the owl, yeah it's just how it is so if you're not as I keep saying if you're feeling confused that's that's only because you're paying attention and you don't have to get you don't have to understand everything at once and your owl doesn't have to be perfect either I mean think about this metaphor I love this I love this joke I do I use it constantly but this is life right it's like science but what it doesn't get quite right about the scientific endeavor is that we don't have a particular target it doesn't have to look like an owl right we don't know what the owl is so there's actually a different exploration metaphor here you're drawing some circles and it's fine there's an exploration that goes on the right there are many many right models for an analysis is the point I want to make there are many many owls that would be satisfactory there's not some perfect platonic owl that you must draw there's not some perfect platonic Bayesian model that we're aiming for we're trying to extract evidence okay so I remind you when we ended last week I'm giving you an introductory example to doing a Poisson regression remind you a Poisson distribution is a count distribution what's a count number zero one two three four five all the way up to infinity right and the Poisson distribution arises when there's some unknown maximum count we're never going to see it and but the rate of any one item one trial is very very low and then we just need one parameter to describe the distribution the expected count and this is a very handy way to model counts and I had built up the first Poisson regression for you and we had just gotten to the point where we're going to do posterior predictions and that's what I'm showing you on the slide I'm plotting the model predictions against the raw data this is a very small data set I like teaching data sets like this but also anthropology is often like this right we're not going to get more data this is it right so this is all the oceanic societies we've got good data good data sets on so we we we go to war with the data we have and I'm showing you the same posterior predictions on two different scales on the left you've got the way the model sees it so the predictions are done on we're interested in how long population is associated with total tools because there's an underlying theory which says that you get more total tools as in proportion to the magnitude of the population size yeah you get more innovation is the idea with larger populations and so you get more complex cultures more complicated tool kids and there are two trend lines here because one is high contact islands and one is low contact islands so the in particular the dashed line is the trend for islands that have low contact with their neighbors and the solid line is for high contact with neighbors or that was the other interacting effect we wanted in the model that is your your small society but you're next to a big society like Tonga then it doesn't hurt you so much that you're small because you get to steal all the tools yeah Tonga was big one of the biggest so you can see time in there right so only thing bigger is Hawaii and so you'll see that there's definitely for both there's a very strong relationship with log population and I say the open circles are the low contact islands in the data set right Hawaii had low contact you can imagine why if you know your specific geography right Hawaii is way out there it's a miracle anyone found it yeah it's the middle of nowhere there's nothing near Hawaii it's nothing and all the other Polynesian islands are near one another for the most part and easy to easy to get from one to the other so Hawaii also has the biggest population historically so there's a strong relationship with log population and there's some difference with the contact rates low contact islands do have lower expected total tools and any particular size until you get out to this weird effect that's a very high end there's massive uncertainty you see the compatibility intervals there's massive uncertainty out there high contact islands because there are no high contact islands with large population sizes so you see that compatibility normal just explodes we're looking at the the upper right of the left hand figure right and it just has no idea where it's going up there but the model lets the black line cross back over so the models essentially saying yeah it's possible given all the assumptions you've made that a very very large population sizes high contact islands actually have fewer tools than low contact islands I want to assert that this is weird it's a very weird feature of this model and it seems wrong right seems like the model should be constrained somehow not to produce that prediction but it does now showing you the same predictions exactly on the right but on the natural scale if you will where the act the horizontal axis is population by head count just counting people and same vertical axis same curves but now they're squished and transformed and you see it's the same things you see that switch you see the massive uncertainty in the compatibility intervals on the high end Hawaii is still out there last thing I want to say about this is when you look in the text so at the bottom of the slide I say point size proportional to this thing called the Pareto K diagnostic value okay what is this this is where you draw the owl right so all the code is in the text to do this this comes from the Pareto smooth leave one out cross validation metric so if you if you calculate the expected out of sample predictive accuracy of this model using the Pareto smooth leave it out cross validation metric it gives you for each point in the data set this Pareto K diagnostic value which is like a measure of leverage it's a measure of how much force each point is exerting on the posterior fit this is a really handy thing to look at you get an idea about which points are making it sensitive in prediction and so what it's saying here is so I've scaled them and the big points are the ones that are exerting high leverage and you can see Hawaii is the biggest and you can probably look at this picture and see why Hawaii has high leverage because it's the only populated it has order of magnitude larger population than all of the other historical oceanic societies and so it's it's the only thing that's informing what happens on the really high end there's not much else to do about this because again we can't invent another island society but now you know and so what might be motivated to do you might well I don't think you want to drop away from the analysis but you might drop away from the analysis playfully to see what happens and if you do that well maybe I'll give that to you as a homework problem at some point but you could probably see that there's a trend in the lower ones despite Hawaii just Hawaii is doing a lot of work on exactly positioning the high end okay questions about this just draw the owl right just now there's a lot of text there's a lot of code in the book particular for drawing both of these figures get an idea what's going on before we leave this example though let me let me try to summarize a couple of the criticisms I have of this model and these are criticisms that extend in general to generalize linear models and now I like generalize linear models they're unreasonably effective like all geocentric models are unreasonable to be effective in a wide range of circumstances you give me some random variables and tell me nothing about them I can figure out a GLM and I can describe associations yay major paper right you can do a lot of work with generalize linear models but they generate a bunch of anomalies if you know things about about the variables that are external to the to the data set you're given often generalize linear models produce ridiculous effects I think there are a few things in this case that are like that symptoms of something I like to call generalized linear madness which is if the first time you have drawn up a quantitative model is when you start doing the statistics chances are something ridiculous is going to happen because there's scientific knowledge that is missing this is what I call generalized linear madness so this bottle is terrible even though it's geocentric right it's it's it's describing the relationship sure but it's got some things in it don't make sense so the first thing the most egregious I think is that the intercepts don't pass through the origin so what do I mean when these lines come down they cross zero population anywhere they like this is impossible given the nature of the data set it's got to be true that for any real relationship between total tools and total people the zero and the zero have to go together you got zero people you got zero tools I assert based upon the physics of how monkeys work zero monkeys on an island zero tools right if you add one person you might get a tool all right and then it goes up from there monotonically it's got to work that way that's the way the theory has got to work and this generalized linear model does not assert that because it just has a free intercept in the intercepts to go anywhere right the data just tell it where you go it doesn't have the physics anchoring it to the point where it has to cross which is the origin of zero and zero does that make sense so now this isn't a total disaster if you were we are learning that there's a general relationship between population size and total tools here but it does it itches my brain immensely this is going on it's also this weird thing where they cross at the top that bothers me a lot too it seems like the it's it's capable of doing things that really don't make sense what if we stop for a second and thought scientifically instead of statistically it's like really statistically so let me let me run out the simplest model I could think of of the system value and so what we want if we're going to have a scientific model of data like this is we want a dynamical systems model we want a model that says from one time point to the next individuals are inventing tools and they accumulate in the population there are also processes that lose tools at some point these processes balance and then we get an expected number of tools a technological sophistication of a society that's a basic cultural evolution model so it's the simplest we can do we start we have delta t which is the change in the number of tools in some generation time step and there are innovation inputs so P is population size and this is per person and then there's a rate of innovation alpha that is per person how many tools can they make right invent this is inventions right this is new tools to come up with right you got a slice an avocado it's really frustrating to do it with a knife and a spoon right you ever done this yeah and and so you invent some new fancy like you know hoop or something you can just slice through the avocado and it takes the seed out you know these things exist they're terrible just use a spoon but but people invent these things so that's very clever that's your alpha your contribution to posterity as you've invented the avocado slicer yeah and so the alpha p part is just kind of the basic assumption the verbal model itself is that each person has some chance of inventing something and so as you get more people you get more tools you get more innovation this is how economies work right if you add more inventors you get more inventions and there's a proportionality thing there we have to estimate and then what's the beta for the beta is this thing if you're an economist you call this an elasticity this governs the diminishing returns on how numbers of people create innovations so think of it this way there's saturation effects you can just get lazy because someone else will invent the avocado slicer for you yeah so beta controls the diminishing each additional person contributes less innovations than the previous one fewer innovation sorry then the previous one because there's some diminishing return effect to innovativeness if you're the only person on the island and you got to invent everything yourself and you're really motivated right and then you add some more inventors and then you start getting lazy yeah it's like a lab so we need to measure alpha and beta their parameters but he is data and then there's the loss people forget stuff and tools are lost either well either because people forget them and the technique is lost and you can't reinvent it or you don't need to use it anymore the reason you invented that tool in the first place is no longer worthwhile because there's just some rate which ecological challenges come and go where you live so this is the world's simplest cultural evolution model but I wanted to show it I know most of you don't work on cultural evolution although I also know some of you do want to show it because now we're going to fit this today and I want to show you at least one model in this course which is not a generalized linear model and okay so we've got three parameters now alpha beta and gamma just some loss rate per tool loss rate notice that the loss term is per tool it's not per person the more tools you have the more you're going to lose yeah more you know you more you forget every day let me tell you that's true right forgotten more in the last decade I learned in the previous 20 so got make room for new bureaucracy rules and stuff like that right a lot of gazettes to the right so scientific model our goal here now is we if we're going to match this to data we've got a cross-section we don't have a time series this model implies a time series and if we had a time series it'll be gold we could do that and where I learned I learned statistics in any studying ecology sorts of problems where you have time series of like numbers of wolves and yellow stone and stuff like that but we can also use the same model in a cross-sectional case we need an expectation so you can solve these dynamic systems for steady states that is after a while the innovation and loss processes balance and where will they balance will they balance where the change is zero when delta t equals zero that means the two processes are balanced that's it so you replace delta t zero and you solve for t boom science right so on the left we've got I put a hat over the t those are you taking modeling with me you know about the hats right it's like a party everybody gets a hat all of the t's that means that's the steady state that you go to and then it's this alpha p to the alpha p to the beta over gamma is the expected number of tools this will still be stochastic right it's not actually a fixed point but this is like the mean of the stationary distribution and then we can just stick it inside the plus on there's no link function there's no ad hocary it's just there now surely this is an inadequate model in many ways but I would assert it's a way better start the generalized linear madness where we had because the intercept is fixed here guarantee you this passes through the origin and we didn't have to force it to do that or anything it's still going to do silly things a little bit but at least now the violations mean something and they're going to push you in the direction of some actual you know science pale science right so you can just write this into a Markov chain no problem just like all the other stuff you've learned right so just draw some circles right and same idea this is just like the possible regression that we did at the end of Friday but now for lambda there's no link function because we've just got this expected lambda now expect a number of tools the only trick is all the all these parameters have to be positive and you've got an array of tools at your disposal to ensure the parameters have are positive I'm using to here because I wanted to show you two different ways to do it one is you can exponentiate the parameter so that's what I've done with alpha if you exponentiate any real number it's positive right so this is log normal think about a log normal variable a normal distribution can be any real number negative or positive if you exponentiate it it's guaranteed to be positive that's why log normal variables are always positive so this is what if you exponentiate this is just a trick for making alpha positive yeah then you have to be careful to understand what the you're talking about a log normal now is what this denormous it's a log normal with mean one and standard deviation one and for the other two I just give them exponential distributions and exponential random variables are positive yeah so it makes sense so the only thing you have to do is you know what the parameters mean now their rates and so they're positive that's what we need and then it runs chains happen and now we can compare the two models on the left is what I'm calling the scientific model and on the natural population scale in the horizontal and then just to repeat it so you can compare the scientist this model on the right now I'm not going to argue that the scientific model is doesn't have flaws here but at least it passes through the origins now you see that it's aiming for zero zero as it's got to and you get real separation now between the solid line and the dashed line it doesn't let them cross at high values and you get all this stuff for free because there's actually some science to make in this model it's not just pure generalized linear madness certainly there are violations but the violations mean something scientifically now they're not just weird features of the tide prediction engine right staring at the weird gears at the bottom and the parameters have biological meaning you could actually use alternative data sets experimental data sets to get information about those parameters in addition to this kind of cross-sectional data right unlike say alpha in the Poisson regression which means nothing it's just the thing that bends the line around yeah sorry this is my sermon so those of you who live in my department you know these things I'm really like animated about trying to have real theory models made it to the statistics to think about you can't really teach a class like that because every particular scientific example there's all these details that are peculiar to it and that's the problem so why do I teach a class of generalized linear models because that's useful to everybody right it's just got this flaw that you need to be aware of is you want to see it as the generalized linear model of some entree to a research tradition you will build where you will have more meaningful scientifically based models that can make predictions at a bunch of different scales okay last thing I want to mention about Poisson regressions it's super important and useful is that if the different counts you've got in the data set each row there may be different observation windows so-called exposures that apply to each so if for example now it doesn't work for the oceanic islands but say you're counting fish someone goes fishing in a lake and they're pulling out fish and the fish come out to Poisson right okay that's approximately correct because there are a lot of fish in there you won't catch most of them today yeah so it's approximately a Poisson right and but if somebody spends twice as much time fishing as you did you can't just directly compare those counts you got to adjust for the so-called exposure difference does that make sense yeah and so how do you do that well there is a very principled way to do this in a Poisson regression you just use what's called an offset which is the log of the amount of time spent fishing and you just add it to the linear model and so this is a point where I say just draw the rest of the owl because I'm going to skip over the rest of this slide say that in the book there's a section where I slowly derive this for you and why it's exactly the right thing to do there's no ad hocary here it's not magic that it's the log of the number of hours it's required it's the only reasonable thing to do if you believe the Poisson rate assumption okay so draw the rest of the owl at home there are a number of other count distributions and I say more about these in the text multinomial categorical models are extrapolations of the binomial and logistic regressions to more than two unordered outcomes so it's like a coin with more than two sides you flip it and it's going to land on one of them right or one of those those fancy Dungeons and Dragons dice right like 20 sides you can do that as a multinomial or something and geometric distributions or count distributions but they're the number of time steps until some event and then there are mixture distributions and there are examples in at the start of chapter 12 in the book these things called beta binomial and the gamma Poisson also called the negative binomial these are binomial and Poisson regressions but they allow the rates to vary by some unobserved heterogeneity in each case and so they they have writer variants there are a lot like multi-level models but they're like multi-level models in which you don't estimate the random effects so I'm gonna I'm not going to teach these in class but you may want to look at the the notes and then I am going to spend two weeks doing multi-level models and you'll see that those behave similarly to these but are actually much more flexible so I'd rather spend the class time on the multi-level models but I think these are very useful types of models at the bottom I mentioned this thing this dairy clay multinomial thing we'll talk about dear clay distributions I think on Friday I hope to get to them and tell you what that is okay I promise some tax so I want to motivate a very useful class of models for you called survival analysis and I say just motivate because this is kind of thing you got to go home and and run the code and and look at the details draw the owl right I can draw some circles and then you got to go home and draw the owl but let me motivate there are two things to really understand about survival analysis first of all it's they're like count models because they're discreet events that are happening the thing of interest is that stuff is happening and we're going to count it those events could be mortality events they could be bursts the example in the text is cat adoptions right how many cats are being adopted in Austin Texas this is the actual data set and but to do this properly to count those events what you need to do is estimate the rate of those events this is just like the Poisson and binomial models the parameters are about rates and the outcome is a count survival models have that feature to them as well but because the exposure window changes and other kind of events create this effect called censoring you don't get to see some cases whether the event would have happened or not so imagine some lonely cat in the Austin Animal Care Facility and it's waiting to be adopted and then it escapes right because the doors open this happens in the data set by the way there are escape there's an escape code escapees they're loose and they're free right and we don't know if that cat ever would have been adopted or not right now it's free so what do you do with that data and the wrong thing to do is throw it away because how long it waited but not being adopted is information about the rate so you got to count the stuff that wasn't counted it's really weird this is a weird thing about survival analysis so the thing that you want to model get the probability of is the waiting time and it's not just the waiting time until adoption it's also the waiting time that you weren't adopted until something else happened that meant you weren't adopted or we didn't get to see and those things could be escaped died of natural causes right all number of kinds of things that can happen to cats they ascend right whatever happens to the cat and this is a phenomenon called censoring and there is two kinds of censoring to worry about left censoring and right censoring left censoring is when we don't know when the risk period started we don't know when the cat was brought into the animal care facility and could have been adopted that's called left censoring and then there's right censoring which is more common typically in data sets that is the data set gets taken at some point and there's still cats in the facility that haven't been adopted yet we need to use their data even though they're right censored because the total time until their adoptions we don't know it yet these are the two kinds of censoring to worry about and you can handle them in the same sort of way if you ignore censored cases you get biased estimates and for this audience I tried to come for the example you might understand imagine you want to estimate time to phd and say a mox plonk graduate school program and but you ignore all the people who drop out of the program which never happens here right and you will get a biased estimate the amount of time they spent in the program before they dropped out is information about how long it takes and if you drop that out you're going to be getting the wrong estimate you're going to bias it in a particular direction and I would like you to think about which direction the bias will go okay cats so this is in the rethinking package now this is 20,000 cats from the Austin Animal Care Facilities is all up on their website this how I get these things right and they've got it all and there's lots of things known about these cats they've got a whole computerized system where cats come in cats go out they track them right they both got chips in them right so they get their IDs and you scan the cat computer pops up tells you if the cat's been there before yeah and 20,000 cats time to event event is adoption we're interested in adoption rates in particular want to compare black cats to non-black cats because I have a hypothesis that people are bigoted against black cats and I love black cats I like all cats actually but particular black cats and so we're gonna be interested make rates of adoption for black and non-black cats and but the thing is there are adoption events and then you just need to predict given some assumption about the rate what was the probability you would wait exactly three weeks set to be adopted but then there are other events that censor your ability to see an adoption and then we want to predict the probability of waiting that long and not being adopted so that makes sense this is the censoring how you deal with censoring and so what are the other events well you you can load up the data and see there's lots of stuff that the something else is some of them die because some of these cats are brought in they're very old and so it happens but they've got eight more lives don't worry and some of them escaped this is a code right the cat just went missing escaped and and then pure censoring is the cat is still there when I downloaded the data and so that's a case where the observation window has stopped but the cat's life goes on but we need to use that data does this make sense so epidemiological studies are often like this you're trying to to figure out many causes of death and you're following a population along and things are happening to them lots of things but it's not just that basically any kind of time series you can think about censoring happening in it I have a paper in press now which is about sage grouse and we use a survival analysis in sage grouse because you only do a focal follow in any particular grouse for an open window and then we want to rest many probabilities of them doing particular cool things and you stop watching them when the beep happens and then they could it still do it right even though you stopped watching them and sage grouse or if you don't know sage grouse is the coolest living dinosaur just really remarkable North American dinosaur you should Google okay so again this is part where I say go home and draw the owl I just want to give you an idea the simplest kind of distribution data just data probably distribution for a survival analysis is an exponential this means the rate is constant and then it's like nuclear decay imagine a cohort of a hundred cats if there's a constant chance every day they get adopted then there's a half life after a certain amount of time half the cats will have been adopted and then after that same amount of time another half so you go to a half to a quarter to an eighth to a sixteenth to a thirty second and so on right until you're at a fraction of a cat yeah as it goes that goes down and that's the constant rate and so for observed adoptions we just get the probability of being adopted on that day comes from the exponential distribution easy enough and then we've got a lambda we can put everything we know about the cat in the generalized linear model and you know with a log link and and we're gold it's no problem with censored cats you got to think about what it means to calculate the probability that it hasn't happened after a certain amount of time and this is there's this is the kind of thing you're going to sit down with and look at the notes to think about it this is drawing the owl but you can use the exponential distribution and you just need to cumulative version of it because it's it's the number of cats who will have been adopted up to that day and then if you take the compliment of that you've got the number that who won't have been adopted up to that day and that gives you your probability again this won't be totally clear right now in lecture when you sit down with this and think it through with the notes in hand you can figure it out and this is where we get our censoring probability the probability the cat was not yet adopted on day D and that's what you want to get and it comes from this thing called the complimentary cumulative distribution I know what whatever distribution you use for the rates you always get the right censored probabilities from this seat so-called CCDF the complimentary cumulative distribution function okay the codes in the text the only exciting thing to say about this is this is the first model I'm going to show you where you've got this multiple choice likelihood function in here Oolong is not feature complete yet but it is a fully operational battle station and you can destroy planets with it and you you're really just coding the log posterior here this is just raw stuff so you can just write what is this days to event pipe adopted equals one that is if adopted equals one this is the probability use and then it's just an exponential if it if adopted equals zero means it was something in some other kind of event now we're censored and now we need this CCDF and there's this custom tag and when you long sees a custom tag it just dumps whatever you put in there into stand so this is stand code in there so this is why I say this battle station is fully operational you can do lots of dangerous things you can also do lots of really wonderful things this way there's an overthinking box in the notes where I walk through this very slowly with you so you understand what's going on okay what do we get some results my hypothesis is correct black cats are discriminated against and they're adopted at lower rates than non-black cats by the way there's a column for cat color which is why I can do this and somebody would just make an upcat colors there in Austin there are a lot of unique cat colors they got really really exciting so I just took the ones that are were called black and put them there but there's also like black smoky and smoky black you know and so there's lots of other things you might you might code the data a different way there might be more in here and the difference might be bigger so there's a difference in rate and and please run this for yourself and take a look at how it works and draw the plot okay let me spend the second half of this lecture transitioning to chapter 12 that was all chapter 11 chapter 11 is intro to count models and survival analysis give you an idea about how to work with link functions chapter 12 we get into more elaborate types of generalized linear models where you start mixing components together to do well to handle very important data modeling problems and the central metaphor I have for this is like monsters because this thing about monsters in mythology is it's not just that they're bigger right you don't get monsters they're just like a giant house cat or something like that it's it's always like bits of different animals stuck together for some reason there's something about human cognition cross-culturally which loves this idea it's like you make it monstrous you've got to make it like bits of a dog and a cat now it's a monster it's just a big dog that's not really that monstrous you may give it multiple heads okay it's a monster but if you've got to do something extra to it then just make it big and so you know whether it's minotaurs or is that a griffin and on the lower left I forget the name of this but this is this Australian aboriginal serpent thing and then Hawaiian legend one of my favorites is is a man who's the offspring of a shark and a human and he turns into a shark at night he's got like a big shark mouth in his back and it's good good times so and if you're gonna think about statistical models though and making a monster well they're devices right they're like robots it's kind of like the junkyard challenge has anybody ever watched this show no you it's it's it's monstrous but it's people going to junkyard to try to put together working devices that may kill them during any particular episode and but then you have to go to a junkyard and then make a rocket-propelled go-kart so that's the junkyard challenge so don't try this at home or anywhere near me but the stuff we're gonna do is in some sense like a junkyard challenge but we've got it's safe in the sense that there's lots of principles to guide you and the way you make sure the things work is you use simulation to make it work so from this what we get are more complicated GLMs things that I call monsters for dealing with order categories and ranks which are outcomes which look like counts but are not counts they're discreet they're ordered and the gaps between them are totally unknown it's not like integers in a count the distance between one and two and two and three is the same it's always one and unordered categories like a Likert scale it's not like that at all and this makes them a bit monstrous but we can handle it and I think I'll spend all of Friday just working on order categories other kinds of things are mixtures this is what the chapter starts with and there are different kinds of mixtures with varying means and probabilities and rates like the beta binomial and negative binomial models that I mentioned just a few slides back and that's the start of this chapter I stood I want to spend time and lecture talking about zero inflation and hurdle models this is a really common issue where you've got a count it's a good count but it arises from more than one process and so there are lots of ways for example you can get a zero in science since you're all scientists you're already imagining ways that this can happen this is this pollution effect where there are different ways to get zero so the simplest would be your detection is just not good enough and so when counts are low you can record a zero that's not a true zero but you record it as a zero that's zero inflation I'm going to give you an example okay the example I use in the book is a simulation example so you can see how the process is mixed we're going to generate fake data here in this example and I do it in the context of thinking about a monastery mystery and in the history of this course actually this came from case that one year I taught this at University California Davis there was somebody in the class who studied monasteries and we would chat about data problems with monasteries after class and that's where this idea came from so it's a little bit silly but there's a real inferential problem to be figured out here now what I want you to imagine is that you're some sort of medieval investor entrepreneur and you go around buying up monasteries why might you want to do that because monasteries they they they bring in money they copy manuscripts and they produce wine and both of these things produce income and so it's worth owning monasteries yeah also the labor is kind of free right you just pay them in wine and parchment maybe some maybe a pea garden right and so your issue when you're trying to evaluate the economic value of any particular monastery is its output rate and what is the working capacity how many manuscripts can they make per day I mean the problem with just looking at the average rate per day is it comes from multiple processes right you want to have a causal inference here so most copy manuscripts and they can they can finish a certain number in a given day but they also drink right this is thing about the Christian tradition that it's compatible with alcoholism and sorry I'm Scottish descent so yeah definitely right the Presbyterian tradition but the data we're interested in is the number of manuscripts completed in a given day but we want to infer the number of days they get drunk I'm trying to identify the drunk monasteries and how would you analyze this so let's build up the problem scientifically again to get us to a generalized linear model this is something that's going to be called a zero-inflated Poisson observation there's a hidden state that we can't observe in principle we could write we could set up listening devices and cameras goes captioning in the monastery but the technology none exists back then right and you want to hang out in Prague not visit your monastery so you're just getting the data and so you can't see this hidden state you don't know if on any particular day whether they're drunk or sober and you've got you observe a zero now the question is were they drinking that day well they could have been but they could have just been working slow maybe they all they finished a bunch of manuscripts the previous day and they started a bunch on that day and they didn't finish it but they were working really hard you'd observe a zero both ways so if you serve a non-zero they weren't all drunk maybe only some of them were but if you observe a zero you can't tell what happened the hidden state is hidden from you but what I want to show you is even though you can't necessarily say on any particular day whether they were working or drinking you can't say on average how many days they drink if you've got enough data that's what that's what zero-inflated models do you get information about the two mixed processes even though you can't see the hidden state this is a super important problem most of you don't have monastery data but you do study problems where zeros arise from more than one process this happens all the time any kind of detection problem will be like this you walk sorry I used to work with a lot of ecologists so you walk transects through the woods and you count birds you get zero that day does that mean there were no birds no maybe you're very distracted right or visibility wasn't good any number of reasons you could get false zeros false zeros are incredibly common in observational studies in laboratory studies it's usually not called inflation but it's you get a hurdle model is what is called or zero augmentation anytime your chemical assay has a minimum sensitivity before it will say anything is there this is those of you who work at benches you know what I'm talking about yeah then you'll get false zeros and this is called zero augmentation above a certain concentration you measure the concentration quite accurately below that everything shows up as a zero this is zero augmentation and it's very similar the models work very similar to this so we can do this let me let me build up this flow diagram on the right at the top of this nature begins there are two processes that could happen P at the time the monks decide to drink it's like they've got a coin the biased coin and they flip it every morning right in the breakfast hall and you know and comes up stines and they drink and one minus P at a time they work so if they drink then you observe a zero but if they work you can also observe a zero there's another way to get a zero and the or are greater than zero so if we simulate counts from this process you get data that looks like this this histogram on the left and the black ones is a pure Poisson process that's what a Poisson distribution with a mean of I think one yeah with a mean of one looks like and the extra blue bit on the zeros well those are the drunk days so you get zero you get extra zeros this is where the zero inflation terminology comes from so this makes sense so these are your extra zeros when you're walking transects in the woods or when you're doing chemical assays or whatever it is you're doing you get some inflation of zeros and so the the aggregated data is not Poisson distributed it's a mixture of a Poisson distribution and something else in this case it's a Bernoulli distribution but it's a mixture of Poisson and something else this makes sense this happens a lot this is an incredibly practical type of model so let me walk you through this graph again the process graph again to help you understand how we write down the likelihood we need a function for the probability of any given observation whether it's a zero or non-zero right the number of manuscripts finished you make these models move by every Bayesian model moves by counting the number of ways you could observe that thing conditional on your assumptions so we need to get that now so we're going to walk through the garden again at the beginning we've got this binomial process Bernoulli process P at the time they're going to drink one minus P the time they're going to work say you observe a zero there are two ways you could do that one is going down the P path there and the other is going down the one minus P and then exponent minus minus lamb does just the Poisson probability of getting a zero it's a really simple nice likelihood function the Poisson super simple so we need both of those terms and then their alternatives and you may remember when you study probability theory if there are two ways for something to happen then you add them together right is because it's an or every time you say the English word or you need an addition in your probability expression so either P or one minus P exponent minus lambda and that's your probability of a zero that makes sense and the other thing that can happen is you observe in and there's only one way for that to happen so let me try to summarize for you I want to say there's a one way for that to happen in which case you just go down that path on the right one minus P times the Poisson probability of the value greater than zero which is that thing that's the Poisson likelihood that you're looking at there you don't have to memorize that your computer already knows it but that's all it is so let me try to summarize two ways that we want the probability of a zero it comes from you you make a graph this this is a dad by the way it's a directed a secret graph they're back it's used for a different thing this is not a causal day right this is a this is statistical day but we can go P or one minus P exponent minus lambda that's probably the zero conditional on P and lambda yeah no you're drawing the owl now you'll sit down and get this later and but this general strategy works for anything no matter how complicated the model is if you can write down the dag process for it you can get the likelihood out of it and then the other path going down the right one minus P times the Poisson probability so it's just one minus P times the Poisson that's all it is why is it one minus P there because you had to work to observe something greater than zero the only time you'll observe account greater than zero is when they were working that's what the model assumes right good exciting yeah so that's all the hard work usually when you run these models you never see all that stuff because they're these little helper functions like zip Poisson Zi Poisson for Zi for zero inflated which is bundle all that together they take those two probability expressions and if then statement and they just use them to construct to return the right probability for any observation and then now here's the trick that is going to look a little funny we've got two parameters we've got a P which is the probability they drink or work right that's the probability of which process you select and you can make that a linear model of anything you like a generalized linear model of anything you like you can have predictor variables that predict which whether they drink or not that are different from predictor variables they give you the rate at which they work they could be completely different for example the weather may determine whether they drink or not but the weather may have no effect on how rapidly they work yeah depends upon the scientific process but there's these are just up to your scientific situation they should be bespoke remember this annoying word that no one but me uses you have bespoke they should be bespoke to your application these linear models are different models they have their own parameters they have their own predictors whatever you think is is needed to make the right kind of model but you need link functions on them and lambdas like a Poisson regression P is like a logistic regression and you already know how to work with both of those this makes some sense this is why I said these things are like monsters right there's little bits so we have taken the cat and the dog and stuck them together to make the cat dog and it's terrifying but it's also really powerful and a model like this can do a lot of really good things because natural processes have these fixed features natural observable processes are mixtures of component processes so we need models like this in the book we simulate the data so I don't walk you through that now to help you understand what's going on this is a when I'm developing bespoke is that we're again a statistical applications I always do this I want to know that my code works I want to help my help develop intuitions for myself about how the model behaves so I simulate data from a known process and then I feed it into my statistical model I make sure the thing functions and so we can do this this so-called dummy data process quite easily in our I've already showed you several examples the goal is to recover estimates and understand the model and also kind of test the limits about what the model can do they're going to be combinations of parameters where the model doesn't do very well because that's how nature is here's the whole simulation it's really easy and I'd like to walk through this code I don't do a lot of that in this course like to walk through it so you see how dead easy it is to do this kind of simulation this is the same statistical model but this is going forward so remember at some point in the beginning of the course I asserted that for a Bayesian model all Bayesian models are generative what that means is you can run them in either direction if you don't have data you plug parameters into them and they produce data that's the direction we're going to go on this slide if you do have data and you don't have parameters you run them in the opposite direction and then they spit out not parameters but distributions of parameters because it's not sure what the true parameter values are so it just rates up their relative plausibilities that makes sense but you can always run the model both directions this is a huge aid there are lots of statistical models in other frameworks which are not generative and you cannot run them both directions that doesn't mean they're bad models it just means they're hard to understand yeah they don't make predictions in that case okay so first line here we define some parameters we pick we're playing God the probability the monks drink on any given day is 20% that's pretty industrious the middle ages probably when they do work they finish on average one manuscript a day you know these are these are beautiful illuminated manuscripts right you know what I'm talking about these great things with the Lindisfar Gospels and things like that we're going to have a whole year sample now you're deciding whether you're going to invest in this monastery so we're going to 365 days of production and then we just simulate I set a seed so you can replicate this there's nothing special about the number inside set seed this just means that all the random number functions that come after it will produce the same results when you use the same seed but it sets the machine state right and then we simulate a binomial thing first whether they drink or not this is the drink indicator variable yeah 365 drink or do not drink decisions yeah and then we simulate the manuscripts and this is conditional on drinking it here why is one minus drink their drink is a zero and indicator so drink is one why is always zero make sense if drink is zero meaning they worked then it's just a random boss on number which could be zero because boss on distributions do produce zeros and in this case the mean is one so produce a lot of zeros actually you'll get a lot of zeros just naturally from the you know how long it takes to make an illuminated manuscript okay this makes sense is this helpful I when I was learning statistics I thought exercises like this would be only reason I ever understood anything is running the model forward otherwise it's just a black spot machines with spits out probability distributions right okay so here's the code the Oolong code to do this just repeat the mathematical version of the model at top I've written this DZI plus helper function when Oolong sees that it's going to interpret that to mean you want to do this multiple choice thing where you ask if it's a zero or not then you have that P plus one minus P e to the minus lambda and if it's greater than zero then you use one minus P times the plus on probability of that count just does that internally that's all it does and then the rest is a standard model all the other features you're used to no predictors in this but AP and AL the intercepts of the two processes are different parameters because there's there's an average rate you need to estimate and there's an average rate of drinking you need to estimate just make sense yeah and just show you at the bottom the machine works right you knew it was going to work otherwise I wouldn't be showing the example but there's a selection effect but no this is a this is the way you verify the machinery is working the posterior mean rate of drinking that you estimate is a little over 20% right and the rate of completion the rate of production on any given day they do work is right around one something to note is your simulations are finite so you shouldn't be surprised that you don't recover exactly the data generating parameters because the sample doesn't represent them exactly so if machine works correctly it won't get exactly right true data generating parameter values so that makes sense but you should cover them with high probability if the machine is doing right and the sample is of any reasonable size so you should not be surprised that it is not exactly point two because the sample hasn't just because of the stochasticity they drank more than point two of the days in the year just because of the stochasticity and that's why the posterior distribution says it's more like point two one because that's what it was actually in the sample does that make sense okay there's an overthinking box in this section at the end of this section where I talk about how you could code this without the helper function I think if you're interested in understanding these kinds of mixtures and mixture models are really useful this is a good box to attend to this is the same a lot model it'll give you exactly the same posterior as the previous one the one with the dzi plus in it all dzi plus does when you want sees that it replaces it with the two lines at the top here again there's this why pipe why greater than zero means why conditional on y being greater than zero is distributed as this thing and then there's this arbitrary stand code in there and I know it looks weird but there's a box that explains why we do things this way we do everything on the log scale in statistics because otherwise things explode what that means is explained in the box now it's perfectly fine though to use dzi plus I do that's why I wrote it but it's good to have some understanding about what's going on and if you ever tried to do this on your own you are licensed you are licensed professional now you can draw the owl yes you can okay there's no reason you can't also do zero inflated things other ways like zero inflated binomial would look very similar there's this Bernoulli process that generates x has zeros and then there's a binomial count you replace the Poisson with a binomial and the model stays basically the same and you could write that mixture using the custom code if you like I have not yet written a dzi final for a lot but I could do that I guess but you could just do it with the custom code too there are also things called hurdle models I mentioned these these are much more common with continuous distributions where you've got some like I said some chemical assay and it'll be some number greater than zero but there's an excess of zeros because there's some thresholding effect where you can't detect anything and you get lots of this in in bench work all the time and so another case where this shows up when the anthropologist in the audience is in human production data this happens all the time because say say you're a human forager something my department studies a lot you go you spend eight hours in the forest and you come back with nothing that happens most of the time hunting's hard right the animals don't want to be eaten surprisingly and they're not like goats and sheep right it's just like beg to be almost right no they don't but it's they're not hard to catch if you're hunting a howler monkey some of the data that that my department analyzes it's much harder to catch them and half of trips will be zeros and then when you do manage to get one what's recorded is the kilograms of meat you bring back so if you're if you want a statistical model for the kilograms of meat produced per hour of foraging it's massively zero augmented massively it's it's not that there's some threshold effect it's that hunting's hard and 50 to 60 to 70 percent of all trips can be zeros and but when you do get something it's way more you're going to eat today and that's why human societies exist because of that basic economic reality that we balance the risk against the high need return of hunting so but there are lots of cases where you get mixtures of processes right in order to have some kilograms of meat to eat two things have to happen you have to catch something and then you need to figure out how big it was right in both of those there are two distributions that mix together to produce then the observation that comes out yeah last thing I want to say at the bottom multi-level models are also a mixture and a very flexible type of mixture we'll spend like I said probably two whole weeks on multi-level models at the end of the course okay when you come back on Friday we're going to spend all day Friday on one of my favorite kinds of outcome distributions it's incredibly common at least in psychology yeah also in anthropology called the ordered category so we're just going to stop right here and when you come back I will have a well-worked-out large data set example for order categories on both sides of the regression meaning as an outcome and as a predictor and both cases require special treatment and it's incredibly useful for sort of basic regression tasks in the behavioral sciences okay thank you for your indulgence I'll see you on Friday


quiet. Good afternoon everybody. Happy Friday. Tom's out today feeling and he'll be back on Monday and boy a little bit of an acceleration continuation I should say of yesterday's action we make it up to fifty one twenty three this morning on the S&Ps little bit of volatility from there you dropped down to five thousand and ninety five right now we're positive by seven points on the S&Ps NASDAQ one hundred actually slightly in the red by about two tenths percent off by thirty nine points we're sitting above eighteen thousand right now we'll jump right to some of the equities doesn't look like a lot on this chart but man that was quite a pullback you're talking about almost five percent man eight hundred and twenty three dollars stock you pull back forty five dollars in the span of about an hour to seven eighty just like that you're back up twenty dollars with the growth multiples that they were experiencing you got a little bit of a reverberation trying to figure out where this thing should quite settle but actually pretty remarkable some of the A to B CDDs are actually completing at these price levels. NVIDIA just blew past it which is remarkable we're going to jump to some of these A to B CDD formations right now. NVIDIA probably starts that a leg at about a hundred one oh eight is the low there you make it up to a B point in August of about five oh two so just shy of four hundred bucks to be exact what are you talking about there three ninety two or something like that you pull back to a low okay of three ninety two and so you're talking about a four hundred dollar A to B leg you only got a point two three six retracement on this equity and boom just like that you make eight hundred bucks we're sitting at seven ninety four now what's interesting is that's NVIDIA okay you jump over to the S&Ps pretty similar action which is remarkable on a percentage basis but nonetheless the run of it has had is obviously more substantial but the A to B CDDs are both completing as we speak today the S&Ps I bring this up because at some point folks I mean this is getting pretty remarkable that we've just had the S&Ps trade up a thousand points in just under four weeks four months excuse me four months not four weeks a thousand points okay you get an A to B leg that's about thirty six hundred up to forty six hundred this one retraces to about a fifty percent retracement you saw NVIDIA only did the two three six right but nonetheless your CDD and what do you do you blow past that B point right that was your huge gap from December 11th your C point was down here at about forty one twenty two you got to love it sometimes folks forty one twenty two twenty five and we traded a point and a quarter above that at fifty one twenty three listen with it the way this market moves who knows where we're going to be even in fifty one minutes from right now at the closing bell in terms of the accelerations that sometimes we've had but just taking a little bit of a breather would not be outlandish when you're dealing with this type of an acceleration and it is cool how you get the S&Ps line up right you have NVIDIA they just completed theirs now the NASDAQ 100 could go a little bit higher if everything comes in in terms of where that A to B CDD leg your A to B leg in the NASDAQ 100 you're talking about from a price point of about 10,075 up to your B point there which is sixteen thousand yeah so almost a five thousand leg and then you'd bump from an area of fourteen thousand one forty so that brings you about nineteen four your A to B leg C to D you pull back to a 382 here in the NASDAQ so what do we have NVIDIA pulls back to the 236 S&Ps pull back to the 50% retracement NASDAQ only makes a 382 retracement but if you're going to complete that A to B CDD the NASDAQ might have another leg in it man and you're talking about 1400 points not outlandish for an index trading at 18,000 what is that seven to eight percent something like that to the upside from here the only problem is you got a little bit of a pullback today so maybe it needs a little bit of a breather you jump to some of the short-term timeframes in terms of how we traded at the beginning of the day a lot of selling up here to begin things can't fault somebody anybody in terms of the gains that are in there 185 down to 182.50 for Apple shares you're down by a full percent for Apple Microsoft gives up what seven dollars on the open seven dollars on the open you jump over to Google shares no real huge move although they're dealing with their own animal right with Gemini they really haven't experienced the updraft that many other companies have meta shares trade down twelve dollars from where it was earlier this morning amazon gives up a dollar fifty from where it was 17412 netflix backs off 20 not 10 bucks from where we were earlier this morning some pretty dramatic pullbacks if you weren't benchmarking against yesterday's acceleration of course okay you know you're down by a 30% of the NASDAQ but you are now off about 160 points you've given up almost 1% from the top here again just be aware folks that this run of a thousand points you know in under four months after we just had another thousand point run okay that began less than two years ago in March of 2023 you're going to need a little bit of digestion I think as we come into what's going to be looks to be the the next revolution of AI technology of technology in terms of AI blowing things apart man pretty remarkable now I jump from there pretty interesting this article is up there at the top today Bezos in the video join AI open AI in funding humanoid robot startup it's like the stuff that like Terminator 2 is built on right they could have had that headline somewhere in there in cybernetics cybernetics uh figure AI also gets investments from Intel Samsung and Amazon listen to these companies okay the company's rallied roughly valued at two billion dollars do you know this company I don't know this company two billion dollar company they're raising almost 700 million dollars they're getting it from Bezos, NVIDIA, open AI, Intel, Samsung, Amazon and they're coming folks okay I try and imagine in the world of what it's going to be like for my son Tommy when he's anywhere near my age in his early 40s and you can't do it I don't think you can really imagine right now the cusp of what we're on over the next 40 years let alone the next five years right so this startup yeah raising about 700 million that puts the valuation at two billion and it's not going to be surprising man in terms of they're coming everything's coming I've been always joking with my dad in terms of you know what's it going to be like man Tommy's going to have flying taxis robots at home doing his laundry or whatever it's going to be Jetsons in full effect and NVIDIA is going to be the one that's going to be powering that at least for right now until somebody plays catch up nonetheless they're not there just yet that's for sure all right let's jump over to that gold contract we got some action today to the upside gold you make a run from October up to 2152 and we've been shopping around at this area for some time now gold in between a range of about 2000 and 2100 since about November you're right in the middle of that area but gold catching a little bit of a bid as we get a little bit of a pullback in the dollar index from where we were about 10 days ago right dollar index February 13th up at about 105 we're trading at 104 you jump over to that gold contract not a coincidence right you had gold at about 2000 now you're up to 2050 you got to keep your eye on that dollar index we'll talk a little bit about that dollar and yields when we get back folks we'll take a look at some equities we'll talk a little bit of fed speak as well when we get back stay tuned


and a huge thank you to the first Asian to bring us here as an open source project. We very much appreciate the support here. I'm Kathy. I'm working for Open Source ArtHorse, Artifra ArtHorse organization, and I'm helping with the global community operations. And my talk today is about talking about the internet of things operating system developments under the light smart age. Well, and most of you may already know that we are calling the light smart ArtHorse driving smart devices as the light smart ArtHorse, light smart driving ArtHorse. Here we are talking about the ArtHorse. It's about the real time operating system. And ArtHorse, because of its features like hard real time, low power, fast startup, low cost, it's more likely to be used in the smart home, smart world, industrial control, and smart cities for both the MPU power devices and MCU power devices. Nowadays, we are defining what should be like a perfect ArtHorse to be choose for a project. We feel that the ArtHorse at this moment it should be presenting as a platform to support a wide range of components such as GUI, audio, square framework, network protocol, PASCAS, PASX API, AI framework, and make it up for grace to help developers to quickly get started with the IoT and embedded system. Well, at the age of the lightweight and smart, we feel like that the ArtHorse is more demanding than ever before both from the ecological side and technical side. And it requires more features, it requires more features and both from the, like the PASX API, the chip support, the software ecosystem, the learning resources, the CPU, IP, the torches from the eco side, and from the tech side, it's more about the components, software packages, IDEs, because the MMO supports the security, the high reliability and a lot of more features. So well, today I bring the Artifact ArtHorse project. Artifact is an open source real-time operating system that was born in 2006. It was generally basis, it was generally generated as a kernel and we started this project from 2006. So there are some milestones I'd like to highlight about the Artifact project. By 2007, we released the Artifact IOCOS, it's Internet of Things operating system. And by 2020, we have the Artifact Smart MicroKernel operating system. It's an open source for community developers. So, technical side, there are three versions of Artifact available, one for the Artifact Nano, Artifact Standard, it's for the IOC operating system. And another for the Artifact Smart, the MicroKernel operating system. Well, we will start from the Artifact Nano. The Artifact Nano maintains a simple kernel with less than 5,000 lines of code and the resources consumption can be as low as three KB Flash and 1.5 KB RAM. It has high reliability that has been applied to the field of electricity industry, the consumer electronics and a lot of more. So to get you better understand the Artifact Nano, it's just a simple kernel, yeah, to compare with free IOCOS. So for the Artifact Standard version, because when faced with the complicated application requirements, kernel is never enough, so we create a platform. The Artifact kernel, the components and a lot of more models has been integrated into the Artifact platform. So, and based on the Artifact platform, we introduce the Artifact software packages. Till now we have more than 600 software packages are contributed from the community and some of them from our teams. And those packages cover in the IOC, security, AEI, language, data and a lot of more. So the Artifact Nano is a kernel, but the Artifact Standard is a kernel and has a lot of components and the software packages. Well, along with the development of chips, AEI computing, edge computing, turning into the direction of the terminal devices, the demand for running, okay, sure. The demand for running, the demand for running micro, the demand for running a lightweight, real-time operating system on the chipways, MMU. We call it memory management unit. For ARM Cortex-A and RISC-560, it's gradually increasing. So we put forward our new offer, the Artifact smarts. It is based on the Artifact kernel, but it isolates the user space and the kernel space. It is more like high security as it isolates the kernel into the user space and the kernel space. Well, there is some highlight about the Artifact components. We got finish, we got your log, your test, session view and a lot of more. The RISC-5 ARM and muscle training chips are all supported in the Artifact platform and the community and we put a lot of efforts to make this happen. Yeah, Artifact supports the GNU, GCC, IDR, MDK, KO and a lot of more IDEs. Also, we home-built our self Artifact studio. Artifact studio is one in all and free-to-use ID that we created for the community developers to help them get quickly with the project developments. The Artifact studio ID supports the simulation function. So even if you don't have a hardware platform on hands, you can still use the Artifact studio ID to get started with the work. Yeah, and the Artifact software ecosystem plays a crucial role in the Artifact platform and you know, we got 600 software packages covered in application files such as IoT communication, security, multimedia and so on. Artifact has been favored as the most powerful outdoors in China with the largest installation. Now, do you know we got power two billion devices and we build a community with 150,000 developers participated. Here are some highlights about the Artifact community events as we believe the power of the open source is the power of its community. Yeah, we also have our university program. Artifact opened the Artifact courses in over 100 universities in China and outside of China. And we build joint labs in over 55 universities and we also hold more than two online and offline teacher trainings per year. Also we're sponsoring some contest and sponsoring some program in the university. So we welcome universities and organizations to join us. Also today I bring an AI kit that we create for the university students. Do I still get time to show? Okay, sure. The demo will be shot outside of this event hall. So if you have any interest, just check out with us. Some even highlights. Okay, that's pretty much some highlights about the Artifact project. If you have interested about this open source project, welcome to connect with us on the social media platform. And by the way, I'd like to mention that we are going to hold the 2023 Artifact Global Tech Conference on June 1st to June 3rd. It's online and free open to all the developers. Welcome to join us. Thanks.


The following is a production of New Mexico State University. Welcome to another episode of VEGA, Vegetables in Great Abundance. I'm Carrie Bachman and I work with NMSU Cooperative Extension Service. I work in the area of nutrition education and with the VEGA show we are focusing on New Mexico grown vegetables. As you know, vegetables are very healthy and most of us don't eat as many of them as we really should. That's why we've named this program VEGA. You probably think of a VEGA as one of the main beams that supports the weight of an adobe house. Well, vegetables serve the same purpose in our own diets. They're one of the foundations of a healthy diet for children and adults. So with this vegetable show, we're actually going to be looking at different farmers markets in the Albuquerque area. Now many of you I know don't live that close to Albuquerque, but don't worry. You can call the number on your screen toll free and find out more about New Mexico farmers markets in your location. Farmers markets are a wonderful way to get involved in your community. They have a festive spirit about them. They really support local business, local economies, sustainable agriculture, and they're also a way to get healthier foods to become part of your diet and your family. Now sometimes children say that they don't really like vegetables, but one of the reasons they don't like them is they haven't been exposed to them very often. Think about it, if you don't bring vegetables home very often for your children to eat, when they do have a piece of broccoli in front of them, they're not going to be that excited about it. Much better is to actually go to a farmer's market with your children. Take a look at all the wonderful vegetables that are available. Talk to the people who grew them and who are selling them to you. Get some ideas on how to cook them. Let your kids help choose them. And then when you bring those vegetables home, your kids can also help prepare them in healthy, simple ways, which is what we're going to show you on these shows. Now, if you'd like more information about Vega, you can call to us at the number below on your screen and get some recipe cards, which are free. The recipe cards will show you not only how to prepare the vegetables, but also how to store them, how to choose them, and why they're healthy for you. Now, today we're going to be visiting the Corralis Growers Market. And let's go ahead and talk with Jim Fahey, who is the Market Manager. And after we talk with him, we'll take a look at our first vegetable. We're visiting today with Jim Fahey. He's the Manager of the Corralis Growers Market. And, Jim, we're so glad to be here with you today on the first Wednesday of the market for the season. Well, we're glad you're here. Thanks for having us. Tell us a little bit about the market and how you became involved with it. Well, this market has been here, not in this location, but in Corralis for probably 15 years. Okay. We've probably been in this location for about five years. I became involved after moving here and continuing to grow produce at our house and reaching a point where my wife actually said, you need to get rid of some of this stuff. And fortunately, there was an outlet where I could advance my hobby and actually use the monies obtained here to do more work at my place, to improve my place. Wonderful. So over time, in order to keep it a safe environment and to keep it running, you get involved. And so now this year, I'm the Market Manager. Okay. Well, that's great. And farmer's markets are really interesting collections of people. You've got growers small and large who come here with all different kinds of produce. And we're going to see a little bit of what Jim's Market has to offer in a second. Jim, I understand you're also a medical doctor. How does that impact your interest in vegetables at all? None. None? Well, as a nutritionist, that's one of the things that we try to do is make the connection between agriculture and the health of the human beings who are actually eating the food. And that's one reason we're featuring farmer's markets as a great source of healthy produce. Yeah. Do you eat a lot of produce yourself at home? Yes. Sweet. Everything we grow and most of our purchases at the grocery store are things like milk and cheese and occasionally eggs and meats. But we've pretty much grown our own produce for many years. Our kids grew up on this kind. No, I use this as an outlet. This was my method of relaxation. It wasn't developed or I didn't get into it because of my medical practice. Okay. It was just something to do to keep me busy and to get away from the medical practice. I mean, the stresses of it. Well, the stresses of many of our jobs are something that we need to be aware of and also balance with healthy activities like gardening, which is something, it's healthy to eat the food, but it's also really healthy to actually go out and grow the food and prepare it yourself as well. So thanks so much, Jim. We're going to go ahead and take a look at some of the vendors here today and we'll be back to visit with you in a bit. We really appreciate you being here. Thanks so much. Thank you. Well, I have found some wonderful garlic at the market and I'm here to talk with Bonnie Gonzalez, who's actually not the grower of the garlic, but a friend of hers grows it and tell us a little bit about how that works. Gail Levine owns Sensational Seeds here in the village and she has done garlic this year. This is an Italian purple neck garlic and it's got a very wonderful flavor and it's just a beautiful garlic and it's an early garlic, so thus it's here in June. You don't usually see garlic until later in the season, but she has done several varieties and this one is her early one. So if we wanted to keep this safe for a couple of weeks, how would you recommend storing it? I think pretty much as you would store a potato or any other fresh, you know, tuber. All right. You don't want it to get wet. You don't want it to get, you know, completely dried out. And you don't want it in the refrigerator. And you don't want to refrigerate it. Absolutely. You're right. Oh, it does smell. It almost smells sweet a little bit. It is. Does this have a different flavor than other varieties of garlic? Do you know? I wish I were more of a garlic expert. Cook it up and let's find out, you know. You guys are going to cook it, right? Well, you know, in fact, I'm not sure if we'll cook it or actually eat it raw. They're just eating it raw. I mean, it's so fresh. I'm tempted to chop it with a little bit of olive oil perhaps and eat it with bread in that form. So we'll see. I haven't decided yet. But it really is wonderful. And especially to see garlic this time of year, it's not usual. So you can come to the farmer's market and find things. You won't even know necessarily what you'll find from week to week. There are always new vendors. And as Bonnie said, you know, sometimes a vendor can't make it, but the vendor will send her stuff with somebody else. Someone else who's signed up for the market, should. It's a really nice kind of community, it sounds like, of growers. Yeah. Well, wonderful. We're going to get, I think, I think we'll go ahead and get all of this garlic, actually, that you've got out of the bags. It looks so beautiful. I can't pass it up. Check it out here. Check it all in one. That's fine. Well, here we are back in the kitchen with this lovely garlic that we bought from Bonnie. You may think of garlic as something that you always cook and put into an Italian sauce or some kind of a pasta dish, but I'm going to show you a couple of ways to enjoy garlic today that really make the flavor shine through. Now, that's one thing when you're buying garlic at the farmer's market, you'll come to realize there's so many different types of it. And as when I asked Bonnie at the market if she knew what this flavor was like, she suggested that we do a taste test and so that's what we're going to do today. I've actually got some of her beautiful purple, I've got some of her beautiful Italian purple garlic here. And you can see, look at that gorgeous color inside on the cloves themselves. Just beautiful. This is just one of many, many different types of garlic. Now, this garlic that I have here looks probably a little bit more familiar to you. It's a larger head and then you'll see that the cloves break off fairly easily and are fairly large. This is a soft net variety and so it's one that you normally find in the grocery store because they keep a little bit better than hard net varieties. What we're going to do today is actually a taste test comparing this Italian version that we got at the farmer's market with the grocery store version. Now, one really nice way to do that is to actually just go ahead and chop up some garlic. So if you've got a head of garlic like this, you can sort of separate it with your fingers. This one's pretty easy to separate and discard some of this extra papery skin. And then what you can do is take a clove or two and just gently with your knife, smash it. What that does is it starts to remove this papery skin from the garlic. And the skin is not something that you're going to be wanting to be eating. And this is a really easy way of doing it. You also can use a garlic press if you have one. But to be honest, I kind of like... I kind of enjoy getting the smell of garlic on my fingers. Now you want to then go ahead and split the garlic in half. If it's got a little green thing inside, you want to cut that out. This one doesn't. That can sometimes be a little bit bitter. Go ahead and split them in half. And then what you can do is go ahead and just coarsely chop being careful of your fingers, of course. And it doesn't really matter how fine or coarse you chop your garlic. I mean, it can be eaten both ways. In general, when you're cooking garlic, the finer you chop it or mince it, the more flavorful and strong it's going to taste. Whereas if you cook with a whole clove or just very lightly chopped, it's not going to have quite as much flavor. So we've got this here. Let's go ahead and we can mince it a little bit more. And then what you can do, if you'd like to do a puree, you can kind of rub the garlic on the side of the knife a little bit. And you'll see that it purees pretty nicely here. Well, we're running a little short on time, so what I'll do is put this garlic into this dish. A little larger than we need it to be. Add some olive oil. And let's have it taste. Delicious. This is a special surprise. Mary Jane Rodriguez is here at the Corralis Grower's Market. Now she prepares by hand a whole bunch of different kinds of soaps, and she grows all the herbs herself. The other thing that I've discovered is she also makes jams and these wonderful butters here. The ingredients in it is, of course, a prickly cactus fruit. I used sugar and lemon, apple instead of the pectin, because pectin does come from apple, and the apple that I used does not interfere with the taste of the fruit. I use honey, which also brings out the fruit flavor of your fruit that you are processing, and then my little secret ingredient in there, tequila and a little dash of cinnamon, and that's how I prepare it. This is just such a beautiful color. You can see that if you're familiar with the prickly pear fruit, which is also called tuna, you see these growing all over in New Mexico, and most people just kind of let them fall off of the plant. Yes, they do. My grandmother used to make a cactus candy and also the jams. So this is really kind of a tradition that you're continuing on? Actually, I didn't get the recipe from her because it was lost in her belonging, so it just took me a while to develop and come up with what tasted like her jams. Well, it is a real traditional food. When I saw it here, I thought, we've got to have this. And unfortunately, it's Mary Jane's last jar, but at the end of the summer is when you're getting more of the fruits, right? That's where the fruit will be ready. And so then you'll be making a larger batch again, which hopefully will last for those of you who want to come to the market in the future. Well, thank you so much. Now, you may be wondering, what on earth are we going to do with garlic and prickly pear butter? Well, let me show you. I've gone ahead and mashed up a couple more clothes of that delicious Italian purple garlic. You can see it's kind of a cross between a puree and a mince. And we've got that in this dish. Now what we're going to do is add some of our lovely prickly pear butter. Look at the color of this. Is that not amazing? There's no other fruit that I can think of in this color as well as the texture and the flavor. It's a little bit pulpy. And in fact, the prickly pear is a great source of fiber. A lot of people are discovering that it can be a good part of a healthy diet and a way to get fiber that you may not normally think of. So we're going to add in. There's no measurement involved in this recipe. Add in some prickly pear. We'll add a little bit of oil. Now, I actually probably would like to use a slightly milder tasting oil, just fine. Now you want to choose something that's a little acidic. In this case, I've got some rice vinegar. That's a little milder than some of the vinegar's. Balsamic vinegar would also taste very nice. Just a little bit. And then in terms of seasoning, got a bit of salt here. Just add a touch. You don't need it too much. A little bit of pepper, freshly ground. And then I'm going to add just a tiny bit of honey. There's already some honey, as Mary Jane said, in the the prickly pear jam. But we're going to add just a bit more. Just a little touch for sweetness to counteract that vinegar taste.  Now you may say, well, I don't have any prickly pear butter where I live. Well, if you live in New Mexico, it's likely that you probably have prickly pears near where you live. And in fact, you can make your own prickly pear puree. All you need to do is get some tongs or a long skewer. And you can find your prickly pears. Summertime, early fall is when you're going to find them. Right now, we don't have any to show you. I wish that I did. You want to be careful when you pick them. Use the tongs or the skewer because they've got tiny little spines on them that will get in your skin and make you itch. So anyway, once you've picked them, you can go ahead and peel them to get rid of all of that skin. And then press them through a sieve or a strainer and you'll have some really nice puree. You can then add to salad dressings like this. You can freeze it for later use. You can put it in teas, lemonades. Prickly pears are actually grown on the nopal plant. And the leafy part or the stem of the nopal is also an edible thing. And in fact, I think on a later show, I'd really like to show you how we can prepare that as well. And both parts of the plant, as I mentioned before, are high in fiber and very healthy. And it's a traditional plant that most of us can grow and for free. So here we are at the farmer's market. We found a prepared product, but you can find it yourself and eat it at home. I hope you enjoy your prickly pear investigations. Well, so far today we've gotten some garlic, some prickly pear butter, and I'm back here with Jim, the market manager. And Jim, can you tell us about this crop? I pronounce it as indive. I've been told it's on-dive. And we also have Jan with us as well. She's a master gardener from the Sandoval County Extension Office. Jan, you have actually had some experience cooking with on-dive or indive. Tell us a little bit about what you do with it. It looks kind of like salad, but I understand it has a different flavor. Yeah, well, it's it's more bitter. Okay. If you don't want to use it as a green and salad, you can as I had mentioned to you earlier, the French that I knew would cut it up and saute it with onion and then when it was wilted somewhat, throw in some spices and then pee. Jim, you told me this is the first year growing this for you. Oh, yes. You're always experimenting with new plants? Sure, because, you know, it's a couple of years ago, actually about three years ago, I grew some Armenian cucumbers. Those are delicious. And they're wonderful. They're very unusual looking, but they're very tasty. So yeah, we try to see what grows well and to see how it tastes and see how it how it can survive our temperature. Exactly. And the soil. We don't know what kind of pH this thing needs to grow, but it seems to be doing okay. It sure does. Well, we're looking forward to trying it. I'm not sure yet if we're going to cook it. We're going to eat it raw. It's pretty bitter. Yeah, I think you're going to want to cook it. Yeah, yeah. Throw some balsamic vinegar on it. And garlic. Chilies. You know, this is one of the joys of coming to farmers markets. You can find vegetables that are totally new to you and get some ideas from the folks who are here about how exactly to prepare them, take them home, and it's really kind of like a fun experiment. And you're eating something healthy and supporting local farmers at the same time. After the market visit yesterday, I did a little bit of research on this endive that we've got in front of us. What on earth are we going to do with it? And in fact, I realized it's something that I actually am a little bit familiar with. Endive is related to a food that's very commonly eaten in Italy called escarole, and also to radicchio, which you might know. These are all kind of frilly greens that look like this. Some of them are a little bit more bitter than others. This endive is actually called and you can see how curly the leaves are. And it's quite different from the Belgian endive, which is actually grown blanched and is sort of in a conical shape and is very expensive. Now what are we going to do with this today? Well, I decided we would go ahead and rinse this and use it as a salad green. So all you need to do is basically pick off the stems, just as you would lettuce, and then dunk them in some water, swish them around, and you can break them into a better size if you want to use, you know, slightly smaller pieces. But don't throw away the stems. The stems are just fine to eat, too. Look at this gorgeous, gorgeous green color. Drain off some of that water. And then we've got our dressing ready to go on top. You can see we've got that prickly pear color shining through. And you're not going to need a lot of the dressing. That's probably even more than you would want. But you can just see what a beautiful presentation that would be on the dinner table. This is something that kids are really going to like to eat, too. The sweetness from the prickly pear will offset the bitterness from the curly endive. Now, what else can you do with this endive? Well, there are a lot of great things to do with it. One thing, you can put it into soups. And that's an easy way to prepare a vegetable that you're not very familiar with. One way that the Italians like to prepare it is putting it into a dish that has pasta, and then also some white beans. You can use any kind of beans that you liked, those are black beans. And you basically saute the endive in some olive oil with our friend, the garlic. And you've got a really nice, light, healthy sauce to serve on top of pasta. One other thing that I would like to remind you all, don't be afraid of trying these unusual vegetables at the farmer's market. I didn't know exactly what I was going to do with this, but I went ahead and bought it, did a little bit of research, talked to some people. And we came up with this wonderful salad using fresh ingredients that are locally grown right from our farmer's market here in Corrales. Now you're not going to find necessarily these same ingredients in your market, but what you do find, be sure to be adventurous and make a delicious vegetable dish. Well, here we are at the Corrales Market and look who we've run into. Actually, these are some of my colleagues also who work for the Extension Service, but as volunteers. Jan and Therese are both master gardeners of the Sandoval County Cooperative Extension Service. Tell us a little bit about why you're here today at the market. Well, there's one reason is to get gardening, good gardening information to the public. The second reason is as volunteers to keep our master gardener status, we have to contribute 40 hours in Sandoval County. It varies from county to county, but in Sandoval we have to put in 40 hours of volunteer service. This is our means of getting our volunteer service. Great. Plus providing a lot of really necessary information, I think we tend to focus quite a lot on zaret gardening and the correct ways to do things in our climate for water conservation, in addition to every conceivable thing one might imagine. And we try to solve problems or we take it to the agent, the extension agent if we don't if we can't do that, but it's I think it provides quite a useful service. Well, it's really nice to see you all here because again, it bridges the gap between buying your food at the farmers market and actually growing some of your own food at home. And that's something that everybody can do. I mean, I'm a gardener, but certainly not an expert. I'm sure you all have had a lot more experience than I have. Yeah. A lot of failure. And that's part of the joy of gardening. You never know what's going to happen. You know, extension does so many different things and as a nutrition person, one of the services that we offer in our county offices is nutrition education classes, which are called ICANN. And if you're interested in enrolling in these classes, you can just contact your local county extension office and also contact your county extension office and find out if they have a master gardener program going on. You can join it and become a volunteer. Or as Jan said, you can call up with any kind of question you might have and there are people there ready and willing to help you. Yeah. And in general, everybody, you know, if we don't know the answer, we find out. The best part is everything is free. You're never a charge. That's true. Yeah. That's right. And thank you all so much for donating your time to not only the Coralus Growers Market, but also to all of the gardeners and growers in this part of the state. We really appreciate it. It's our pleasure. Thank you so much for visiting with us. Well, thanks so much for joining me for this episode of Vega, Vegetables and Great Abundance. We've had a wonderful time visiting with Jim Fahey and some of the growers at the Coralus Growers Market. Now, you probably are thinking, well, I don't have a market like that near me. But don't worry, this is a market you just need to investigate. Give this phone number a call that you see on your screen now. And it's a toll-free number that will let you know where farmers markets are in the state of New Mexico, what their schedules are. Some of them are on the weekend. Some of them, like this Coralus Market, operate during the week as well.  Now, you remember, we started off with the garlic in this show, and you can see here, it's so beautiful and purple. Compare that to what you get at the grocery store in this container of garlic powder. Not to say that garlic powder doesn't have its uses, but what you're going to find at the farmers market is so much fresher, so much tastier, and there's so much more variety. You'll find several varieties of garlic that you can taste test side by side when you get home. Decide what you like the best. And as the master gardeners have just shared with us, you can also plant your own vegetables as well. Kids really get into planting vegetables. Some things like garlic don't take very much care. They'll take about half a year, seven or eight months to come up, but once they do come up, it's really exciting for children and for the adults that are looking after the plants as well. We've made this beautiful salad today, and of course you could modify this. You could find the same ingredients at your farmers market, but that's part of the joy of exploring at the local market and visiting with local growers. You could add New Mexico fruits, other vegetables like snap peas, serve this with a nice hearty loaf of bread, and you've got a very light summer meal that everyone in your family is going to enjoy.  Part of the reason children don't like vegetables nowadays is that they're not very familiar with how vegetables grow, what they look like as they're coming out of the ground. And it's something that kids get more familiar with if they get to choose the vegetables and prepare them in simple ways like this at home, they will actually learn to like them better. Just be patient with your kids. They're not going to like everything, but that's okay. And be a good role model, too. That's a very important piece of being a parent.  Remember, you can call us at the toll-free number below if you would like to get some Vega vegetable cards that tell you how to prepare some of the vegetables we've seen on the show, as well as how to store them. Until next show, I hope that you will visit your local farmers market, support our local agriculture, and enjoy some healthy, fresh produce while you're at it. We'll see you in the next episode of Regents.