Countries around the world can retain distinct cultures despite migration, new research shows.