Phase transitions induced by confinement of ferroic nanoparticles