The position independent geometric errors (PIGEs) of the rotating axes of five-axis machine tools caused by the assembly are the key factor to determine the accuracy of the machine. Quantization analysis of the influence of PIGEs on the accuracy of error vector, the coupling effect and determine the weight coefficient of the compensation value is the key technology of machine tool error compensation technology. In order to reduce the impact of PIGEs on machine tool accuracy caused by the assembly of five-axis machine tools, according to the distribution characteristics of the rotary axes of five-axis machine tool, the geometric error model is established based on multi-body system theory and homogeneous coordinate transformation method, and the mapping relationship between spatial error vector and geometric error terms is characterized. Secondly, by considering the distribution characteristics of geometric error, and Morris global sensitivity analysis method is introduced to quantify the effect of geometric error and coupling strength. The correlation coefficient between the sensitivity coefficient and the error vector is characterized by gray correlation analysis. The weighting factors of the position-independent geometric errors compensation value are determined. Finally, the measurement and identification experiment was conducted on five-axis machine tool with swiveling head is carried out, and the virtual cone-shaped trajectory measurement and error compensation experiment with DBB are carried out by using the identification value. The results show that the direct effect of ten geometric errors on attitude errors is the most obvious, and the error compensation based on the sensitivity analysis is performed, the radius deviation of the virtual cone measuring trajectory is reduced by 65.1%, and the roundness error is reduced by 58.8%. By error compensation based on error analysis, the contour accuracy of S-shaped test workpiece is improved by 49.9% on average. The error compensation results verify the validity of the error analysis results.