rkriging: Regression-kriging functions for snow load estimation.

Description Usage Arguments Value

View source: R/rkriging.R

Description

The function combines simple kriging with varying local means (SKLM) and universal kriging (UK) (more precisely, kriging with an external drift). The only difference between the two regression-kriging estimators is that UK leverages spatial correlations in the regression fitting.

Usage

1
2
3
rkriging(formula = log(RESPONSE) ~ ELEVATION, locations, newdata, model,
  bound_elevation = FALSE, bound_output = FALSE, sklm = FALSE,
  weights = FALSE, ...)

Arguments

formula

The formula used to account for elevation in the predictions. Typically of the form given as the default option.

locations

The measurement locations (used to train the model). Of class SpatialPointsDataFrame from the sp package.

newdata

The prediction locations. Must be one of the accepted spatial classes from the sp package.

model

A variogram model created with the vgm function from the gstat package.

bound_elevation

If true, restrict the trend predictions using the range of measurement location elevations.

bound_output

If true, restrict the final predictions to the range of observed data at measurement locations.

sklm

If true, use simple kriging with varying local means. If false, use "universal kriging". The only difference is that sklm assumes no correlation between locations when fitting the linear model for elevation.

weights

If TRUE, bundle the weights and linear model coefficients as a list. Should be used only for plotting illustrations.

Value

A numeric vector of predictions with length equal to the number of rows in newdata.


beanb2/snowload documentation built on Jan. 7, 2020, 9:48 p.m.