Learn R Programming

mgwrsar (version 0.1-1)

mgwrsar_bootstrap_test: A bootstrap test for Betas for mgwrsar class model.

Description

A bootstrap test for Betas for mgwrsar class model.

Usage

mgwrsar_bootstrap_test(x0,x1,B=100,domc=FALSE,ncore=1,
type='standard',eps='H1',df='H1',focal='median',D=NULL)

Arguments

x0

The H0 mgwrsar model

x1

The H1 mgwrsar model

B

number of bootstrap repetitions, default 100

domc

If TRUE, doParallel parallelization

ncore

number of cores

type

type of bootstap : 'wild','Rademacher','spatial' or 'standard' (default)

eps

Hypothesis under wich residuals are simulated, 'H0' or 'H1' (default)

df

Hypothesis under wich degree of freedom is estimated.

focal

see sample_stat help

D

A matrix of distance

Value

The value of the statictics test and a p ratio.

See Also

mgwrsar_bootstrap_test_all

Examples

Run this code
# NOT RUN {
 data(mydata)
 coord=as.matrix(mydata[,c("x_lat","y_lon")])
 model_GWR<-MGWRSAR(formula = 'Y_gwr~X1+X2+X3', data = mydata, coord=coord,
  fixed_vars=NULL,kernels=c('gauss_adapt'), H=20,
  Model = 'GWR',control=list(SE=TRUE))

 model_MGWR<-MGWRSAR(formula = 'Y_gwr~X1+X2+X3', data = mydata, coord=coord,
 fixed_vars='Intercept',kernels=c('gauss_adapt'), H=20,
 Model = 'MGWR',control=list(SE=TRUE))

 mgwrsar_bootstrap_test(model_MGWR,model_GWR,domc=FALSE,B=30)
# }

Run the code above in your browser using DataLab