log_lik_rf: Maximum likelihood estimate for sigma^2, phi and rho.

View source: R/kriging.R

log_lik_rfR Documentation

Maximum likelihood estimate for σ^2, φ and ρ.

Description

This function maximum likelihood estimate for σ^2, φ and ρ in the random field model for the covariance.

Usage

log_lik_rf(m_coef, m_coord)

Arguments

m_coef

Matrix where each column is an observed vector

m_coord

Matrix where each observation contains the latitude and longitude

Value

Return a list with

par

A vector with the estimates of σ^2, φ and ρ.

m_cov

A matrix of covariances of the estimates.

Examples

data("datasetCanada")

m_data <- as.matrix(datasetCanada$m_data)
m_coord <- as.matrix(datasetCanada$m_coord[, 1:2])

p <- ceiling(1 + log2(nrow(m_data)))
m_coef <- sapply(seq_len(nrow(m_coord)), function(i) {
    coef_fourier(m_data[, i], p)
})
log_lik_rf(m_coef, m_coord)

geoFKF documentation built on Aug. 13, 2022, 1:05 a.m.