I have a logistic regression model in GeoBugs to estimate predictors of prevalence of a disease. Can anyone tell me if there is a simple way to determine the lower and upper bounds of phi for spatial.exp.

This is part of the model:

Infected[i] ~ dbin(p[i], tested[i])
logit(p[i]) <- alpha + beta1*covar1[i] + beta2*covar2[i]  + u[i] 
mu[i] <- 0
u[1:N] ~ spatial.exp(mu[], x[], y[], tau, phi, 1)

This how I have specified the priors:

phi ~ dunif(0.25, 20)

At the moment my selection has been arbitrary. The GeoBugs manual only goes as far as saying that the bounds of the distribution are determined by the data.

What I would like to know is there a dummies version of the best way to select the values.


I have worked this out myself. The lower bound for phi can be estiamted from

-ln(0.5)/(max separating distance between points)

To find the max separating distance I used the following code in R. My data are in a flat file with x and y coords renamed to long and lat respectively:

data <- read.csv(file="file.csv", header=T, sep=",")
coords <- data.frame(data$long,data$lat) 
pointDist <- apply(coords, 1, function(eachPoint) spDistsN1(as.matrix(coords), eachPoint, longlat=TRUE))
distances <- as.vector(pointDist)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.