Magnetic properties of amorphous Si films doped with rare-earth elements