Soil carbon analysis using varying-coefficient models