Title: | Conditional Least Squared (CLS) Method for the Model SINAR(1,1) |
---|---|
Description: | Implementation of the Conditional Least Square (CLS) estimates and its covariance matrix for the first-order spatial integer-valued autoregressive model (SINAR(1,1)) proposed by Ghodsi (2012) <doi:10.1080/03610926.2011.560739>. |
Authors: | Gilberto P. Sassi [aut, cre], Carolina C. M. Paraíba [aut] |
Maintainer: | Gilberto P. Sassi <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-13 02:42:39 UTC |
Source: | https://github.com/gilberto-sassi/sinar |
A matrix with the counts of arthropods (carabidae) in a grid-sampled wheat field
data("carabidae")
data("carabidae")
A matrix where each row and column is a count of carabidae species at the first cell.
Kevin Wright (2020). agridat: Agricultural Datasets. R package version 1.17. https://CRAN.R-project.org/package=agridat
cls
computes the conditional least square for a process described
by
where is an iid process with poison distribution. Note
the
must belong to the interval
.
We obtain estimates for
and
.
We do not make any asumption about the distribution of the innovation in the
process.
cls(X)
cls(X)
X |
A integer matrix where each cell is the observed value in the regular lattice. |
a vector with the estimates of .
data("nematodes") cls(nematodes)
data("nematodes") cls(nematodes)
is the covariance matrix in the Klimko-Nelson seminal paper.
Basically, we know
where
For more details, check Klimko and Nelson (1978).
emp_cov(X)
emp_cov(X)
X |
A integer matrix where each cell is the observed value in the regular lattice. |
The covariance matrix estimated empirically.
data("nematodes") emp_cov(nematodes)
data("nematodes") emp_cov(nematodes)
emp_V
is the matrix in the Klimko-Nelson seminal paper. Basically,
we know
where
For more details, check Klimko and Nelson (1978).
emp_V(X)
emp_V(X)
X |
A integer matrix where each cell is the observed value in the regular lattice. |
The matrix V estimated empirically.
data("nematodes") emp_V(nematodes)
data("nematodes") emp_V(nematodes)
emp_W
is the matrix in the Klimko-Nelson seminal paper. Basically,
we know
where
For more details, check Klimko and Nelson (1978).
emp_W(X)
emp_W(X)
X |
A integer matrix where each cell is the observed value in the regular lattice. |
The matrix W
estimated empirically.
data("nematodes") emp_V(nematodes)
data("nematodes") emp_V(nematodes)
A matrix of counting data with 15 rows and 15 columns.
data("nematodes")
data("nematodes")
Dataset of 15 × 15 regular grid on counts of cereal cyst-nematode (Heterodera avenae collected in soil core).
PERRY, J. N. et al. SADIE: software to measure and model spatial pattern. Aspects of applied biology, v. 46, p. 95-102, 1996.
sinar_pois
returns a matrix representing a simulated regular lattice
from a SINAR(1,1) process with innovations from a poison distribution.
sinar_pois(n_row, n_col, a10, a01, a11, l)
sinar_pois(n_row, n_col, a10, a01, a11, l)
n_row |
Number of rows in the simulated lattice. |
n_col |
Number of columns in the simulated lattice. |
a10 |
Coefficient from the element |
a01 |
Coefficient from the element |
a11 |
Coefficient from the element |
l |
Mean of the poison distribution used as innovations. |
This function simulates a regular lattice from the model
where is an iid process with poison distribution. Note
the
must belong to the interval
.
A integer matrix.
n_row <- 20 n_col <- 50 a10 <- 0.2 a01 <- 0.2 a11 <- 0.5 l <- 1 sinar_pois(n_row, n_col, a10, a01, a11, l)
n_row <- 20 n_col <- 50 a10 <- 0.2 a01 <- 0.2 a11 <- 0.5 l <- 1 sinar_pois(n_row, n_col, a10, a01, a11, l)
V
is the theoretical matrix from Klimko-Nelson for the SINAR(1,1)
model. Basically, we know
where
For more details, check Klimko and Nelson (1978).
teo_V(a10, a01, a11, mu_e, s2_e)
teo_V(a10, a01, a11, mu_e, s2_e)
a10 |
is the parameter in the equation |
a01 |
is the parameter in the equation |
a11 |
is the parameter in the equation |
mu_e |
is the mean of the innovations |
s2_e |
is the standar deviation of the innovations |
The matrix V estimated empirically.
n_row <- 20 n_col <- 50 a10 <- 0.2 a01 <- 0.2 a11 <- 0.5 l <- 1 # mean and variance for poison innovations teo_V(a10, a01, a11, l, sqrt(l))
n_row <- 20 n_col <- 50 a10 <- 0.2 a01 <- 0.2 a11 <- 0.5 l <- 1 # mean and variance for poison innovations teo_V(a10, a01, a11, l, sqrt(l))
is the standard deviation of
model.
var_hat_sigma(X)
var_hat_sigma(X)
X |
A integer matrix where each cell is the observed value in the regular lattice. |
The variance of standard deviation of the estimate of
.
data("nematodes") var_hat_sigma(nematodes)
data("nematodes") var_hat_sigma(nematodes)
is the variance the innovations for the
model.
var_sinar(X)
var_sinar(X)
X |
A integer matrix where each cell is the observed value in the regular lattice. |
The estimated standard deviation in the .
data("nematodes") var_sinar(nematodes)
data("nematodes") var_sinar(nematodes)