NS.test {NSAE}R Documentation

Parametric bootstrap-based spatial nonstationarity test for Fay-Herroit model

Description

This function performs a parametric bootstrap-based test procudure for testing spatial nonstationarity in the data.

Usage

NS.test(formula, vardir, lat, long, iter = 100, 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

lat

a vector of latitude for each small area

long

a vector of longitude for each small area

iter

number of iterations allowed in the algorithm. Default is 100 iterations

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(paddysample)
# Testing spatial nonstationarity of the data
result <- NS.test(y ~ x1+x2, var, latitude, longitude, iter=50, data = paddysample[1:10,])
result

[Package NSAE version 0.4.0 Index]