Burying your head in a novel isn't just a way to escape the world: psychologists are increasingly finding that reading can affect our personalities. A trip into the world of Stephenie Meyer, for example, actually makes us feel like vampires.

Researchers from the University at Buffalo gave 140 undergraduates passages from either Meyer's Twilight or JK Rowling's Harry Potter and the Philosopher's Stone to read, with the vampire group delving into an extract in which Edward Cullen tells his teenage love interest Bella what it is like to be a vampire, and the wizardly readers getting a section in which Harry and his cohorts are "sorted" into Hogwarts houses.

The candidates then went through a series of tests, in which they categorised "me" words (myself, mine) and "wizard" words (wand, broomstick, spells, potions) by pressing one key when they appeared on the screen, and "not me" words (they, theirs) and "vampire" words (blood, undead, fangs, bitten) by pressing another key, with the test then reversed. The study's authors, Dr Shira Gabriel and Ariana Young, expected them to respond more quickly to the "me" words when they were linked to the book they had just read.

Gabriel and Young then applied what they dubbed the Twilight/Harry Potter Narrative Collective Assimilation Scale, which saw the students asked questions designed to measure their identification with the worlds they had been reading about – including "How long could you go without sleep?", "How sharp are your teeth?" and "Do you think, if you tried really hard, you might be able to make an object move just using the power of your mind?" Their moods, life satisfaction, and absorption into the stories were then measured.

Published by the journal Psychological Science, the study found that participants who read the Harry Potter chapters self-identified as wizards, whereas participants who read the Twilight chapter self-identified as vampires. And "belonging" to these fictional communities actually provided the same mood and life satisfaction people get from affiliations with real-life groups. "The current research suggests that books give readers more than an opportunity to tune out and submerge themselves in fantasy worlds. Books provide the opportunity for social connection and the blissful calm that comes from becoming a part of something larger than oneself for a precious, fleeting moment," Gabriel and Young write.

"My study definitely points to reading fulfilling a fundamental need – the need for social connection," Gabriel said. She is currently trying to replicate the study with schoolchildren – using jedis versus wizards.

The psychology of fiction is a small but growing area of research, according to Keith Oatley, a professor in the department of human development and applied psychology at the University of Toronto and a published novelist himself, who details the latest findings in the area in his online magazine, OnFiction.

One of his own studies, carried out in 2008, gave 166 participants either the Chekhov short story, The Lady with the Little Dog, or a version of the story rewritten in documentary form. The subjects' personality traits and emotions were assessed before and after reading, with those who were given the Chekhov story in its unadulterated form found to have gone through greater changes in personality – empathising with the characters and thus becoming a little more like them.

"I think the reason fiction but not non-fiction has the effect of improving empathy is because fiction is primarily about selves interacting with other selves in the social world," said Oatley. "The subject matter of fiction is constantly about why she did this, or if that's the case what should he do now, and so on. With fiction we enter into a world in which this way of thinking predominates. We can think about it in terms of the psychological concept of expertise. If I read fiction, this kind of social thinking is what I get better at. If I read genetics or astronomy, I get more expert at genetics or astronomy. In fiction, also, we are able to understand characters' actions from their interior point of view, by entering into their situations and minds, rather than the more exterior view of them that we usually have. And it turns out that psychologically there is a big difference between these two points of view. We usually take the exterior view of others, but that's too limited."

The findings could, Oatley believes, have significant implications, particularly in a climate where arts funding is under threat. "It is the first empirical finding, so far as I know, to show a clear psychological effect of reading fiction," he said. "It's a result that shows that reading fiction improves understanding of others, and this has a very basic importance in society, not just in the general way making the world a better place by improving interpersonal understanding, but in specific areas such as politics, business, and education. In an era when high-school and university subjects are evaluated economically, our results do have economic implications."