plot.profilepl | R Documentation |
Plot the profile (pseudo) likelihood against the irregular parameters, for a model that was fitted by maximum profile (pseudo)likelihood.
## S3 method for class 'profilepl' plot(x, ..., add = FALSE, main = NULL, tag = TRUE, coeff = NULL, xvariable = NULL, col = 1, lty = 1, lwd = 1, col.opt = "green", lty.opt = 3, lwd.opt = 1)
x |
A point process model fitted by maximum profile (pseudo)likelihood.
Object of class |
... |
Additional plot arguments passed to |
add |
Logical. If |
main |
Optional. Main title for the plot. A character string or character vector. |
tag |
Logical value. If |
coeff |
Optional. If this is given, it should be a character string matching the name of one of the fitted model coefficients. This coefficient will then be plotted on the vertical axis. |
xvariable |
Optional. The name of the irregular parameter that should be plotted along the horizontal axis. The default is the first irregular parameter. |
col,lty,lwd |
Graphical parameters (colour, line type, line width) for the curves on the plot. |
col.opt, lty.opt, lwd.opt |
Graphical parameters for indicating the optimal parameter value. |
This is the plot
method for the
class "profilepl"
of fitted point process models obtained
by maximising the profile likelihood or profile pseudolikelihood.
The default behaviour is to plot the profile likelihood or profile pseudolikelihood on the vertical axis, against the value of the irregular parameter on the horizontal axis.
If there are several irregular parameters, then one of them
is plotted on the horizontal axis, and the plot consists of many different
curves, corresponding to different values of the other parameters.
The parameter to be plotted on the horizontal axis is specified by the
argument xvariable
; the default is to use the parameter that was
listed first in the original call to profilepl
.
If coeff
is given, it should be the name of one of the
fitted model coefficients names(coef(as.ppm(x)))
.
The fitted value of that coefficient is plotted on the vertical axis.
Null.
.
Baddeley, A. and Turner, R. (2000) Practical maximum pseudolikelihood for spatial point patterns. Australian and New Zealand Journal of Statistics 42, 283–322.
Baddeley, A., Rubak, E. and Turner, R. (2015) Spatial Point Patterns: Methodology and Applications with R. Chapman and Hall/CRC Press.
profilepl
live <- interactive() nr <- if(live) 20 else 3 # one irregular parameter rr <- data.frame(r=seq(0.05,0.15, length=nr)) ps <- profilepl(rr, Strauss, cells) plot(ps) # profile pseudolikelihood plot(ps, coeff="Interaction") # fitted interaction coefficient log(gamma) # two irregular parameters smax <- if(live) 3 else 2 rs <- expand.grid(r=seq(0.05,0.15, length=nr), sat=1:smax) pg <- profilepl(rs, Geyer, cells) plot(pg) # profile pseudolikelihood against r for each value of 'sat' plot(pg, coeff="Interaction") plot(pg, xvariable="sat", col=ifelse(r < 0.1, "red", "green"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.