add_nugget: Adjust for nugget effect for correlations

View source: R/add_nugget.R

add_nuggetR Documentation

Adjust for nugget effect for correlations

Description

Adjust for nugget effect for correlations

Usage

add_nugget(x, nugget)

set_nugget(x, nugget, set_to)

Arguments

x

A correlation matrix or 3-d array.

nugget

A scalar nugget effect.

set_to

A correlation matrix or 3-d array of the same dimension as x.

Details

To adjust spatial nugget effect, enery entry of x is first multipled by by (1-\text{nugget}); Then add_nugget adds nugget to the diagonals (or the diagonals of each matrix slice) of x, and set_nugget set the diagonals (or the diagonals of each matrix slice) to the corresponding diagonals of set_to.

Value

Correlations of the same dimension as x.


mcgf documentation built on June 29, 2024, 9:09 a.m.