Magnetic properties of iron-doped layer-structure dichalcogenides