All right. Hey, guys, Welcome to another econometrics tutorial. And in this one, we're gonna be making a supply function, Um, and using some instrumental variables to help predict the quantity a bit more accurately. So our sorry, the slope of the split A bit more accurately. So of course you're gonna want to start by opening up the package Wooldridge and then the data set cement, And then you're gonna want to create your supply curve. So okay, first a little bit about the data for cement. So the the package here has a lot of, uh the data set has a lot of data on cement. As you might imagine, by the name, the important ones we're going to be using are the growth in the price of cement, which is G p r. C. The growth in the quantity of cement, which is GCM, and then gpr Cpt, is the growth in the price of crude petroleum. And then here we have a bunch of dummy variables for each month because the growth rates are calculated on a monthly basis. So it's good to have that along the side. So let's go ahead and run the linear model and let's see what our B two is, which would, you know, be the coefficient for our, um, growth in cement quantity, which for the supply curve, is the slope. So over here, our B two is so your basic economic knowledge might be screaming out at you because typically when you think of supply curves, their upward sloping. Um, but here are B two, so our slope of our supply curve is actually negative. It's a negative 0.44 So that is indeed quite weird. So to see if we can maybe find out if there's anything else affecting the the quantity here, we're going to use some instrumental variables. So first, of course, you have to open up the A A R package to be able to use the instrument instrumental variable function in our. So do that. And then we'll make our instrumental variable equation here. So if you might remember from some of the past videos, you, um, write your equation as normal, and then you put a vertical line there and then you write the reduced form. So what that would mean is basically, write the equation the same again, but remove what you want to be using instruments for, and then add the instruments on the end. So in this case, we're gonna be using G deaths, which is the growth in monthly government spending on defense. Um, and then we'll get the summary of the and the diagnostics to have a look at the instrumental variable tests. All right, so since we just have one, we don't have to worry about the sergeant test. Um, well, right off the bat. The weak instruments, instruments test. We're not rejecting the null hypothesis. So government defense is a week instrument for the growth rate in, uh, cement quantity, which kind of makes sense. I don't see much connection in my brain right there, but it was worth a try. He had data on that in his data set here. So what we could try instead is some of the other variables he has in here that might be a little bit more related. Um, he doesn't describe what they arginine and gear s here. But G rez is the growth rate in residential construction spending. And Jenin is the growth rate in nonresidential construction spending, which could have a pretty big impact on the quantity of cement, as you might imagine. So we're going to run that and get the summary for it to see how these instruments fare in comparison. Alright? And already there are much better. If you look at the P value, it's very for the week instruments test. It's very small, so these are strong. These are very strong instruments and for the sergeant test, because now we're dealing with two. We have non residential growth rate and construction costs and residential growth rate and construction. So for the sergeant test, the null hypothesis is that all of the instruments are valid. And since the P value is pretty high there, we're not gonna be rejecting that. So both of those are valid and good to use. So we we got to remember in the beginning we had a weird slope. So we have some instrumental variables being used here. So let's see if they changed the slope value at all. Now that they're being applied to the growth rate for cement, let's have a look. So when you check the coefficient on the growth threatened cement, we see that it's still negative, but to a much lesser degree. So the fact that we have kind of flattened this a bit would lead you to believe that the slope, the slope of the supply curve here for the the cement industry, wherever this is, I assume it's in the States is rather flat, and we can actually cheat a little bit. Um, to help confirm that, uh, to help confirm that assessment by just plotting the data. So if we plot the the growth rate in cement as our X and then the growth rate and prices are why we can have a look and see if the supply is indeed flat. So there you go, looking here at the at the graph. I mean, of course, there's a bunch of outliers everywhere, but more or less, the slope here is flat. So yeah, the supply for, of course, they're dealing with growth rates, but the supply for that is relatively flat. And that is everything for this one. So thank you. And I'll see you guys on the next one