I'm looking at patterns of soil pollution over a specific site. I measured soil pollution in different plots across my site. I then performed a Principal Component Analysis to extract a composite axis of variation in pollution and I followed that by extracting the row coordinates of the samples (i.e le principal component) on this first axis. From the values of the samples on the PCA axis1, I used an interpollation method to model soil pollution overall the site. Now I would like to calculate the least cost distance between points that are spread across the site according to the map I just created.
Here comes my problem: The values of each pixel of the raster correspond to the value interpolated from the PCA and they are spread from -6 to 5. However, when I try to build the transition matrice I get a warning "transition function gives negative values".