Number of Nice Days

I’m relatively new to Birmingham, Alabama. I was nervous about moving to a place with famously long hot humid summers. My intuition since moving here is that there are many days throughout the year when, at some point in the day, the weather is nice for doing something outside with my kids.

Yesterday, Sunday, was very nice. To have such a nice warm sunny day in mid-December is strange to me. I grew up further north where Decembers are chilly. Here is a picture of a neighbor’s son enjoying the summer-like feel of this technically-winter day. This picture was taken at noon.

Although I am grateful for this particular day, I also think about the hot summer days when noon is a time to hide indoors with air conditioning. Is it nice here? How can that question be answered scientifically?

There is actually a great map of answers, available on several websites, credited to Brian Brettschneider, thanks to data from Iowa State.

This map confirmed my intuition. My old life in New Jersey was in the dark green zone, and my new life in Alabama is one level better, in terms of how many “nice” days you can expect in a year.

If you don’t have climate control, then you might be more worried about weather extremes. If you are lucky enough to have a regulated indoor environment, then a nice place to live is largely a question of how many days you get when it’s nice to “go out”.

This map accounts for “nice days”. I wonder if New Jersey would seem closer to Alabama if the measure changed to “nice daylight hours”. Yesterday was beautiful, but it was dark by 5pm. When I get time, I’m going to make a map of where in the lower 48 you can enjoy dinner outside after work many times per year (and why is it Southern California?).

Ball and Romer Sticky Prices as Coordination Failure

In the course of research work, I read “Sticky Prices as Coordination Failure” today, published in 1991 by L. Ball and David Romer.

They suggest that “coordination failure is at the root of inefficient non-neutralities of money”. They write an elegant theory of price setting and adjustment that includes a menu cost. A menu cost is imposed on an individual who adjusts prices. The name comes from the fact that some restaurants face a literal cost for switching the paper menus.

If changing prices is costly then there is inertia. People tend to stay where they were before, even if adapting to fluctuating external conditions is more efficient.

According to their model of rational individual agents, people will change if the expected benefit of adjustment is larger than the menu cost. In some cases, the optimal action for an individual depends on what others are doing. Thus

Increases in price flexibility by different firms are strategic complements: greater flexibility of one firm’s price raises the incentives for other firms to make their prices more flexible. Strategic complementarity can lead to multiple equilibria in the degree of nominal rigidity, and welfare may be much higher in the low-rigidity equilibria.

An implication is that if you are surrounded by people who are open to constantly changing, then you yourself will be more likely to adapt. The world is always fluctuating, so welfare is higher for communities that can adapt quickly. Example of changing circumstances include global warming and novel safety procedures suddenly needed during the time of Covid.

In this paper, “multiple equilibria” means that a community might settle at a high-wealth level or a low-wealth level simply because of what everyone else is doing. Ball and Romer don’t try to figure out which equilibrium is more likely to be the outcome in reality.

No one in their model would be out of equilibrium (unnecessarily poor) if it were not for the “sticky” prices. As the title implies, coordinating the optimal levels of production and consumption is difficult because of the inertia of prices.

In their conclusion, they reflect on the role of government when multiple equilibria are possible:

… with multiple equilibria, policy can be less coercive. Instead of prohibiting certain contract provisions, the government could simply convene meetings of business and labor leaders to coordinate adjustment … Second, by moving the economy to a new equilibrium, temporary regulations can permanently change the degree of nominal rigidity.

They assume that after a recession, the price adjustment that needs to happen is “for decentralized agents to reduce nominal wages in tandem.” It’s interesting to see, culturally speaking, how hesitant they seem to strongly recommend government intervention through inflation. I feel like writers in econlit today would not be shy about saying they think governments should intervene through monetary policy, if they believe that to be true.

In my JEBO paper, I found that a little inflation caused workers to not lower production so much in response to a real wage cut after a recession. In our environment, I would say “cooperation” was more important than “coordination”, because there were only two agents and their decisions were sequential.

Visual Decision Trees in SAS Viya

As I said earlier, I used SAS Viya for Learners this semester. I assigned a final project for students. They had to use the data pre-loaded into the free version of SAS Viya, but otherwise had freedom to select their own variables and construct their own research question.

SAS Viya for Learners just recently opened for any users to make an account. This will allow you to learn SAS Viya functions (but not do your own actual work, because you cannot import new data). I’m using SAS Viya 3.4.

I like the way SAS Viya allows users to create a beautiful intuitive interactive decision tree model. This blog is to show you what that looks like. In traditional EconLit, regressions are more popular than decisions trees. Decision trees are a simple and useful machine learning technique. If you are trying to teach a first-timer about decision trees, then the visualization in SAS Viya for Learners can be helpful.

I’ll demonstrate using a decision tree for classification using built-in SAS data. One of the larger datasets available is USCENSUS1990. I’ll use it to demonstrate (and I do love the 90’s!). Consider the variable about the number of children a person has. This could be reasonably predicted by age and education level. [Footnote 1]

Here’s a chart showing the frequency of family sizes for adult women. (I used a Filter to only include people who are not coded zero in iFertil. See Footnote 1.)

For adult women in 1990, the most frequent category is to have more than 2 children. This would include the parents of Boomers. Think about those big families you know from the Boomer generation.

For input variables to my model, I’ll use age categories and also education levels. I set the new categorical variable I created called NumberChildren as the Response variable for a decision tree model. [Footnote 2] Here’s a zoomed out picture of the visual model output.

It’s immediately obvious that age is more informative than schooling. Women under the age of 30 are much more likely to have no children. The width of the grey tree branches makes it easy to see where the majority of the observations are.

I’ll zoom in on the left side of the tree where most of the people are.

The “>= 4.25” means that women on the far left side are over the age of 40. Among older women, the norm is to have 2 or more children. If you are looking for the older women with exactly two children, you are more likely to find them among those who have an education score of larger than “13”, meaning that they have a Bachelor’s degree or higher.

My point is not to posit causal relationships among education and fertility. My point is how awesome these graphs are. You do have to learn some point-and-click functions within SAS Viya to make them. But I don’t know of any other software that can produce this.

SAS Viya also provides tables and statistics on each node, which is more like what I could get from free open source software a few years ago when I looked into decision tree packages.

[Footnote 1] If you want to replicate what I did, know that the USCENSUS1990 dataset in SAS Viya comes with no explanation. Google brought me to UCI, where I found what I needed in terms of technical documentation.

dAge, iFertil, iSex, iYearsch are the names of the variables you will find in SAS. To create my graphs and models, I converted some of them to categorical variables using the “+New Data Item -> Custom Category” functions. No programming is required.

iSex: 0 indicates Male, 1 indicates Female

dAge is coded as follows: 0 is babies; 1 is under 13, 2 is under 20 (but over 13), 3 is under 30, 4 is under 40, 5 is under 50, 6 is under 65,  7 is for 65 and over

iFertil is coded: 0 is either less than 15 years old or male, 1 is no child, 2 means they have one child (confusing…), 3 means they have two children, all the way up to a 13 which is the code for 12 or more children

iYearsch:  3-10 refers to primary school up to a 10 indicating graduating from high school, 11-13 refer to some college and associate degrees, 14 is a Bachelors degree, 15-17 refers to higher degrees

[Footnote 2]  I decided to set Maximum levels to 5 in Options. This keeps the tree smaller which looks better in the blog.

Civil society and purpose

Any discussion of building a humane economy that addresses important needs like purpose, security, and opportunity would be incomplete without civil society — the third sector composed of our families, churches, affinity groups, and civic organizations. 

In this post, I will touch on purpose. This year our conversations have been dominated by COVID-19 and discussions about the costs and benefits of state and local policies. In August 2020, the CDC released a report on the mental health effects from the lockdown and the results leave one stupefied. Among young adults (18-24 years old), 25 percent had suicidal ideation. One of the authors’ proposals includes “promoting social-connectedness” suggesting the dearth of community played an important role.

The anguish described above also calls to mind recent attention on “deaths of despair”. This refers to the rise in mortality among middle-aged white men starting in the late 1990s from suicide, overdose, chronic liver disease or cirrhosis. What causes these deaths of despair? In their book Deaths of Despair and the Future of Capitalism, Anne Case and Angus Deaton write,

“Destroy work and, in the end, working-class life cannot survive. It is the loss of meaning, of dignity, of pride, and of self-respect that comes with the loss of marriage and of community that brings on despair, not just or even primarily the loss of money.”

This is also reflected in Marco Rubio’s plea for a common-good capitalism where he cites deaths of despair as a ripple effect from an “economic re-ordering” and holds up the primacy of creating jobs that provide dignified work. This is important. As Adam Smith has noted, “Man naturally desires not only to be loved but to be lovely,” and work helps a man to feel he has made a contribution and is deserving of love and respect. At the same time, I want to resist the temptation to think despair flows only from economic conditions.

In his book Sickness Unto Death, Kierkegaard claims that humankind falls into despair when we have a misunderstanding about who we are as human beings. But, for Kierkegaard this despair can serve an important role. Despair signals our need for God, the only one who can heal our despair. A couple years ago at the Southern Economic Association meetings, I saw some preliminary work that suggested these deaths of despair were pre-dated by the decline in occupations but actually corresponded to earlier declines in religious participation. In order for life to have meaning, a person must have faith, and that faith is sustained in communities.

The key point is this: Man cannot live on economics alone. More depth is needed and this can be found in our communities. If a person removes themselves from important communities that can have a negative impact on their flourishing.

Here is a question: Before the fall of man, was everything perfect in the Garden of Eden? No.  “The Lord God said, “It is not good for the man to be alone. I will make a helper suitable for him.”” (Genesis 2:18) We want to love and to be lovely. There must be some other for us to direct our love and receive love from. And, while that other could be a higher power like God, even Adam before the Fall, wanted that love to come from another human. Small groups like our churches provide the context through which this natural inclination can be pursued. Obviously there are other groups too like families, recreational organizations, civic organizations, etc.

Small groups can be chosen for different reasons and with different levels of commitment. This is a good thing because it is akin to a portfolio of identities. Having many different communities where we can engage different pursuits seems preferable to worship at the altar of politics. When we talk about a life well lived, human needs like purpose, security, and opportunity seem important to meet. Economics and work are important for that sense of purpose but we should not overlook how a lack of community can lead to a loss of purpose.

Reflections on Teaching in Fall 2020

As the Fall semester comes to close on college campuses, it’s a good time to reflect on and assess how the past semester went. Many universities went to almost exclusively virtual learning, but other schools tried to make Fall 2020 as normal as possible given the circumstances of the COVID-19 pandemic.

My school, the University of Central Arkansas, chose the route of trying to have things as normal as possible — by which I mean students live on campus, classes are mostly in-person — while still accommodating students and faculty that preferred a more physically distant atmosphere. For example, UCA increased the number of fully online courses available, roughly trying to meet faculty and student demand. I normally teaching one online course per semester anyway, and I continued that this semester. Other faculty had more online classes than usual, or moved their class to be partially online.

So what was my experience?

First, the students, the most important part of the teaching process. Overall, I would say my students did very well. At least in the classroom, they complied with all the rules the University set forth: wearing masks, physical distancing in classrooms (seen in the image below), even the one-way entrances and exits to the building. There were only 3-4 times I can recall this semester when a student entered my classroom without a mask, and they immediately asked me for one upon realizing their mistake (I kept a pack of surgical masks with me).

My classroom at the University of Central Arkansas, with chairs blocked off for physical distancing.

As far as academic performance of students, I was very pleased with the students. For those students that were able to stick with the class and keep up, which was most students, they perform as well or better than previous semesters. Some students, due to personal circumstances, had trouble keeping up. I tried as much as possible to accommodate students in these situations, by being flexible with deadlines, offering additional resources, and generally just trying to listen to them and empathize. It was hard for everyone.

On my end, I tried to make the teaching atmosphere of the classroom as normal as possible. I usually do have some interactive aspects of the classroom, where students work in small groups, talk to their neighbors, etc. Most of those activities didn’t happen, unfortunately. But otherwise, the classroom atmosphere operated as usual.

As my students did, I also wore a mask in the classroom while I lectured. For students that had to miss class due to quarantine, isolation, or other reasons, we were asked to record every lecture and have an option for students to watch the lecture virtually if needed. Making sure that the video was properly recording and the I had set up the Zoom link for students that needed to be remote added an extra element to think about at the beginning of each class, but it was the kind of thing that once you get used to it, it just became normal.

I will say that I often felt very exhausted after teaching each day. The mental load of making sure everything was working right in the classroom, combined with the constant sense of doom in the world around us, made this a challenging semester mentally. I’m sure this was even more true for some of my students. But, we made it.

Finally, how about the administration of my University. I’ll bite my tongue a little here: I am up for tenure this year! But really, I don’t have anything major to complain about. Guidance was communicated well, although sometimes big changes were rolled out a bit more quickly than the faculty liked. UCA provided isolation and quarantine dorms for students, though these never came close to capacity. Weekly updates on testing, cases, and related data were provided to everyone (and made publicly available, so I’m not revealing any secrets here).

Testing data for UCA students. This data excludes athletes, since they were required to get tested regularly, which could have skewed the data.

As you can see above, the general student body at UCA did report positive COVID cases every week. And some weeks the positive test rate was a little higher than I was comfortable with! But we never had a large spike in cases, and the University held firm to its commitment to offer in-person classes for everyone that wanted them, as long as the campus was generally safe.

All in all, I think it was the best semester we could have had under the circumstances. The only thing really weighing on my mind: we are going to do it all over in the Spring semester. And we’ll do it as well as we can.

Thanks for the Patent System

Although I write on a variety of subjects, my main professional training (through the PhD level) is as a chemical engineer. Chemical engineering is one of the broader technical disciplines. It bridges between chemistry, which is mainly associated with academic-type laboratory work, and huge chemical plant equipment. One year I was making and testing catalysts in the lab, then next I was calculating fluid flows and designing internals for a 100 ft high distillation tower (and climbing around inside that tower to insure the parts were being properly welded in place):

In my work in industrial research, I have been paid to develop technical improvements which could have economic value. A key incentive my company had for investing in this research was the expectation that if we came up with a novel improvement, that we could have exclusive rights to practice that improvement. There would have been little point in paying for research if our competitors could immediately make use of our hard-won insights. A snip of one of my patents is shown below.

For the world, and for most large groupings such as nations, the average income per capital is roughly equal to the average production per capita. The way to get more “stuff” (goods and services, and all their benefits) is to make more stuff. The way to make more stuff (per capita, and for fixed a workweek) is to make workers more productive. A key factor in productivity is technology. Two hundred years ago, nearly everyone in the U.S. had to be out in the sun and cold, working the soil, sowing by hand and plowing with the aid of animals, to grow enough food to feed everyone. Now I believe we are fed by only 2% of the workforce, using artificial fertilizers, improved seeds, huge tractors and combines, and satellite-aided computer scheduling. Most of the rest of us get to work in air-conditioned offices (or homes, in a pandemic year) and eat as much food as we want.

The patent system of the U.S. and other nations is designed to promote progress in productive technology. Early on, the newborn U.S. Congress passed the Patent Act of 1790, titled “An Act to promote the progress of useful Arts”.  Without getting into all the legal details, a valid U.S. patent allows the inventor to exclude any other party from practicing their invention, for a period of twenty years. However, one of the requirement for a patent application is to clearly explain to the public how the invention works. When the twenty years is over, anyone can take advantage of the technology which the inventor has disclosed, which hopefully leads to widespread practice of technical improvements. While we can always ponder improvements to our system of patents, readers can thank it in part for many medical advances, and for delivering them from trudging behind a plow.

Alabama’s Covid Data Hero

Housekeeping: There was no post yesterday on Economist Writing Every Day. It was my day to write and family responsibilities just took up every minute. This might happen occasionally.

Last week I wrote about American Data Heroes. There are many that I don’t know of , but I wanted to share the work of tireless Frank McPhillips. For months he wrote a succinct post every single day within a private Facebook group for concerned citizens of Alabama. Recently he switched to Substack, meaning I can share it here.

McPhillips summarizes and explains the Covid data for the state of Alabama, where I live. This is data that is publicly available, but most people like myself don’t want to do as much work as he does to understand it. He also understands when the reporting might be wrong or late.

I’m going to quote from his most recent posts.

Dec 5:

The Chairman of the Madison County Commission was more blunt. “We’re now talking about alternative space for a morgue”, he said, adding that he has never faced such a decision in 25 years of public service.

According to HHS, 87.7% of Alabama’s ICU beds are occupied… Our State added 3,390 more COVID cases today (incl. 655 probables), raising the 7-day moving average to 3,228 cases per day, which is twice the daily average 3 weeks ago.

Dec 6:

With 473 more cases, Birmingham’s home county, Jefferson, has a 14-day positivity rate that tops 30% for the first time. 

Dec 7:

Now, brace yourself for the updated hospitalization data:  2,079 patients (105 reporting hospitals), a jump of 163 patients in a single day. The Huntsville Hospital system reported 378 COVID patients, an increase of 76 patients in one week. DCH Health system reported 138 patients, double the number just 9 days ago. And finally, Regional Medical Center (Anniston) announced new visitation restrictions due to the pandemic: “For end-of-life care, two visitors will be permitted to remain in the patient’s room, without leaving or re-entering the building and without substitution”.

I appreciate all his work. It’s obvious when he’s getting depressed or exhausted, but he’s decided to keep going (almost) every day. He keeps writing new prose on how this is the most deadly “war” of our time. He wants people to keep fighting back and not get complacent. See his Dec 7 post for more war comparisons.

McPhillips has helped a lot of people in his locality. He inspires me for Writing Every Day.

Teaching with SAS Viya for Learners: Last Report

I used SAS Viya for Learners to teach data analytics to undergraduate business students for one semester.

I’ll start with the benefits of SAS Viya: It’s free; It’s visually appealing and requires no coding; There are some SAS tutorial materials that teachers can use; The way decision tree results are displayed makes intuition easy for students who are new to data mining.

I made a post earlier in which I reported that it actually works. I still think that, but at the end of the semester I did have individual students experience errors and mysterious interruptions to service. It made me wonder if the server gets busy at the end of an academic semester.

SAS is known for making excellent products and charging high fees for them. Since SAS Viya is free, they aren’t going to be giving all the functionality with it. The free version does not let students import any data. There is a sandbox of data to learn with, which is more than enough to fill a semester. I didn’t even open most of the available data sets.

My students did their final projects by choosing one of the pre-loaded datasets and using that for analysis. As far as applying the principles I taught, this was fine. In one sense, it was easier than telling them to fend for themselves and find data on the world wide web.

The downside is that the software-specific skills students learn from free student SAS Viya can’t be used on a project for work or for a different class. Eventually, any useful work involves importing new data.

The decision to use SAS Viya for Learners instead of R should depend on what your students want to do next. Both products will allow them to learn concepts and common functions.

If you are going to use SAS Viya, I highly recommend using the tutorials made by SAS with screenshot-by-screenshot instructions. You can give the instructions to the students, so students aren’t coming to you with questions about every click they need to make.

I paired SAS Viya with a Business Intelligence Textbook. Also note that students had already taken a traditional Business Statistics course previously.

Treating Marriage like a Luxury Good

In the United States, the median age of marriage has been climbing for decades. In 1960 the median age of first marriage for men and women was 22.8 and 20.3 respectively. Fast forward to 2019 and the median ages are 29.8 and 28. Here are the historical tables.

Qualitative studies that interview young people suggest they are waiting on marriage until their careers get underway. Marriage is now something you do once you have a high income. But, this treats marriage as if it were a consumption good.

Consider this blog post from Brides.com,

“With the rising cost of living, mountains of student loan debts, and a lack of job security, some of us just aren’t financially in a position to get married or settled down until we’re a little older.”

What is striking is how marriage is not viewed as a productive and helpful institution to overcome these obstacles in life. This runs contrary to the literature on the Economics of the Family that documents how marriage facilitates gains from trade, risk pools like an insurance policy, and allows couples to take advantage of economies of scale.

Yes, you can obtain some of these advantages with cohabitation but not at the same level of commitment.

This view of marriage as a luxury that is only consumed when your career and finances are in order is harmful because it leads to less opportunity. Marriage is productive and expands our possibilities.

“Firearms and Violence Under Jim Crow”

A new working paper by Mike Makowsky and Patrick Warren finds that “firearms offered an effective means of Black self-defense in the Jim Crow South.” By this the authors mean that greater access to firearms by Blacks decreased the likelihood of being lynched.

That headline finding is sure to be provocative in both debates over gun control and the history of Jim Crow. And with good reason. What I found most interesting is how they measured Black access to firearms. Since they did not have direct access to any good sources measuring Black access to firearms, they proxy access with the percent of Black suicides committed with firearms. Increased access to firearms would also mean a higher proportion of suicides were committed using firearms.

That’s a “grisly” way of measuring Black access to firearms, as Makowsky put it in a Twitter thread summarizing the paper. But also a very creative one.

Here’s the full abstract:

We assess firearm access in the U.S. South by measuring the fraction of suicides committed with firearms. Black residents of the Jim Crow South were disarmed, before re-arming themselves during the Civil-Rights Era. We find that lynchings decrease with greater Black firearm access. During the Civil-Rights Movement, both the relative Black homicide and Black “accidental death by firearm” rates decrease with Black firearm access, indicating frequent misclassification of homicides as accidents. In the contemporary era, greater firearm access correlates with higher Black death rates. We find that firearms offered an effective means of Black self-defense in the Jim Crow South.