R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("geoRglm-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('geoRglm') Loading required package: geoR ------------------------------------------------------------- Functions for geostatistical data analysis For an Introduction to geoR go to http://www.est.ufpr.br/geoR geoR version 1.5-7 (built on 2005/06/07) is now loaded ------------------------------------------------------------- ----------------------------------------------------------- geoRglm - a package for generalised linear spatial models geoRglm version 0.8-11 (2005-06-07) is now loaded ----------------------------------------------------------- > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "asympvar" > > ### * asympvar > > flush(stderr()); flush(stdout()) > > ### Name: asympvar > ### Title: Asymptotic Variance > ### Aliases: asympvar > ### Keywords: spatial > > ### ** Examples > > ## Don't show: > library(geoR) > ## End Don't show > data(p50) > ## Not run: > ##D test <- pois.krige(p50, krige = krige.glm.control(cov.pars = c(1,1), beta = 1), > ##D mcmc.input = mcmc.control(S.scale = 0.5, n.iter = 1000, thin = 1)) > ##D asympvar(test$intensity[45,]) > ##D ass <- asympvar(test$intensity[1:10,], type = "pos") > ## End(Not run) > ## Don't show: > test <- pois.krige(p50, krige = krige.glm.control(cov.pars = c(1,1), beta = 1), + mcmc.input = mcmc.control(S.scale = 0.5, n.iter = 100, thin = 1)) locations need to be specified for prediction; prediction not performed iter. numb. 100 : Acc.-rate = 0.72 MCMC performed: n.iter. = 100 ; thinning = 1 ; burn.in = 0 > asympvar(test$intensity[45,]) calculating the initial monotone sequence estimate [1] 13.04743 > ass <- asympvar(test$intensity[1:10,], type = "pos") calculating the initial positive sequence estimate > ## End Don't show > > > > cleanEx(); ..nameEx <- "binom.krige" > > ### * binom.krige > > flush(stderr()); flush(stdout()) > > ### Name: binom.krige > ### Title: Conditional Simulation and Prediction for the Binomial-logit > ### Spatial model > ### Aliases: binom.krige .mcmc.binom.aux .mcmc.binom.logit > ### Keywords: spatial > > ### ** Examples > > ## Don't show: > library(geoR) > ## End Don't show > if(!exists(".Random.seed", envir=.GlobalEnv, inherits = FALSE)) set.seed(1234) > data(b50) > # First we scale the algorithm, and study how well the chain is mixing. > test <- binom.krige(b50, krige = list(cov.pars = c(1,1), beta = 1), + mcmc.input = mcmc.control(S.scale = 0.2, thin = 1)) locations need to be specified for prediction; prediction not performed iter. numb. 1000 : Acc.-rate = 0.913 MCMC performed: n.iter. = 1000 ; thinning = 1 ; burn.in = 0 > plot(qlogis(test$prevalence[45,]), type = "l") > acf(qlogis(test$prevalence[45,]), type = "correlation", plot = TRUE) > ## Not run: > ##D # Now we make prediction (we decide to thin to every 10, which is the default), > ##D # where we now use S.scale = 0.7. > ##D test2 <- binom.krige(b50, locations = cbind(c(0.5,0.5, 1, 1), c(0.4, 1, 0.4, 1)), > ##D krige = krige.glm.control(cov.pars = c(1,1), beta = 1), > ##D mcmc.input = mcmc.control(S.scale = 0.7)) > ##D image(test2) > ##D contour(test2) > ## End(Not run) > ## Don't show: > y9 <- grf(grid = expand.grid(x = seq(1, 3, l = 3), y = seq(1, 3, l = 3)), cov.pars = c(0.1, 0.2)) grf: simulation on locations provided by the user grf: process with 1 covariance structure(s) grf: nugget effect is: tausq= 0 grf: covariance model 1 is: exponential(sigmasq=0.1, phi=0.2) grf: decomposition algorithm used is: cholesky grf: End of simulation procedure. Number of realizations: 1 > y9$data <- rbinom(9, prob = plogis(y9$data),size=1:9) > y9$units.m <- 1:9 > model2 <- krige.glm.control(cov.pars = c(1,1), beta = 1) > test2 <- binom.krige(y9, locations = cbind(c(0.5,0.5),c(1,0.4)), + krige = model2, mcmc.input = mcmc.control(S.scale = 0.5, thin = 1, n.iter=10), output = list(sim.predict = TRUE)) iter. numb. 10 : Acc.-rate = 1 MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 calculating the initial monotone sequence estimate > model2.u <- krige.glm.control(cov.pars = c(1,1), type.krige = "ok") > test2.unif.beta <- binom.krige(y9, krige = model2.u, mcmc.input =list(S.scale = 0.5, thin = 1, n.iter=10)) locations need to be specified for prediction; prediction not performed iter. numb. 10 : Acc.-rate = 1 MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 > model2 <- krige.glm.control(cov.pars = c(1,1), beta = 1, aniso.pars=c(1,2)) > test2 <- binom.krige(y9, locations = cbind(c(0.5,0.5, 1, 1), c(0.4, 1, 0.4, 1)), + krige = model2, mcmc.input = list(S.scale = 0.5, thin = 1, n.iter=10)) iter. numb. 10 : Acc.-rate = 1 MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 calculating the initial monotone sequence estimate > image(test2) > contour(test2) > dev.off() null device 1 > ## End Don't show > > > > cleanEx(); ..nameEx <- "binom.krige.bayes" > > ### * binom.krige.bayes > > flush(stderr()); flush(stdout()) > > ### Name: binom.krige.bayes > ### Title: Bayesian Posterior Simulation and Prediction for the Binomial > ### Spatial model > ### Aliases: binom.krige.bayes .mcmc.bayes.binom.logit > ### .mcmc.bayes.conj.binom.logit > ### Keywords: spatial > > ### ** Examples > > data(b50) > ## Don't show: > library(geoR) > ## End Don't show > if(!exists(".Random.seed", envir=.GlobalEnv, inherits = FALSE)) set.seed(1234) > ## Not run: > ##D mcmc.10 <- mcmc.control(S.scale = 0.09, n.iter = 1000, phi.scale = 0.2, > ##D phi.start = 4.5) > ##D prior.10 <- prior.glm.control(phi.discrete = seq(0.2,5,0.2)) > ##D test.10 <- binom.krige.bayes(b50, locations=t(cbind(c(2.5,3.5),c(-1,3.5),c(2.5,1.5),c(-1,1.5))), > ##D prior = prior.10, mcmc.input = mcmc.10) > ##D image(test.10) > ##D persp(test.10) > ## End(Not run) > ## Don't show: > b9 <- grf(grid = expand.grid(x = seq(1, 7, l = 3), y = seq(1, 7, l = 3)), cov.pars = c(0.1, 2)) grf: simulation on locations provided by the user grf: process with 1 covariance structure(s) grf: nugget effect is: tausq= 0 grf: covariance model 1 is: exponential(sigmasq=0.1, phi=2) grf: decomposition algorithm used is: cholesky grf: End of simulation procedure. Number of realizations: 1 > b9$units.m <- rep(4,9) > b9$data <- rbinom(9, size = rep(4,9), prob = exp(b9$data)/(1+exp(b9$data))) > ## > b9.pr <- prior.glm.control(phi.discrete = c(2.5, 3)) > b9.mcmc <- mcmc.control(S.scale = 0.1, phi.scale = 1.4,n.iter=10,thin=1) > grid <- expand.grid(x = c(1, 7), y = c(1, 6)) > run.b9 <- binom.krige.bayes(b9, locations = grid, prior = b9.pr, mcmc.input = b9.mcmc) binom.krige.bayes: model with mean being constant MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 binom.krige.bayes: Prediction performed > image.kriging(locations = grid, values = run.b9$pred$median) > pred.grid <- expand.grid(x = seq(0.0125, 0.9875, l = 2), y = seq(0.0125, 0.9875, l = 2)) > prior.b9 <- prior.glm.control(beta.prior = "normal", beta = 0, beta.var.std = 1, phi.prior = "exponential", phi = 2.5, phi.discrete = c(2.5,3), sigmasq.prior = "sc.inv.chisq", df.sigmasq = 5, sigmasq = 0.5) > mcmc.b9 <- mcmc.control(S.scale = 0.05, phi.scale = 1.5, thin = 1, burn.in = 1, n.iter=10) > run.b9 <- binom.krige.bayes(b9, prior = prior.b9, mcmc.input = mcmc.b9, locations = pred.grid, output = list(sim.predict = TRUE)) binom.krige.bayes: model with mean being constant burn-in = 1 is finished; Acc.-rate = 1.00 ; Acc-rate-phi = 1.00 MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 1 binom.krige.bayes: Prediction performed > run.mean <- apply(run.b9$pre$sim,1,mean) > rum.med.ctrl <- apply(run.b9$pre$sim,1,median) > A <- apply(run.b9$pre$sim,2,mean) > #### > prior2.b9 <- prior.glm.control(beta.prior = "normal", beta = c(0,0,0), beta.var.std = matrix(cbind(c(1,0.25,0),c(0.25,0.5,0.125),c(0,0.125,0.5)),3,3), phi.prior = "exponential", phi = 2.5, phi.discrete = c(2.5,3), sigmasq.prior = "sc.inv.chisq", df.sigmasq = 5, sigmasq = 0.5) > mcmc2.b9 <- mcmc.control(S.scale = 0.02, phi.scale = 1.5, thin = 1, n.iter=10) > run2.b9 <- binom.krige.bayes(b9, prior = prior2.b9, mcmc.input = mcmc2.b9, model = list(trend.d ="1st", trend.l ="1st"), locations = pred.grid, output = output.glm.control(sim.predict = TRUE)) binom.krige.bayes: model with mean given by a 1st order polynomial on the coordinates MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 binom.krige.bayes: Prediction performed > ## > prior3.b9 <- prior.glm.control(beta.prior = "normal", beta = 0, + beta.var.std = 100, phi.prior = "exponential", phi = 2.5, phi.discrete=c(2.5,3), + sigmasq.prior = "sc.inv.chisq", df.sigmasq = 5, sigmasq = 0.5,tausq.rel=0.1) > mcmc3.b9 <- mcmc.control(S.scale = 0.0007, phi.scale = 1.5, thin = 1, + n.iter=10) > run3.b9 <- binom.krige.bayes(b9, prior = prior3.b9, mcmc.input = + mcmc3.b9, locations = pred.grid, output = output.glm.control(sim.predict + = TRUE), model = model.glm.control(aniso.pars = c(1,2), kappa =1)) binom.krige.bayes: model with mean being constant MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 binom.krige.bayes: Prediction performed > ## > prior4.b9 <- prior.glm.control(beta.prior = "flat", phi.prior = "exponential", phi = 2.5, phi.discrete = c(2.5,3), sigmasq.prior = "sc.inv.chisq", df.sigmasq = 5, sigmasq = 0.5) > mcmc4.b9 <- mcmc.control(S.scale = 0.2, phi.scale = 1.5, thin = 1, n.iter=10) > run4.b9 <- binom.krige.bayes(b9, prior = prior4.b9, mcmc.input = mcmc4.b9, locations = pred.grid, output = list(sim.predict = TRUE)) binom.krige.bayes: model with mean being constant MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 binom.krige.bayes: Prediction performed > mean(run3.b9$pos$phi$s) [1] 2.5 > mean(run4.b9$pos$phi$s) [1] 2.5 > AA <- apply(run.b9$pre$sim,2,mean) > #### > prior.b9 <- prior.glm.control(beta.prior = "normal", beta = 0, beta.var.std = 1, phi.prior = "fixed", phi = 2.5, sigmasq.prior = "sc.inv.chisq", df.sigmasq = 50, sigmasq = 0.5) > mcmc.b9 <- mcmc.control(S.scale = 0.05, phi.scale = 1.5, thin = 1, n.iter=10) > run3.b9 <- binom.krige.bayes(b9, prior = prior.b9, mcmc.input = mcmc.b9, locations = pred.grid) binom.krige.bayes: model with mean being constant MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 binom.krige.bayes: Prediction performed > prior4.b9 <- prior.glm.control(beta.prior = "flat", phi.prior = "fixed", phi = 2, sigmasq.prior = "sc.inv.chisq", df.sigmasq = 50, sigmasq = 0.5) > mcmc4.b9 <- mcmc.control(S.scale = 0.2, phi.scale = 0.015, thin = 1, n.iter =10) > run4.b9 <- binom.krige.bayes(b9, prior = prior4.b9, mcmc.input = mcmc4.b9, locations = pred.grid, output = list(sim.predict = TRUE)) binom.krige.bayes: model with mean being constant MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 binom.krige.bayes: Prediction performed > ## > prior3.b9 <- prior.glm.control(beta.prior = "normal", beta = 0, beta.var.std = 100, phi.prior = "fixed", phi = 2, sigmasq.prior = "fixed", sigmasq = 0.5) > mcmc3.b9 <- list(S.scale = 0.0007, thin = 1, n.iter =10) > run3.b9 <- binom.krige.bayes(b9, prior = prior3.b9, mcmc.input = mcmc3.b9, locations = pred.grid) binom.krige.bayes: model with mean being constant iter. numb. 10 : Acc.-rate = 1 MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 binom.krige.bayes: Prediction performed > prior4.b9 <- prior.glm.control(beta.prior = "flat", phi.prior = "fixed", phi = 2, sigmasq.prior = "fixed", sigmasq = 0.5) > mcmc4.b9 <- mcmc.control(S.scale = 0.2, thin = 1, n.iter =10) > run4.b9 <- binom.krige.bayes(b9, prior = prior4.b9, mcmc.input = + mcmc4.b9, locations = pred.grid, output = output.glm.control(sim.predict + = TRUE)) binom.krige.bayes: model with mean being constant iter. numb. 10 : Acc.-rate = 1 MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 binom.krige.bayes: Prediction performed > ## End Don't show > > > > cleanEx(); ..nameEx <- "cite.geoRglm" > > ### * cite.geoRglm > > flush(stderr()); flush(stdout()) > > ### Name: cite.geoRglm > ### Title: Citing Package geoRglm in Publications > ### Aliases: cite.geoRglm > ### Keywords: misc > > ### ** Examples > > cite.geoRglm() To cite geoR in publications, use CHRISTENSEN, O.F. & RIBEIRO Jr., P.J. (2002) geoRglm: A package for generalised linear spatial models. R-NEWS, Vol 2, No 2, 26-28. ISSN 1609-3631. Please cite geoRglm when using it for data analysis! A BibTeX entry for LaTeX users is @Article{, title = {Christensen, O.F. and Ribeiro Jr., P.J.}, author = {{geoRglm}: A package for generalised linear spatial models}, journal = {R-NEWS}, year = {2002}, volume = {2}, number = {2}, pages = {26--28}, issn = {1609-3631}, url = {http://cran.R-project.org/doc/Rnews} } > > > > cleanEx(); ..nameEx <- "covariog" > > ### * covariog > > flush(stderr()); flush(stdout()) > > ### Name: covariog > ### Title: Empirical Covariogram for a Model with log-link and an > ### Underlying Gaussian Field > ### Aliases: covariog > ### Keywords: spatial > > ### ** Examples > > data(p50) > covar <- covariog(p50, uvec=c(1:10)) > plot(covar) > ## Now excluding the bin at zero (only assuming log-link). > covar2 <- covariog(p50,uvec=c(1:10), estimator.type="no") > plot(covar2) > > > > cleanEx(); ..nameEx <- "covariog.model.env" > > ### * covariog.model.env > > flush(stderr()); flush(stdout()) > > ### Name: covariog.model.env > ### Title: Envelope for Empirical Covariogram for the Poisson-log normal > ### model > ### Aliases: covariog.model.env > ### Keywords: spatial > > ### ** Examples > > ## Don't show: > library(geoR) > ## End Don't show > data(p50) > covar <- covariog(p50, uvec = c(1:10)) > parmval <- list(cov.model = "exponential", cov.pars = c(0.8,0.1), + beta = 1) > class(parmval) <- "covariomodel" > konvol <- covariog.model.env(p50, obj.covariog = covar, + model.pars = parmval) covariog.env: generating 500 simulations( 50 points). covariog.env: computing the empirical covariogram for the 500 simulations covariog.env: computing the envelopes > plot(covar, envelope.obj = konvol) > lines(parmval, max.dist = 10, lty = 1) > > > > cleanEx(); ..nameEx <- "create.mcmc.coda" > > ### * create.mcmc.coda > > flush(stderr()); flush(stdout()) > > ### Name: create.mcmc.coda > ### Title: Create an mcmc object for the CODA package > ### Aliases: create.mcmc.coda > ### Keywords: spatial > > ### ** Examples > > ## se example in help file for glsm.mcmc > > > > cleanEx(); ..nameEx <- "glsm.krige" > > ### * glsm.krige > > flush(stderr()); flush(stdout()) > > ### Name: glsm.krige > ### Title: Prediction for a Generalised Linear Spatial Model > ### Aliases: glsm.krige > ### Keywords: spatial > > ### ** Examples > > ## Don't show: > library(geoR) > ## End Don't show > if(!exists(".Random.seed", envir=.GlobalEnv, inherits = FALSE)) set.seed(1234) > data(b50) > mcmc.5 <- mcmc.control(S.scale = 0.6, thin=1) > model.5 <- list(cov.pars=c(0.6, 0.01), beta=1, family="binomial") > outmcmc.5 <- glsm.mcmc(b50, model= model.5, mcmc.input = mcmc.5) iter. numb. 1000 : Acc.-rate = 0.645 MCMC performed: n.iter. = 1000 ; thinning = 1 ; burn.in = 0 > test2 <- glsm.krige(outmcmc.5, locations=matrix(c(0.15,0.15,0.005,0.05),2,2)) glsm.krige: Prediction for a generalised linear spatial model > image(test2) > > > > cleanEx(); ..nameEx <- "glsm.mcmc" > > ### * glsm.mcmc > > flush(stderr()); flush(stdout()) > > ### Name: glsm.mcmc > ### Title: Conditional Simulation for a generalised linear spatial model > ### Aliases: glsm.mcmc > ### Keywords: spatial > > ### ** Examples > > ## Don't show: > library(geoR) > ## End Don't show > if(!exists(".Random.seed", envir=.GlobalEnv, inherits = FALSE)) set.seed(1234) > data(b50) > test <- glsm.mcmc(b50, model = list(family="binomial", + cov.pars = c(1,1), beta = c(1,0), trend =~ rnorm(50), + cov.model="spherical", nugget=0.3), + mcmc.input = mcmc.control(S.scale = 0.2, thin = 1)) iter. numb. 1000 : Acc.-rate = 0.904 MCMC performed: n.iter. = 1000 ; thinning = 1 ; burn.in = 0 > ## visulalising the MCMC output using the coda package > test.coda <- create.mcmc.coda(test, mcmc.input = list(thin = 1)) Loading required package: coda > ## Not run: > ##D plot(test.coda) > ##D autocorr.plot(test.coda) > ## End(Not run) > ## Don't show: > plot(test.coda,ask=FALSE) > autocorr.plot(test.coda,ask=FALSE) > ## End Don't show > > > > cleanEx(); ..nameEx <- "hist.glm.krige.bayes" > > ### * hist.glm.krige.bayes > > flush(stderr()); flush(stdout()) > > ### Name: hist.glm.krige.bayes > ### Title: Plots Sample from Posterior Distributions > ### Aliases: hist.glm.krige.bayes > ### Keywords: spatial dplot > > ### ** Examples > > ## See documentation for binom.krige.bayes and pois.krige.bayes > > > > cleanEx(); ..nameEx <- "image.glm.krige.bayes" > > ### * image.glm.krige.bayes > > flush(stderr()); flush(stdout()) > > ### Name: image.glm.krige.bayes > ### Title: Plots Results of the Predictive Distribution > ### Aliases: image.glm.krige.bayes persp.glm.krige.bayes > ### Keywords: spatial > > ### ** Examples > > #See examples in the documentation for the functions binom.krige.bayes and pois.krige.bayes . > > > > cleanEx(); ..nameEx <- "likfit.glsm" > > ### * likfit.glsm > > flush(stderr()); flush(stdout()) > > ### Name: likfit.glsm > ### Title: Monte Carlo Maximum Likelihood Estimation in a Generalised > ### Linear Spatial Model > ### Aliases: likfit.glsm .func.val .NewtonRhapson.step .maxim.aux1 .lik.sim > ### .lik.sim.boxcox > ### Keywords: spatial > > ### ** Examples > > data(p50) > ## Don't show: > library(geoR) > ## End Don't show > ## Not run: > ##D mcmc.5 <- mcmc.control(S.scale = 0.6, thin=20, n.iter=50000, burn.in=1000) > ##D model.5 <- list(cov.pars=c(0.6, 0.01), beta=1, family="poisson") > ##D outmcmc.5 <- glsm.mcmc(p50, model= model.5, mcmc.input = mcmc.5) > ##D mcmcobj.5 <- prepare.likfit.glsm(outmcmc.5) > ##D lik.5 <- likfit.glsm(mcmcobj.5, ini.phi = 0.1, fix.nugget.rel = TRUE) > ##D print(lik.5) > ##D summary(lik.5) > ##D lik.5.sph.nugget <- likfit.glsm(mcmcobj.5, ini.phi = 1, > ##D cov.model = "spherical", nugget.rel = 0.385) > ##D print(lik.5.sph.nugget) > ##D summary(lik.5.sph.nugget) > ## End(Not run) > ## Don't show: > y9 <- list(data=p50$data[1:9],coords=p50$coords[1:9,]) > class(y9) <- "geodata" > mcmc.5 <- mcmc.control(S.scale = 0.6, n.iter = 100) > model.5 <- list(cov.pars=c(0.1, 1), beta=1.1, family="poisson") > outmcmc.5 <- glsm.mcmc(y9, model= model.5, mcmc.input = mcmc.5) iter. numb. 100 : Acc.-rate = 0.85 MCMC performed: n.iter. = 100 ; thinning = 10 ; burn.in = 0 > mcmcobj.5 <- prepare.likfit.glsm(outmcmc.5) > lik.5 <- likfit.glsm(mcmcobj.5, ini.phi = 0.4, fix.nugget.rel = TRUE) -------------------------------------------------------------------- likfit.glsm: likelihood maximisation using the function optim. phi = 0.4 tausq.rel = 0 log-likelihood = 0.717398106435698 phi = 0.401 tausq.rel = 0 log-likelihood = 0.718338603169363 phi = 0.399 tausq.rel = 0 log-likelihood = 0.716458514767075 phi = 1.34004420114402 tausq.rel = 0 log-likelihood = 1.39401783150535 phi = 1.34104420114402 tausq.rel = 0 log-likelihood = 1.39445515325374 phi = 1.33904420114402 tausq.rel = 0 log-likelihood = 1.39358004549500 phi = 2.15860720457089 tausq.rel = 0 log-likelihood = 1.60616827730521 phi = 2.15960720457089 tausq.rel = 0 log-likelihood = 1.6063443762129 phi = 2.15760720457089 tausq.rel = 0 log-likelihood = 1.60599197291596 phi = 2.71047603722835 tausq.rel = 0 log-likelihood = 1.69525386478245 phi = 2.71147603722835 tausq.rel = 0 log-likelihood = 1.69537085778458 phi = 2.70947603722835 tausq.rel = 0 log-likelihood = 1.69513669146784 phi = 3.80344282019701 tausq.rel = 0 log-likelihood = 1.75091306674707 phi = 3.80444282019701 tausq.rel = 0 log-likelihood = 1.75092576075904 phi = 3.80244282019701 tausq.rel = 0 log-likelihood = 1.7509003239062 phi = 3.93663740950332 tausq.rel = 0 log-likelihood = 1.75219285388790 phi = 3.93763740950332 tausq.rel = 0 log-likelihood = 1.75219946736117 phi = 3.93563740950332 tausq.rel = 0 log-likelihood = 1.75218619773332 phi = 4.08190000087 tausq.rel = 0 log-likelihood = 1.75272718639221 phi = 4.08290000087 tausq.rel = 0 log-likelihood = 1.75272802734744 phi = 4.08090000087 tausq.rel = 0 log-likelihood = 1.75272630843642 phi = 4.1035171413812 tausq.rel = 0 log-likelihood = 1.75273717989185 phi = 4.1045171413812 tausq.rel = 0 log-likelihood = 1.75273722966910 phi = 4.1025171413812 tausq.rel = 0 log-likelihood = 1.75273709387728 phi = 4.1053713485448 tausq.rel = 0 log-likelihood = 1.75273724351767 phi = 4.1063713485448 tausq.rel = 0 log-likelihood = 1.75273722619547 phi = 4.1043713485448 tausq.rel = 0 log-likelihood = 1.75273722466704 phi = 4.10539245641799 tausq.rel = 0 log-likelihood = 1.75273724352561 phi = 4.10639245641799 tausq.rel = 0 log-likelihood = 1.75273722544028 phi = 4.10439245641799 tausq.rel = 0 log-likelihood = 1.75273722543887 likfit.glsm: end of numerical maximisation. > print(lik.5) likfit.glsm: estimated model parameters: beta sigmasq phi "1.1896" "0.3707" "4.1054" likfit.glsm : maximised log-likelihood = 1.753 > summary(lik.5) Summary of the maximum likelihood parameter estimation ----------------------------------- Family = poisson , Link = log Parameters of the mean component (trend): beta "1.190" Parameters of the spatial component: correlation function: exponential (estimated) variance parameter sigmasq (partial sill) = 0.3707 (estimated) cor. fct. parameter phi (range parameter) = 4.105 (fixed) relative nugget = 0 Maximised Likelihood: log.L n.params "1.753" "3" Call: likfit.glsm(mcmc.obj = mcmcobj.5, ini.phi = 0.4, fix.nugget.rel = TRUE) > data(b50) > b9 <- list(data=b50$data[1:9],coords=b50$coords[1:9,]) > trend5 <- 1:9-5 > model5 <- list(cov.pars=c(0.1, 1), beta=c(1.2,0),family="binomial",trend=~trend5) > outmcmc5 <- glsm.mcmc(b9, model= model5, mcmc.input = mcmc.5) iter. numb. 100 : Acc.-rate = 0.9 MCMC performed: n.iter. = 100 ; thinning = 10 ; burn.in = 0 > mcmcobj5 <- prepare.likfit.glsm(outmcmc5) > lik5 <- likfit.glsm(mcmcobj5, trend=model5$trend, ini.phi = 1, + fix.nugget.rel = TRUE) -------------------------------------------------------------------- likfit.glsm: likelihood maximisation using the function optim. phi = 1 tausq.rel = 0 log-likelihood = 1.22418456935452 phi = 1.001 tausq.rel = 0 log-likelihood = 1.22363383566896 phi = 0.999 tausq.rel = 0 log-likelihood = 1.22473499792253 phi = 0.449418873216366 tausq.rel = 0 log-likelihood = 1.89375512103706 phi = 0.450418873216366 tausq.rel = 0 log-likelihood = 1.89232365645707 phi = 0.448418873216366 tausq.rel = 0 log-likelihood = 1.89518456010697 phi = 0 tausq.rel = 0 log-likelihood = 2.15186195278332 phi = 0.001 tausq.rel = 0 log-likelihood = 2.15186195278332 phi = 0 tausq.rel = 0 log-likelihood = 2.15186195278332 likfit.glsm: end of numerical maximisation. > print(lik5) likfit.glsm: estimated model parameters: beta0 beta1 sigmasq phi " 0.8356" "-0.0432" " 0.0680" " 0.0000" likfit.glsm : maximised log-likelihood = 2.152 > summary(lik5) Summary of the maximum likelihood parameter estimation ----------------------------------- Family = binomial , Link = logit Parameters of the mean component (trend): beta0 beta1 " 0.83556" "-0.04315" Parameters of the spatial component: correlation function: exponential (estimated) variance parameter sigmasq (partial sill) = 0.068 (estimated) cor. fct. parameter phi (range parameter) = 0 (fixed) relative nugget = 0 Maximised Likelihood: log.L n.params "2.152" "4" Call: likfit.glsm(mcmc.obj = mcmcobj5, trend = model5$trend, ini.phi = 1, fix.nugget.rel = TRUE) > ## End Don't show > > > > cleanEx(); ..nameEx <- "lines.covariomodel" > > ### * lines.covariomodel > > flush(stderr()); flush(stdout()) > > ### Name: lines.covariomodel > ### Title: Line with a Covariogram Model > ### Aliases: lines.covariomodel > ### Keywords: spatial aplot > > ### ** Examples > > ## Don't show: > library(geoR) > ## End Don't show > sim <- grf(100, cov.pars = c(0.1, 0.2)) grf: simulation(s) on randomly chosen locations with 100 points grf: process with 1 covariance structure(s) grf: nugget effect is: tausq= 0 grf: covariance model 1 is: exponential(sigmasq=0.1, phi=0.2) grf: decomposition algorithm used is: cholesky grf: End of simulation procedure. Number of realizations: 1 > sim$data <- rpois(100, lambda = exp(sim$data+1)) > # data generated from the poisson-log normal model > covario <- covariog(sim, max.dist = 1) # sample covariogram > plot(covario) > parmval <- list(cov.model = "exponential", cov.pars = c(0.1, 0.1), + max.dist = 1, nugget = 0.01) > class(parmval) <- "covariomodel" > lines(parmval, lty = 2) > > > > cleanEx(); ..nameEx <- "plot.covariogram" > > ### * plot.covariogram > > flush(stderr()); flush(stdout()) > > ### Name: plot.covariogram > ### Title: Plot Empirical Covariogram > ### Aliases: plot.covariogram > ### Keywords: spatial dplot > > ### ** Examples > > data(p50) > covario <- covariog(p50, uvec = c(1:10)) # sample covariogram > plot(covario) > > > > cleanEx(); ..nameEx <- "pois.krige" > > ### * pois.krige > > flush(stderr()); flush(stdout()) > > ### Name: pois.krige > ### Title: Conditional Simulation and Prediction for the Poisson Spatial > ### model with a link function from the Box-Cox class > ### Aliases: pois.krige .mcmc.aux .mcmc.boxcox.aux .mcmc.pois.log > ### .mcmc.pois.boxcox > ### Keywords: spatial > > ### ** Examples > > ## Don't show: > library(geoR) > ## End Don't show > if(!exists(".Random.seed", envir=.GlobalEnv, inherits = FALSE)) set.seed(1234) > data(p50) > # First we scale the algorithm, and study how well the chain is mixing. > test <- pois.krige(p50, krige = list(cov.pars = c(1,1), beta = 1), + mcmc.input = mcmc.control(S.scale = 0.2, thin = 1)) locations need to be specified for prediction; prediction not performed iter. numb. 1000 : Acc.-rate = 0.893 MCMC performed: n.iter. = 1000 ; thinning = 1 ; burn.in = 0 > plot(log(test$intensity[45,]), type = "l") > acf(log(test$intensity[45,]), type = "correlation", plot = TRUE) > ## Not run: > ##D # Now we make prediction (we decide to thin to every 10, which is the default), > ##D # where we now use S.scale = 0.55. > ##D test2 <- pois.krige(p50, locations = cbind(c(0.5,0.5), c(1,0.4)), > ##D krige = krige.glm.control(cov.pars = c(1,1), beta = 1), > ##D mcmc.input = mcmc.control(S.scale = 0.55)) > ## End(Not run) > ## Don't show: > y9 <- grf(grid = expand.grid(x = seq(1, 3, l = 3), y = seq(1, 3, l = 3)), cov.pars = c(0.1, 0.2)) grf: simulation on locations provided by the user grf: process with 1 covariance structure(s) grf: nugget effect is: tausq= 0 grf: covariance model 1 is: exponential(sigmasq=0.1, phi=0.2) grf: decomposition algorithm used is: cholesky grf: End of simulation procedure. Number of realizations: 1 > y9$data <- rpois(9, lambda = exp(y9$data)) > model2 <- krige.glm.control(cov.pars = c(1,1), beta = 1) > test2 <- pois.krige(y9, locations = cbind(c(0.5,0.5),c(1,0.4)), + krige = model2, mcmc.input = mcmc.control(S.scale = 0.5, thin = 1, n.iter=10), output = list(sim.predict = TRUE)) iter. numb. 10 : Acc.-rate = 1 MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 calculating the initial monotone sequence estimate > model2.u <- krige.glm.control(cov.pars = c(1,1), type.krige = "ok") > test2.unif.beta <- pois.krige(y9, krige = model2.u, mcmc.input =list(S.scale = 0.5, thin = 1, n.iter=10)) locations need to be specified for prediction; prediction not performed iter. numb. 10 : Acc.-rate = 0.8 MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 > model2 <- krige.glm.control(cov.pars = c(1,1), beta = 1, aniso.pars=c(1,2)) > test2 <- pois.krige(y9, locations = cbind(c(0.5,0.5),c(1,0.4)), + krige = model2, mcmc.input = list(S.scale = 0.5, thin = 1, n.iter=10)) iter. numb. 10 : Acc.-rate = 0.9 MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 calculating the initial monotone sequence estimate > ## End Don't show > > > > cleanEx(); ..nameEx <- "pois.krige.bayes" > > ### * pois.krige.bayes > > flush(stderr()); flush(stdout()) > > ### Name: pois.krige.bayes > ### Title: Bayesian Posterior Simulation and Prediction for the Poisson > ### Spatial model > ### Aliases: pois.krige.bayes .mcmc.bayes.pois.log .mcmc.bayes.pois.boxcox > ### .mcmc.bayes.conj.pois.log .mcmc.bayes.conj.pois.boxcox > ### Keywords: spatial > > ### ** Examples > > data(p50) > ## Don't show: > library(geoR) > ## End Don't show > if(!exists(".Random.seed", envir=.GlobalEnv, inherits = FALSE)) + set.seed(1234) > ## Not run: > ##D ## MCMC with fixed phi > ##D prior.5 <- prior.glm.control(phi.prior = "fixed", phi = 0.1) > ##D mcmc.5 <- mcmc.control(S.scale = 0.01, thin = 1) > ##D test.5 <- pois.krige.bayes(p50, prior = prior.5, mcmc.input = mcmc.5) > ##D par(mfrow=c(1,2)) > ##D hist(test.5) > ##D ## Now chose S.scale (Acc-rate=0.60 is preferable). > ##D mcmc.5.new <- mcmc.control(S.scale = 0.08, thin = 100) > ##D test.5.new <- pois.krige.bayes(p50, > ##D locations = t(cbind(c(2.5,3.5),c(-6,3.5),c(2.5,-3.5),c(-6,-3.5))), > ##D prior = prior.5, mcmc.input = mcmc.5.new, > ##D output = list(threshold = 10, quantile = c(0.49999,0.99))) > ##D image(test.5.new) > ##D persp(test.5.new) > ##D ## MCMC with random phi. > ##D ## Note here that we can start with the S.scale from above. > ##D mcmc.6 <- mcmc.control(S.scale = 0.08, n.iter = 2000, thin = 100, > ##D phi.scale = 0.01) > ##D prior.6 <- prior.glm.control(phi.discrete = seq(0.02, 1, 0.02)) > ##D test.6 <- pois.krige.bayes(p50, prior = prior.6, mcmc.input = mcmc.6) > ##D ## Acc-rate=0.60 , acc-rate-phi = 0.25-0.30 are preferable > ##D mcmc.6.new <- mcmc.control(S.scale=0.08, n.iter = 400000, thin = 200, > ##D burn.in = 5000, phi.scale = 0.12, phi.start = 0.5) > ##D prior.6 <- prior.glm.control(phi.prior = "uniform", > ##D phi.discrete = seq(0.02, 1, 0.02)) > ##D test.6.new <- pois.krige.bayes(p50, > ##D locations = t(cbind(c(2.5,3.5), c(-60,-37))), > ##D prior = prior.6, mcmc.input = mcmc.6.new) > ##D par(mfrow=c(3,1)) > ##D hist(test.6.new) > ## End(Not run) > ## Don't show: > y9 <- list(data=p50$data[c(1:4,10:14)],coords=p50$coords[c(1:4,10:14),],units.m=p50$units.m[c(1:4,10:14)]) > class(y9) <- "geodata" > mcmc5 <- mcmc.control(S.scale = 0.1, thin = 1, n.iter=10) > test5 <- pois.krige.bayes(y9, locations = t(cbind(c(2,1),c(-6050,-3270),c(1.1,2.1),c(2,3))), + prior = list(phi.prior = "fixed", phi= 1), mcmc.input = mcmc5, + output = list(threshold = c(9,10), quantile = c(0.05,0.99), + sim.predict=TRUE)) pois.krige.bayes: model with mean being constant MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 pois.krige.bayes: Prediction performed > par(mfrow=c(1,2)) > hist(test5) > prior6 <- prior.glm.control(phi.prior = "uniform", phi.discrete = + c(0.98,1.02), tausq.rel = 0.05) > mcmc6 <- list(S.scale = 0.1, thin = 1, n.iter=10, burn.in = 1, phi.scale = 0.01, phi.start = 1) > test6 <- pois.krige.bayes(y9, locations=t(cbind(c(2.5,3.5),c(-60,-37))), + prior = prior6, mcmc.input = mcmc6) pois.krige.bayes: model with mean being constant burn-in = 1 is finished; Acc.-rate = 1.00 ; Acc-rate-phi = 0.00 MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 1 pois.krige.bayes: Prediction performed > par(mfrow=c(3,1)) > hist(test6,density.est=FALSE) > run2.y9 <- pois.krige.bayes(y9, prior = list(phi.prior = "fixed", phi= 1), mcmc.input = mcmc5, + model = list(trend.d ="1st", trend.l ="1st", aniso.pars =c(1,2), kappa + =1, lambda= 0.5), locations = t(cbind(c(2.5,3.5),c(-60,-37))) , + output = output.glm.control(sim.predict = TRUE)) pois.krige.bayes: model with mean given by a 1st order polynomial on the coordinates MCMC performed: n.iter. = 10 ; thinning = 1 ; burn.in = 0 pois.krige.bayes: Prediction performed > ## End Don't show > > > > graphics::par(get("par.postscript", env = .CheckExEnv)) > cleanEx(); ..nameEx <- "prepare.likfit.glsm" > > ### * prepare.likfit.glsm > > flush(stderr()); flush(stdout()) > > ### Name: prepare.likfit.glsm > ### Title: Prepare for Monte Carlo MLE > ### Aliases: prepare.likfit.glsm > ### Keywords: spatial > > ### ** Examples > > ## Not run: > ##D data(p50) > ##D mcmc.4 <- mcmc.control(S.scale = 0.000035, n.iter = 1000) > ##D kr4 <- list(family="poisson", cov.pars=c(1,1), beta=0) > ##D condsim.4 <- glsm.mcmc(p50, mcmc.input = mcmc.4, model = kr4) > ##D mcmcobj.4 <- prepare.likfit.glsm(condsim.4) > ##D lik.4 <- likfit.glsm(mcmcobj.4, ini.phi = 10, fix.nugget.rel = TRUE) > ##D lik.4.spherical.nugget <- likfit.glsm(mcmcobj.4, ini.phi = 5.59, > ##D cov.model = "spherical", nugget.rel = 0.385) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "proflik.glsm" > > ### * proflik.glsm > > flush(stderr()); flush(stdout()) > > ### Name: proflik.glsm > ### Title: Computes Profile Likelihood for generalised linear spatial > ### models > ### Aliases: proflik.glsm > ### Keywords: spatial > > ### ** Examples > > data(p50) > ## Don't show: > library(geoR) > ## End Don't show > ## Not run: > ##D mcmc.5 <- mcmc.control(S.scale = 0.6, thin=20, n.iter=50000, burn.in=1000) > ##D model.5 <- list(cov.pars=c(0.6, 0.01), beta=1, family="poisson") > ##D outmcmc.5 <- glsm.mcmc(p50, model= model.5, mcmc.input = mcmc.5) > ##D mcmcobj.5 <- prepare.likfit.glsm(outmcmc.5) > ##D lik.5.sph.nugget <- likfit.glsm(mcmcobj.5, ini.phi = 1, > ##D cov.model = "spherical", nugget.rel = 0.385) > ##D pr.lik.5.sph.nugget <- proflik.glsm(mcmcobj.5, lik.5.sph.nugget, > ##D phi.values = seq(0.5,5,l=10), nugget.rel.values=seq(0.5,5,l=10)) > ##D plot(pr.lik.5.sph.nugget) > ## End(Not run) > ## Don't show: > y9 <- list(data=p50$data[1:9],coords=p50$coords[1:9,]) > class(y9) <- "geodata" > mcmc.5 <- mcmc.control(S.scale = 0.6, n.iter = 100) > model.5 <- list(cov.pars=c(0.1, 1), beta=1.1, family="poisson") > outmcmc.5 <- glsm.mcmc(y9, model= model.5, mcmc.input = mcmc.5) iter. numb. 100 : Acc.-rate = 0.85 MCMC performed: n.iter. = 100 ; thinning = 10 ; burn.in = 0 > mcmcobj.5 <- prepare.likfit.glsm(outmcmc.5) > lik.5.sph.nugget <- likfit.glsm(mcmcobj.5, ini.phi = 1, + cov.model = "spherical", nugget.rel = 0.385) -------------------------------------------------------------------- likfit.glsm: likelihood maximisation using the function optim. phi = 1 tausq.rel = 0.385 log-likelihood = 0.56327164132328 phi = 1.001 tausq.rel = 0.385 log-likelihood = 0.563273722272539 phi = 0.999 tausq.rel = 0.385 log-likelihood = 0.56327164132328 phi = 1 tausq.rel = 0.386 log-likelihood = 0.563271641323281 phi = 1 tausq.rel = 0.384 log-likelihood = 0.563271641323272 phi = 1.00104047462912 tausq.rel = 0.385000000004774 log-likelihood = 0.56327389392031 phi = 1.00204047462912 tausq.rel = 0.385000000004774 log-likelihood = 0.563280284453339 phi = 1.00004047462912 tausq.rel = 0.385000000004774 log-likelihood = 0.563271644739924 phi = 1.00104047462912 tausq.rel = 0.386000000004774 log-likelihood = 0.563273892295043 phi = 1.00104047462912 tausq.rel = 0.384000000004774 log-likelihood = 0.563273895547914 phi = 1.00536033133658 tausq.rel = 0.384998373569232 log-likelihood = 0.563330830196948 phi = 1.00636033133658 tausq.rel = 0.384998373569232 log-likelihood = 0.563354781045681 phi = 1.00436033133658 tausq.rel = 0.384998373569232 log-likelihood = 0.563310897180324 phi = 1.00536033133658 tausq.rel = 0.385998373569232 log-likelihood = 0.563330787492285 phi = 1.00536033133658 tausq.rel = 0.383998373569232 log-likelihood = 0.563330872963327 phi = 1.02263975816641 tausq.rel = 0.384991867827065 log-likelihood = 0.564286307911558 phi = 1.02363975816641 tausq.rel = 0.384991867827065 log-likelihood = 0.564375400912865 phi = 1.02163975816641 tausq.rel = 0.384991867827065 log-likelihood = 0.564200772207379 phi = 1.02263975816641 tausq.rel = 0.385991867827065 log-likelihood = 0.564285575883597 phi = 1.02263975816641 tausq.rel = 0.383991867827065 log-likelihood = 0.564287040997298 phi = 1.09175746548573 tausq.rel = 0.384965844858396 log-likelihood = 0.577576289882345 phi = 1.09275746548573 tausq.rel = 0.384965844858396 log-likelihood = 0.577858511694273 phi = 1.09075746548573 tausq.rel = 0.384965844858396 log-likelihood = 0.577296223535745 phi = 1.09175746548573 tausq.rel = 0.385965844858396 log-likelihood = 0.577565980733475 phi = 1.09175746548573 tausq.rel = 0.383965844858396 log-likelihood = 0.577586613911813 phi = 1.36822829476302 tausq.rel = 0.384861752983721 log-likelihood = 0.699193231207645 phi = 1.36922829476302 tausq.rel = 0.384861752983721 log-likelihood = 0.699699740618075 phi = 1.36722829476302 tausq.rel = 0.384861752983721 log-likelihood = 0.698686778691911 phi = 1.36822829476302 tausq.rel = 0.385861752983721 log-likelihood = 0.699096394793436 phi = 1.36822829476302 tausq.rel = 0.383861752983721 log-likelihood = 0.699290205677629 phi = 2.47411161187216 tausq.rel = 0.384445385485020 log-likelihood = 1.13391044348603 phi = 2.47511161187216 tausq.rel = 0.384445385485020 log-likelihood = 1.13418671237478 phi = 2.47311161187216 tausq.rel = 0.384445385485020 log-likelihood = 1.13363406148365 phi = 2.47411161187216 tausq.rel = 0.385445385485020 log-likelihood = 1.13351859434204 phi = 2.47411161187216 tausq.rel = 0.383445385485020 log-likelihood = 1.13430281805481 phi = 3.80318982741194 tausq.rel = 0.383944984616663 log-likelihood = 1.44151514778708 phi = 3.80418982741194 tausq.rel = 0.383944984616663 log-likelihood = 1.44171393197424 phi = 3.80218982741194 tausq.rel = 0.383944984616663 log-likelihood = 1.44131632512514 phi = 3.80318982741194 tausq.rel = 0.384944984616663 log-likelihood = 1.44085801493393 phi = 3.80318982741194 tausq.rel = 0.382944984616663 log-likelihood = 1.44217306534857 phi = 9.11950268957102 tausq.rel = 0.381943381143236 log-likelihood = 1.21126705156669 phi = 9.12050268957102 tausq.rel = 0.381943381143236 log-likelihood = 1.21116689556053 phi = 9.11850268957102 tausq.rel = 0.381943381143236 log-likelihood = 1.21136720432651 phi = 9.11950268957102 tausq.rel = 0.382943381143236 log-likelihood = 1.20995164857927 phi = 9.11950268957102 tausq.rel = 0.380943381143236 log-likelihood = 1.21258565780483 phi = 5.3203633549692 tausq.rel = 0.383373765450055 log-likelihood = 1.55708052798180 phi = 5.3213633549692 tausq.rel = 0.383373765450055 log-likelihood = 1.55699609214037 phi = 5.3193633549692 tausq.rel = 0.383373765450055 log-likelihood = 1.55716454851752 phi = 5.3203633549692 tausq.rel = 0.384373765450055 log-likelihood = 1.55622792730850 phi = 5.3203633549692 tausq.rel = 0.382373765450055 log-likelihood = 1.55793165676179 phi = 4.87046627897707 tausq.rel = 0.383543152687665 log-likelihood = 1.56511920789716 phi = 4.87146627897707 tausq.rel = 0.383543152687665 log-likelihood = 1.56514619991236 phi = 4.86946627897707 tausq.rel = 0.383543152687665 log-likelihood = 1.56509207966721 phi = 4.87046627897707 tausq.rel = 0.384543152687665 log-likelihood = 1.56419306358754 phi = 4.87046627897707 tausq.rel = 0.382543152687665 log-likelihood = 1.56604650900067 phi = 5.04041683975272 tausq.rel = 0.383479165928123 log-likelihood = 1.5676987557206 phi = 5.04141683975272 tausq.rel = 0.383479165928123 log-likelihood = 1.56769823946270 phi = 5.03941683975272 tausq.rel = 0.383479165928123 log-likelihood = 1.56769903699241 phi = 5.04041683975272 tausq.rel = 0.384479165928123 log-likelihood = 1.56675871985744 phi = 5.04041683975272 tausq.rel = 0.382479165928123 log-likelihood = 1.56863966203984 phi = 8.99700588295754 tausq.rel = 0.363435870617325 log-likelihood = 1.24860737883589 phi = 8.99800588295754 tausq.rel = 0.363435870617325 log-likelihood = 1.24850763212249 phi = 8.99600588295754 tausq.rel = 0.363435870617325 log-likelihood = 1.24870712005664 phi = 8.99700588295754 tausq.rel = 0.364435870617325 log-likelihood = 1.24721559200557 phi = 8.99700588295754 tausq.rel = 0.362435870617325 log-likelihood = 1.25000057435997 phi = 5.09561489772348 tausq.rel = 0.383199543514875 log-likelihood = 1.56757464129795 phi = 5.09661489772348 tausq.rel = 0.383199543514875 log-likelihood = 1.56756075613476 phi = 5.09461489772348 tausq.rel = 0.383199543514875 log-likelihood = 1.56758827663138 phi = 5.09561489772348 tausq.rel = 0.384199543514875 log-likelihood = 1.56663670986316 phi = 5.09561489772348 tausq.rel = 0.382199543514875 log-likelihood = 1.56851324233636 phi = 5.05873376530295 tausq.rel = 0.383386376016414 log-likelihood = 1.56773906013907 phi = 5.05973376530295 tausq.rel = 0.383386376016414 log-likelihood = 1.56773419891437 phi = 5.05773376530295 tausq.rel = 0.383386376016414 log-likelihood = 1.56774368219408 phi = 5.05873376530295 tausq.rel = 0.384386376016414 log-likelihood = 1.56679919016668 phi = 5.05873376530295 tausq.rel = 0.382386376016414 log-likelihood = 1.56867974232217 phi = 5.05794640543615 tausq.rel = 0.363822211281993 log-likelihood = 1.58627836579605 phi = 5.05894640543615 tausq.rel = 0.363822211281993 log-likelihood = 1.58627240550580 phi = 5.05694640543615 tausq.rel = 0.363822211281993 log-likelihood = 1.58628405261796 phi = 5.05794640543615 tausq.rel = 0.364822211281993 log-likelihood = 1.58532502352467 phi = 5.05794640543615 tausq.rel = 0.362822211281993 log-likelihood = 1.58723223041202 phi = 5.05479696596893 tausq.rel = 0.285565552344309 log-likelihood = 1.66006445324987 phi = 5.05579696596893 tausq.rel = 0.285565552344309 log-likelihood = 1.66002092050849 phi = 5.05379696596893 tausq.rel = 0.285565552344309 log-likelihood = 1.66010735049725 phi = 5.05479696596893 tausq.rel = 0.286565552344309 log-likelihood = 1.65918408076816 phi = 5.05479696596893 tausq.rel = 0.284565552344309 log-likelihood = 1.66094104874135 phi = 5.04330437948185 tausq.rel = 3.47060008933659e-17 log-likelihood = 2.12879009254783 phi = 5.04430437948185 tausq.rel = 3.47060008933659e-17 log-likelihood = 2.12908052486638 phi = 5.04230437948185 tausq.rel = 3.47060008933659e-17 log-likelihood = 2.12849927198043 phi = 5.04330437948185 tausq.rel = 0.00100000000000003 log-likelihood = 2.12664361476994 phi = 5.04330437948185 tausq.rel = 0 log-likelihood = 2.12879009254783 phi = 6.26301213847719 tausq.rel = 0 log-likelihood = 2.25375896116863 phi = 6.26401213847719 tausq.rel = 0 log-likelihood = 2.25373922156794 phi = 6.26201213847718 tausq.rel = 0 log-likelihood = 2.25377851818943 phi = 6.26301213847719 tausq.rel = 0.001 log-likelihood = 2.24985017210123 phi = 6.26301213847719 tausq.rel = 0 log-likelihood = 2.25375896116863 phi = 6.18577350794054 tausq.rel = 0 log-likelihood = 2.25472340797443 phi = 6.18677350794054 tausq.rel = 0 log-likelihood = 2.25471810505452 phi = 6.18477350794054 tausq.rel = 0 log-likelihood = 2.25472851916010 phi = 6.18577350794054 tausq.rel = 0.001 log-likelihood = 2.25086233292011 phi = 6.18577350794054 tausq.rel = 0 log-likelihood = 2.25472340797443 phi = 6.15792374389439 tausq.rel = 0 log-likelihood = 2.25479357746614 phi = 6.15892374389439 tausq.rel = 0 log-likelihood = 2.25479366561732 phi = 6.15692374389439 tausq.rel = 0 log-likelihood = 2.25479329370186 phi = 6.15792374389439 tausq.rel = 0.001 log-likelihood = 2.25095203951909 phi = 6.15792374389439 tausq.rel = 0 log-likelihood = 2.25479357746614 phi = 6.1588840384948 tausq.rel = 0 log-likelihood = 2.2547936658447 phi = 6.1598840384948 tausq.rel = 0 log-likelihood = 2.25479356628612 phi = 6.1578840384948 tausq.rel = 0 log-likelihood = 2.25479356992935 phi = 6.1588840384948 tausq.rel = 0.001 log-likelihood = 2.25095143309063 phi = 6.1588840384948 tausq.rel = 0 log-likelihood = 2.2547936658447 phi = 6.15887472284114 tausq.rel = 0 log-likelihood = 2.25479366585339 phi = 6.15987472284114 tausq.rel = 0 log-likelihood = 2.25479356811511 phi = 6.15787472284114 tausq.rel = 0 log-likelihood = 2.25479356811644 phi = 6.15887472284114 tausq.rel = 0.001 log-likelihood = 2.25095143983222 phi = 6.15887472284114 tausq.rel = 0 log-likelihood = 2.25479366585339 likfit.glsm: end of numerical maximisation. > pr.lik.5.sph.nugget <- proflik.glsm(mcmcobj.5, lik.5.sph.nugget, + phi.values = seq(0.5,5,l=3), nugget.rel.values=seq(0.5,5,l=3)) proflik.glsm: computing 2-D profile likelihood for the phi and relative nugget parameters > plot(pr.lik.5.sph.nugget) > ## End Don't show > > > > cleanEx(); ..nameEx <- "summary.likGLSM" > > ### * summary.likGLSM > > flush(stderr()); flush(stdout()) > > ### Name: summary.likGLSM > ### Title: Summarizes Parameter Estimation Results for Generalised linear > ### Spatial Models > ### Aliases: summary.likGLSM print.summary.likGLSM print.likGLSM > ### Keywords: spatial print > > ### ** Examples > > ## See examples for the function likfit.glsm > > > > ### *