NSglm.test {NSAE} | R Documentation |
Parametric bootstrap-based spatial nonstationarity test for generalized linear mixed model
Description
This function performs a parametric bootstrap-based test procudure for testing spatial nonstationarity in the data.
Usage
NSglm.test(
formula,
vardir,
Ni,
ni,
lat,
lon,
method = "REML",
maxit = 100,
precision = 1e-04,
data
)
Arguments
formula |
an object of class list of formula, describe the model to be fitted |
vardir |
a vector of sampling variances of direct estimators for each small area |
Ni |
a vector of population size for each small area |
ni |
a vector of sample size for each small area |
lat |
a vector of latitude for each small area |
lon |
a vector of longitude for each small area |
method |
type of fitting method, default is "REML" method |
maxit |
number of iterations allowed in the algorithm. Default is 100 iterations |
precision |
convergence tolerance limit for the Fisher-scoring algorithm. Default value is 1e-04 |
data |
a data frame comprising the variables named in formula and vardir |
Value
The function returns a list with class "htest" containing the following components:
- method
a character string indicating what type of test was performed.
- p.value
the p-value for the test.
- data.name
a character string giving the name of the data.
Examples
# Load data set
data(headcount)
# Testing spatial nonstationarity of the data
result <- NSglm.test(y~x1, var, N,n,lat,long, "REML", 10, 1e-04, headcount[1:10,])
result