gendata_spacoap {SpaCOAP}R Documentation

Generate simulated data

Description

Generate simulated data from spaital covariate-augmented Poisson factor models

Usage

gendata_spacoap(
  seed = 1,
  width = 20,
  height = 30,
  p = 500,
  d = 40,
  k = 3,
  q = 5,
  rank0 = 3,
  eta0 = 0.5,
  bandwidth = 1,
  rho = c(10, 1),
  sigma2_eps = 1,
  seed.beta = 1
)

Arguments

seed

a postive integer, the random seed for reproducibility of data generation process.

width

a postive integer, specify the width of the spatial grid.

height

a postive integer, specify the height of the spatial grid.

p

a postive integer, specify the dimension of count variables.

d

a postive integer, specify the dimension of covariate matrix with low-rank regression coefficient matrix.

k

a postive integer, specify the dimension of covariate matrix as control variables.

q

a postive integer, specify the number of factors.

rank0

a postive integer, specify the rank of the coefficient matrix.

eta0

a real between 0 and 1, specify the spatial autocorrelation parameter.

bandwidth

a real positive value, specify the bandwidth in calculating the weighted adjacency matrix.

rho

a numeric vector with length 2 and positive elements, specify the signal strength of loading matrix and regression coefficient, respectively.

sigma2_eps

a positive real, the variance of overdispersion error.

seed.beta

a postive integer, the random seed for reproducibility of data generation process by fixing the regression coefficient matrix beta.

Details

None

Value

return a list including the following components:

References

None

See Also

SpaCOAP

Examples

width <- 20; height <- 15; p <- 100
d <- 20; k <- 3; q <- 6; r <- 3
datlist <- gendata_spacoap(width=width, height=height, p=p, d=20, k=k, q=q, rank0=r)
str(datlist)

[Package SpaCOAP version 1.2 Index]