Will you get shorter as you age? It could depend in part on how long you stayed in school and whether you eat right and exercise as an adult, according to a USC study released Monday.

“The evidence shows that it is not only early life events that are associated with how we age, but health decisions in later life as well,” according to USC economics professor John Strauss, an investigator on the study published in the American Economic Journal: Applied Economics.

The study, based on a survey of 17,708 adults beginning at age 45, found a strong relationship between height loss and cognitive health — with people who performed poorly on memory and basic math tests shrinking more. Men who completed primary school shrank 0.9 centimeters less, while completing high school meant 1.9 centimeters less shrinking.

Researchers said that amount may seem small, but it can be a large difference given that the average height loss for men as they age is 3.3 centimeters.

For women, completing primary school led to 0.6 centimeters less shrinkage, compared to an average height loss of 3.8 centimeters.

Decreases in height can also be greater for people suffering from arthritis, osteoporosis and spine-joint inflammation, conditions that are related to diet, exercise and smoking, according to the study.

The study also found that people who live in urban areas tend to shrink less than people in rural areas.

“Height has been recognized as an acceptable proxy for childhood health conditions, but there are complications there,” according to USC economist Geert Ridder, a co-investigator on the study.

“Some of adult health might be determined by childhood circumstances, but people shrink differentially, and that shrinkage is also a measure of adult health conditions.”

Researchers plan to conduct follow-up measurements on the study’s participants every two years to gather more information about human aging.