raster.downscale

0th

Percentile

Raster Downscale

Downscales a raster to a higher resolution raster using a robust regression

Usage
raster.downscale(
  x,
  y,
  p = NULL,
  n = NULL,
  filename = FALSE,
  scatter = FALSE,
  ...
)
Arguments
x

Raster class object representing independent variable(s)

y

Raster class object representing dependent variable

p

Percent sample size

n

Fixed sample size

filename

Name of output raster

scatter

(FALSE/TRUE) Optional scatter plot

...

Additional arguments passed to predict

Value

A list object containing:

  • downscale downscaled raster (omitted if filename is defined)

  • model rlm model object

  • MSE Mean Square Error

  • AIC Akaike information criterion

Aliases
  • raster.downscale
Examples
# NOT RUN {
 library(raster)
 elev <- raster::getData('alt', country='SWZ', mask=TRUE)
 tmax <- raster::getData('worldclim', var='tmax', res=10, 
                         lon=8.25, lat=46.8)
 tmax <- crop(tmax[[1]], extent(elev))
 
 # Downscale temperature
 tmax.ds <- raster.downscale(elev, tmax, scatter=TRUE)
   opar <- par(no.readonly=TRUE)
     par(mfrow=c(2,2))
     plot(tmax, main="Temp max")
     plot(elev, main="elevation")
       plot(tmax.ds$downscale, main="Downscaled Temp max")
   par(opar)
# }
# NOT RUN {
# }
Documentation reproduced from package spatialEco, version 1.3-2, License: GPL-3

Community examples

Looks like there are no examples yet.