Correlation between X-ray and radio absorption in compact radio galaxies