Calculation of the Temperature Dependence of Magnetic Anisotropy