Correlation of the thermal expansion coefficients of rare earth and transition metal oxides and fluorides