Title: | Conditional Least Squared (CLS) Method for the Model SINAR(1,1) |
Version: | 0.1.0 |
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>. |
License: | MIT + file LICENSE |
Imports: | MASS, stats, numDeriv |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.1 |
BugReports: | https://github.com/gilberto-sassi/sinar/issues |
NeedsCompilation: | no |
Packaged: | 2020-11-02 14:22:13 UTC; gilberto |
Author: | Gilberto P. Sassi [aut, cre], Carolina C. M. Paraíba [aut] |
Maintainer: | Gilberto P. Sassi <sassi.pereira.gilberto@gmail.com> |
Depends: | R (≥ 3.5.0) |
Repository: | CRAN |
Date/Publication: | 2020-11-06 17:00:06 UTC |
Counts of arthropods in a grid-sampled wheat field
Description
A matrix with the counts of arthropods (carabidae) in a grid-sampled wheat field
Usage
data("carabidae")
Format
A matrix where each row and column is a count of carabidae species at the first cell.
Source
Kevin Wright (2020). agridat: Agricultural Datasets. R package version 1.17. https://CRAN.R-project.org/package=agridat
Conditional least square estimates for a SINAR(1,1) process.
Description
cls
computes the conditional least square for a process described
by
X_{i,j}= a_{10} X_{i-1,j} + a_{01} X_{i,j-1} + a_{11} X_{i-1, j-1} +
\epsilon_{i,j}
where \epsilon_{i,j}
is an iid process with poison distribution. Note
the a_{10}, a_{01}, a_{11}
must belong to the interval [0,1]
.
We obtain estimates for a_{10}, a_{01}, a_{11}
and \mu_\epsilon
.
We do not make any asumption about the distribution of the innovation in the
process.
Usage
cls(X)
Arguments
X |
A integer matrix where each cell is the observed value in the regular lattice. |
Value
a vector with the estimates of a_{10}, a_{01}, a_{11}, \mu
.
Examples
data("nematodes")
cls(nematodes)
Empirical estimate for the matrix V in the Klimko-Nelson.
Description
emp_V
is the matrix in the Klimko-Nelson seminal paper. Basically,
we know
\sqrt{n}(\hat{a}_{10} - a_{10}, \hat{a}_{01} - a_{01}, \hat{a}_{11} -
a_{11}, \hat{\mu}_\epsilon - \mu_\epsilon)^\top \sim MNV(0, \Sigma)
where
\Sigma = V^{-1}W V^{-1}.
For more details, check Klimko and Nelson (1978).
Usage
emp_V(X)
Arguments
X |
A integer matrix where each cell is the observed value in the regular lattice. |
Value
The matrix V estimated empirically.
Examples
data("nematodes")
emp_V(nematodes)
Empirical estimate for the matrix W in the Klimko-Nelson.
Description
emp_W
is the matrix in the Klimko-Nelson seminal paper. Basically,
we know
\sqrt{n}(\hat{a}_{10} - a_{10}, \hat{a}_{01} - a_{01}, \hat{a}_{11} -
a_{11}, \hat{\mu}_\epsilon - \mu_\epsilon)^\top \sim MNV(0, \Sigma)
where
\Sigma = V^{-1}W V^{-1}.
For more details, check Klimko and Nelson (1978).
Usage
emp_W(X)
Arguments
X |
A integer matrix where each cell is the observed value in the regular lattice. |
Value
The matrix W
estimated empirically.
Examples
data("nematodes")
emp_V(nematodes)
Empirical estimate for the Covariance matrix in the Klimko-Nelson.
Description
\Sigma
is the covariance matrix in the Klimko-Nelson seminal paper.
Basically, we know
\sqrt{n}(\hat{a}_{10} - a_{10}, \hat{a}_{01} - a_{01}, \hat{a}_{11} -
a_{11}, \hat{\mu}_\epsilon - \mu_\epsilon)^\top \sim MNV(0, \Sigma)
where
\Sigma = V^{-1}W V^{-1}.
For more details, check Klimko and Nelson (1978).
Usage
emp_cov(X)
Arguments
X |
A integer matrix where each cell is the observed value in the regular lattice. |
Value
The covariance matrix estimated empirically.
Examples
data("nematodes")
emp_cov(nematodes)
A matrix of counting data with 15 rows and 15 columns.
Description
A matrix of counting data with 15 rows and 15 columns.
Usage
data("nematodes")
Format
Dataset of 15 × 15 regular grid on counts of cereal cyst-nematode (Heterodera avenae collected in soil core).
Source
PERRY, J. N. et al. SADIE: software to measure and model spatial pattern. Aspects of applied biology, v. 46, p. 95-102, 1996.
Simulating SINAR(1,1) process with innovations from a poison distribution.
Description
sinar_pois
returns a matrix representing a simulated regular lattice
from a SINAR(1,1) process with innovations from a poison distribution.
Usage
sinar_pois(n_row, n_col, a10, a01, a11, l)
Arguments
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. |
Details
This function simulates a regular lattice from the model
X_{i,j}= a_{10} X_{i-1,j} + a_{01} X_{i,j-1} + a_{11} X_{i-1, j-1} +
\epsilon_{i,j}
where \epsilon_{i,j}
is an iid process with poison distribution. Note
the a_{10}, a_{01}, a_{11}
must belong to the interval [0,1]
.
Value
A integer matrix.
Examples
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)
Compute the value of matrix V using the coefficients.
Description
V
is the theoretical matrix from Klimko-Nelson for the SINAR(1,1)
model. Basically, we know
\sqrt{n}(\hat{a}_{10} - a_{10}, \hat{a}_{01} - a_{01}, \hat{a}_{11} -
a_{11}, \hat{\mu}_\epsilon - \mu_\epsilon)^\top \sim MNV(0, \Sigma)
where
\Sigma = V^{-1}W V^{-1}.
For more details, check Klimko and Nelson (1978).
Usage
teo_V(a10, a01, a11, mu_e, s2_e)
Arguments
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 |
Value
The matrix V estimated empirically.
Examples
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))
Variance of standard deviation of epsilon.
Description
\hat{\sigma}_\epsilon
is the standard deviation of SINAR(1,1)
model.
Usage
var_hat_sigma(X)
Arguments
X |
A integer matrix where each cell is the observed value in the regular lattice. |
Value
The variance of standard deviation of the estimate of
\sigma_\epsilon
.
Examples
data("nematodes")
var_hat_sigma(nematodes)
Empirical estimate for the variance of innovations.
Description
\sigma^2_\epsilon
is the variance the innovations for the
SINAR(1,1)
model.
Usage
var_sinar(X)
Arguments
X |
A integer matrix where each cell is the observed value in the regular lattice. |
Value
The estimated standard deviation in the SINAR(1,1)
.
Examples
data("nematodes")
var_sinar(nematodes)