A wagging tail when you come home and a cuddle with your furry friend has been proved to make elderly people feel less isolated.

But now scientists at the Saint Louis University in Missouri have found that it doesn't matter when it's a real or a cyber-pet that you're patting.

Researchers compared a 16kg, floppy-eared doggy named Sparky with AIBO, a far-from-lifelike robot dog, to see how residents of three American nursing homes would respond.

"The most surprising thing is they worked almost equally well in terms of alleviating loneliness and causing residents to form attachments", said Dr. William Banks, a professor of geriatric medicine who worked on the study reported in the Journal of the American Medical Directors Association.

And the robotic dog doesn't need walking, feeding or washing, which is a huge advantage when you consider that many senior citizens are too frail to care for a pet or have had to give up their own animals when they go into a nursing home. "They really miss that bond", Banks added.

According to a Rruters report, the team studied 38 nursing home residents who were divided into three groups.

One got regular visits from Banks' pet Sparky, another got visits from the AIBO Entertainment Robot.

The third group got no visits from either dog.

Banks himself believed that the real dog would win out but both dogs provided virtually equal comfort after seven weeks of visits.

Banks added his hopes that social services caring for the elderly may act on the findings, especially as robo-companions could even be programmed to keep tabs on their owners, alerting emergency workers of a sudden fall.

"Loneliness is common in nursing homes. Robots may be very useful for people who cannot for whatever reason have access to a living dog", Banks said.