Magnetic interactions in the oxide systems LaNi1−xMxO3 (M=Cr,Fe, or Co)