NSglm.test | R Documentation |
This function performs a parametric bootstrap-based test procudure for testing spatial nonstationarity in the data.
NSglm.test( formula, vardir, Ni, ni, lat, lon, method = "REML", maxit = 100, precision = 1e-04, data )
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 |
The function returns a list with class "htest" containing the following components:
a character string indicating what type of test was performed.
the p-value for the test.
a character string giving the name of the data.
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.