Sharing a secret can forge a relationship and solidify a bond with a friend. Keeping a secret, however, can eat away at our health and happiness. As it turns out, hiding a painful truth also changes the way we communicate with others.

By analyzing big data sets such as email logs and Twitter feeds, psychologists are unveiling the subtle, subconscious ways our language reflects our inner thoughts. These shifts in speech can also crop up in the way political leaders communicate with the public. They may even indicate when one of the Boston marathon bombers first decided to carry out his act of violence.

Psychologists have long known that keeping a secret takes both a psychological and physical toll. Two competing theories sought to explain why secrets tax us. Perhaps we withdraw from our friends and family, thus losing some of the social support that keeps us healthy. Alternately, we might remain highly connected, but in a hyper-vigilant way, always monitoring to make sure that no one suspects anything is amiss. (A heightened state of arousal is also known to weigh on our health.)

In two studies presented at the American Psychological Association convention this week, James Pennebaker and his colleagues at the University of Texas at Austin analyzed the language in secret keepers’ emails to test whether they withdrew or became hyper-vigilant. In the first study, led by graduate student Jenna Baddeley, 16 women with major depressive disorder and 15 healthy subjects shared the bulk of their emails over the past year with the researchers. The psychologists focused on this disorder because they reasoned that the women suffering from an episode of depression would try to hide that fact from others in their social circles. The women also shared the dates when their depressive episodes occurred.

The team found that during a depressive episode, people sent more emails and used more words in them, as compared with both the healthy women and the depressive women in remission. They also used fewer negative emotion words, more positive emotion words and more words such as “I” and “me.”“People who are depressed spend much of their time masking it, “Pennebaker noted. “They use communication strategies to come across as chipper.”

But how similar is a depressed person to a typical secret-keeper? In one way, at least, they are not. Depressive writers tend to rely heavily on “I” words, which for them reflects a ruminative self-focus. For non-depressed subjects, research has found the frequent use of “I” to be a marker for honesty. This distinction crops up in the second study, led by psychologist Yla Tausczik at Carnegie Mellon. The team recruited 62 adults who admitted they were keeping a life-altering secret and were willing to, as before, share a year’s worth of emails, including some from before they acquired their dirty laundry. More than half of the adults said the secret was of a romantic or sexual nature, with other major categories being “family,” “mental health,” “job” and “legal.” As in the depression study, overall these people wrote more, longer emails after they acquired their secret than before. When writing to people relevant to their secret, however, these individuals used more deceptive language, more negative emotion words and fewer words such as “I” and “me.”

Both experiments had another twist. A metric called “language-style matching” measures the degree of similarity in two people’s manner of speech, a bellwether for the quality of a conversation. Pennebaker and his colleagues found that although the secret-keepers were communicating significantly more than before they had something to hide, their language-style matching scores with their interlocutors were lower. “I think they’re sending these emails to test their social networks—are we on the same page?” Pennebaker says. “They’re sending out emails to socially connect, but they’re not connecting well.”

This type of language analyses may also offer insights into high-profile real-world secrets. In earlier work, Pennebaker and colleagues had found that President George W. Bush used fewer singular pronouns, such as I, me and my, in the months prior to declaring war in Iraq. So did President Harry Truman before dropping the bomb on Hiroshima. And in an unpublished analysis of the Twitter activity of alleged Boston Marathon bomber Dzokhar Tsarnaev, he, too, fits the pattern. Tsarnaev’s tweets included far fewer “I” words beginning in October 2012, shortly after his more radical brother returned from a 6-month trip to Russia and allegedly began posting extremist videos to Youtube. Pennebaker suggests that around this time Tsarnaev convinced himself to bomb the marathon, and the drop in personal pronouns reflects his newly acquired secret.

Although the work is preliminary, the repercussions could be large. Despite our best attempts to cloak the truth, our secrets may be hiding in plain sight.