GeoVarestbootstrap {GeoModels} | R Documentation |
Update a GeoFit
object using parametric bootstrap for std error estimation
Description
The procedure update a GeoFit
object computing stderr estimation, confidence intervals
and p-values using parametric bootstrap.
Usage
GeoVarestbootstrap(fit,K=100,sparse=FALSE, GPU=NULL,local=c(1,1),
optimizer=NULL, lower=NULL, upper=NULL,
method="cholesky",alpha=0.95, L=3000,parallel=FALSE,ncores=NULL)
Arguments
fit |
A fitted object obtained from the
|
K |
The number of simulations in the parametric bootstrap. |
sparse |
Logical; if |
GPU |
Numeric; if |
local |
Numeric; number of local work-items of the OpenCL setup |
optimizer |
The type of optimization algorithm (see |
lower |
An optional named list giving the values for the lower bound of the space parameter
when the optimizer is |
upper |
An optional named list giving the values for the upper bound of the space parameter
when the optimizer is |
method |
String; The method of simulation. Default is |
alpha |
Numeric; The level of the confidence interval. |
L |
Numeric; the number of lines in the turning band method. |
parallel |
Logical; if |
ncores |
Numeric; number of cores involved in parallelization. |
Details
The function update a GeoFit
object estimating stderr estimation
and confidence interval using parametric bootstrap.
Value
Returns an (updated) object of class GeoFit
.
Author(s)
Moreno Bevilacqua, moreno.bevilacqua89@gmail.com,https://sites.google.com/view/moreno-bevilacqua/home, Víctor Morales Oñate, victor.morales@uv.cl, https://sites.google.com/site/moralesonatevictor/, Christian", Caamaño-Carrillo, chcaaman@ubiobio.cl,https://www.researchgate.net/profile/Christian-Caamano
See Also
Examples
library(GeoModels)
################################################################
###
### Example 1. Test on the parameter
### of a regression model using conditional composite likelihood
###
###############################################################
set.seed(342)
model="Gaussian"
# Define the spatial-coordinates of the points:
NN=3500
x = runif(NN, 0, 1)
y = runif(NN, 0, 1)
coords = cbind(x,y)
# Parameters
mean=1; mean1=-1.25; # regression parameters
sill=1 # variance
# matrix covariates
X=cbind(rep(1,nrow(coords)),runif(nrow(coords)))
# model correlation
corrmodel="Matern"
smooth=0.5;scale=0.1; nugget=0;
# simulation
param=list(smooth=smooth,mean=mean,mean1=mean1,
sill=sill,scale=scale,nugget=nugget)
data = GeoSim(coordx=coords, corrmodel=corrmodel,
model=model, param=param,X=X)$data
I=Inf
fixed=list(nugget=nugget,smooth=smooth)
start=list(mean=mean,mean1=mean1,scale=scale,sill=sill)
lower=list(mean=-I,mean1=-I,scale=0,sill=0)
upper=list(mean=I,mean1=I,scale=I,sill=I)
# Maximum pairwise composite-likelihood fitting of the RF:
fit = GeoFit(data=data,coordx=coords,corrmodel=corrmodel, model=model,
likelihood="Conditional",type="Pairwise",sensitivity=TRUE,
lower=lower,upper=upper,neighb=3,
optimizer="nlminb",X=X,
start=start,fixed=fixed)
unlist(fit$param)
#fit_update=GeoVarestbootstrap(fit,K=100,parallel=TRUE)
#fit_update$stderr
#fit_update$conf.int
#fit_update$pvalues