Description Usage Arguments Details Examples
Otherwise the same as ppm
with method="logi"
but using a Bayesian fitter.
1 |
... |
Parameters to ppm. Method will be "logi". |
The variational approximation uses the package
vblogistic
. 'verb' and 'eps' parameters are
renamed here 'verbosity' and 'epsilon' as ppm uses the
former internally.
The returned object is apart from $internal$glmfit the same as that of ppm. Some of the methods (e.g. plot) wont work at the moment.
Method vbsummary provides some extra Bayesian information.
The $internal$glmfit is of class "vblogitfit" with print, marginals and plot summary.
Prior arguments:
* m0: Gaussian prior mean vector.
* S0: Gaussian prior covariance matrix.
Make sure the dimensions match, e.g. try basic ppm and look how many parameters are estimated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(spatstat)
x <- rStrauss(100, 0.1, 0.07)
# glm:
f0 <- ppm(x, interaction=Strauss(0.06), method="logi")
# vb-logistic, with bad prior:
f1 <- ppmvb(x, interaction=Strauss(0.06), m0=log(c(100, 0.3)), S0=diag(c(10, 3)), verbose=TRUE )
print( exp( rbind(coef(f0), coef(f1))) )
summary(f1)
s <- vbsummary(f1)
# this is of class vblogitfit
print(s)
plot(s)
# in exp scale
plot(s, log=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.