MyNixOS website logo
Description

Conditional Least Squared (CLS) Method for the Model SINAR(1,1).

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>.

sinar

The goal of sinar is to implement the Conditional Least Square method for the Spatial non-negative Integer-valued Autoregressive (SINAR(1,1)).

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("gilberto-sassi/sinar")

Example: simulated case

library(sinar)

## Simulated data matrix from SINAR(1,1) with Poison(5) innovation
matrix_simulated <- sinar_pois(15, 15, 0.2, 0.2, 0.4, 5)

## Conditional Least Square (CLS) estimates
cls(matrix_simulated)
#>       a10       a01       a11        mu 
#> 0.1605389 0.2860054 0.4277413 3.1261927

## Covariance matrix of CLS estimates
emp_cov(matrix_simulated)
#>               a10           a01          a11          mu
#> a10  0.0044018403  0.0001991086 -0.001362643 -0.08051497
#> a01  0.0001991086  0.0032884060 -0.000882474 -0.06218858
#> a11 -0.0013626431 -0.0008824740  0.004125110 -0.04507648
#> mu  -0.0805149667 -0.0621885767 -0.045076478  4.67716808

Example: real dataset (nematodoes)

library(sinar)

## Nematodes counting datasets
data("nematodes")

## Conditional Least Square (CLS) estimates
cls(nematodes)
#>        a10        a01        a11         mu 
#> 0.20664577 0.33147378 0.04523086 2.14476453

## Covariance matrix of CLS estimates
emp_cov(nematodes)
#>               a10           a01          a11           mu
#> a10  0.0111169222 -0.0009999304 -0.003310576 -0.017278481
#> a01 -0.0009999304  0.0082946407 -0.001503724 -0.009838536
#> a11 -0.0033105760 -0.0015037242  0.004507501  0.004049939
#> mu  -0.0172784806 -0.0098385364  0.004049939  0.268045835

Example: real dataset (carabidae)

library(sinar)

## Carabidae counting dataset
data("carabidae")

## Conditional Least Square (CLS) estimates
cls(carabidae)
#>        a10        a01        a11         mu 
#> 0.14595392 0.12725313 0.08798513 9.10361759

## Covariance matrix of CLS estimates
emp_cov(carabidae)
#>              a10          a01          a11          mu
#> a10  0.014484776 -0.003141815 -0.005525906 -0.06795645
#> a01 -0.003141815  0.014365625 -0.001265544 -0.11558802
#> a11 -0.005525906 -0.001265544  0.023795735 -0.25417404
#> mu  -0.067956449 -0.115588024 -0.254174036  7.22525572
Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows