|
6 | 6 | } |
7 | 7 | \description{ |
8 | 8 | Given a fitted Spatial Logistic Regression model, |
9 | | - this function computes the fitted probabilities for each pixel. |
| 9 | + this function computes the fitted probabilities for each pixel, |
| 10 | + or the fitted probabilities at each original data point. |
10 | 11 | } |
11 | 12 | \usage{ |
12 | | - \method{fitted}{slrm}(object, ...) |
| 13 | + \method{fitted}{slrm}(object, \dots, type="probabilities", |
| 14 | + dataonly=FALSE, leaveoneout=FALSE) |
13 | 15 | } |
14 | 16 | \arguments{ |
15 | 17 | \item{object}{ |
|
19 | 21 | \item{\dots}{ |
20 | 22 | Ignored. |
21 | 23 | } |
| 24 | + \item{type}{ |
| 25 | + Character string (partially) matching one of |
| 26 | + \code{"probabilities"}, \code{"intensity"} or \code{"link"} |
| 27 | + determining the quantity that should be predicted. |
| 28 | + } |
| 29 | + \item{dataonly}{ |
| 30 | + Logical. If \code{TRUE}, then values will only be computed |
| 31 | + at the points of the data point pattern. If \code{FALSE}, then |
| 32 | + values will be computed at the pixels used to fit the model. |
| 33 | + } |
| 34 | + \item{leaveoneout}{ |
| 35 | + Logical value |
| 36 | + specifying whether to perform a leave-one-out calculation |
| 37 | + when \code{dataonly=TRUE}. If \code{leaveoneout=TRUE}, |
| 38 | + the fitted value at each data point \code{X[i]} is calculated |
| 39 | + by re-fitting the model to the data with \code{X[i]} removed. |
| 40 | + } |
22 | 41 | } |
23 | 42 | \details{ |
24 | 43 | This is a method for the generic function |
|
27 | 46 | (objects of class \code{"slrm"}, usually obtained |
28 | 47 | from the function \code{\link{slrm}}). |
29 | 48 |
|
30 | | - The algorithm computes |
31 | | - the fitted probabilities of the presence of a random point in each pixel. |
| 49 | + By default, the algorithm computes |
| 50 | + the fitted probabilities of the presence of a random point in each |
| 51 | + pixel, |
| 52 | + and returns them as an image. |
| 53 | + |
| 54 | + If \code{dataonly=TRUE}, the algorithm computes the fitted |
| 55 | + presence probabilities only at the locations of the original data points. |
32 | 56 | } |
33 | 57 | \value{ |
34 | 58 | A pixel image (object of class \code{"im"}) containing the |
35 | | - fitted probability for each pixel. |
| 59 | + fitted probability for each pixel, |
| 60 | + or a numeric vector containing the fitted probability at each data point. |
36 | 61 | } |
37 | 62 | \seealso{ |
38 | 63 | \code{\link{slrm}}, |
|
42 | 67 | X <- rpoispp(42) |
43 | 68 | fit <- slrm(X ~ x+y) |
44 | 69 | plot(fitted(fit)) |
| 70 | + fitted(fit, dataonly=TRUE) |
45 | 71 | } |
46 | 72 | \author{\adrian |
47 | 73 | and \rolf. |
|
0 commit comments