corModel: Corelation model

Description Usage Arguments Details Examples

Description

Returns a vector or matrix of the correlation associated to a given spatial correlation model.

Usage

1
2
3
4
corModel(p, ...)

## S3 method for class 'numeric'
corModel(p, h, type = "exp")

Arguments

p

Vector of row matrix of the model parameters. If it is a matrix, each row is set parameter.

h

Vector or matrix of the distance.

type

Correlation model

Details

The correlation model are Strings. The available model are: exponential (exp), gaussian (gau), rational quadratic (rqd), spherical (sph), circular (cir), power exponential (pow) and matern (mat).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
coord <- replicate(2,runif(30))
h <- as.matrix(dist(coord))

Sexp <- corModel(c(.6,0), h,'exp')
Srq <- corModel(c(.3,.2), h,'rqd')
Smat <- corModel(c(.6,.1, 50), h,'mat')

plot(as.vector(h),as.vector(Sexp))
points(as.vector(h),as.vector(Srq),col = 2)
points(as.vector(h),as.vector(Smat),col = 4)

martindurocher/floodRFA documentation built on June 5, 2019, 8:44 p.m.