I have two tiff files in R (one modelled and one observed). Both tiffs show the spatial maps of gross primary productivity from 2000-2010. The study area is HinduKush Himalaya (http://rds.icimod.org/Home/DataDetail?metadataId=3924). I would like to find the agreement between these two tiff files statistically.
I go ahead with plotting a scatterplot in R. The y axis is the modelled gross primary producitivty and x is modis gross primary productivty. Looking at the scatterplot, most of the data is present on the left side. I have two concerns in this scatterplot. Firstly there is a lack of linearity and the amount of overplotting. What can I apply to my code to overcome the problem?
GPPMODIS<-"C:/XXX.tif" GPPMODIS1=raster(GPPMODIS) plot(GPPMODIS) MODELGPP<-"C:/xxx.tif" raster2=raster(MODELGPP) plot(raster2) #resample to bring both rasters to same resolution. GPPMODIS1 is 0.01 and rastergpp1 is 0.5 modisgpp<-resample(plot(modisgpp,rastergpp1,ylab="",xlab=xn,cex=1)) #plot scatterplot plot(modisgpp,rastergpp1,ylab="",xlab=xn,cex=1)
This is the scatterplot between 2 rasters
This was achieved by
code1=lm(MODISGPPFILE~IPSLGPP,data=df2) residuals=resid(code1) plot(df2$MODISGPPFILE,residuals)