print.htestIso: Print hypothesis test results.

Description Usage Arguments Value Examples

Description

Print the results from a nonparametric hypothesis test of isotropy/symmetry.

Usage

1
2
3
## S3 method for class 'htestIso'
print(x, digits = getOption("digits"), prefix = "\t",
  ...)

Arguments

x

An object of class 'htestIso' from the LuTest, GuanTestGrid, GuanTestUnif, or MaityTest functions

digits

Number of significant digits in printed output.

prefix

A character defining the prefix used for lines of output. Default is a tab.

...

Other arguments to print.

Value

Summary results of the hypothesis test.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
library(mvtnorm)
set.seed(1)
#number of rows and columns
nr <- 12
nc <- 18
n <- nr*nc
#Set up the coordinates
coords <- expand.grid(0:(nr-1), 0:(nc-1))
coords <- cbind(coords[,2], coords[,1])
#compute the distance between sampling locations
D <- as.matrix(dist(coords))
#Set parameter values for exponential covariance function
sigma.sq <- 1
tau.sq <- 0.0
phi <- 1/4
R <- sigma.sq * exp(-phi*D)
R <- R + diag(tau.sq, nrow = n, ncol = n)
#Simulate Gaussian spatial data
z <- rmvnorm(1,rep(0,n), R, method = c("chol"))
z <-  z-mean(z)
z <- t(z)
mydata <- cbind(coords, z)
mylags <-  rbind(c(1,0), c(0, 1), c(1, 1), c(-1,1))
myA <-  rbind(c(1, -1, 0 , 0), c(0, 0, 1, -1))
tr <- GuanTestGrid(mydata, delta = 1, mylags, myA, df = 2, window.dims = c(3,2), 
pt.est.edge = TRUE, sig.est.edge = TRUE, sig.est.finite = TRUE )
print.htestIso(tr) #print the summary
tr #can also print it using this command

spTest documentation built on May 2, 2019, 8:27 a.m.