twimstim
twinstim
object.
The implementation is illustrated in Meyer et al. (2016, Section 3).iafplot(object, which = c("siaf", "tiaf"), types = NULL,
scaled = c("intercept", "standardized", "no"), truncated = FALSE,
log = "", conf.type = if (length(pars) > 1) "MC" else "parbounds",
conf.level = 0.95, conf.B = 999, xgrid = 101,
col.estimate = rainbow(length(types)), col.conf = col.estimate,
alpha.B = 0.15, lwd = c(3,1), lty = c(1,2),
verticals = FALSE, do.points = FALSE,
add = FALSE, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL,
legend = !add && (length(types) > 1), ...)
"twinstim"
containing the fitted model."siaf"
(default) for the spatial interaction
$f(x)$ as a funtion of the distance $x$, and "tiaf"
for the temporal interaction funtypes
the interaction function should be plotted in case of a marked
twinstim. The default types=NULL
checks if the interaction
function is type-specific: if so, types=
eps.t
/eps.s
)
into account, i.e., drop to zero at that point (if it is finite
after all). If there is no common rangeplot.default
indicating which axes should be logarithmic.
If add=TRUE
, log
is set according to
par("xlog")
and par(
conf.type="MC"
(or "bootstrap"
), conf.B
parameter vectors are sampled from the asymptotic
(multivariate) normal distribution of the ML estimate of the
interactioconf.type = "MC"
it
may also be specified as NA
, in which case all conf.B
sampled functions will be plotted with transparency value given
by alpha.B
."MC"
(Monte Carlo)
confidence interval.which
, or a scalar representing the desired number of
evaluation points in the interval c(0,xlim[2])
.
If the interaction function is a step ftypes
.types
.conf.B
sampled interaction functions in case conf.level = NA
plot.stepfun
) or
lists of graphical parameters.ylim=NULL
) is from 0 to the
value of the (scaled) interaction function at $x = 0$.
The default x-axis (xlim=NULL
) starts NULL
providing sensible defaults.types
should be added.
It can also be a list of arguments passed to legend
to tweak the default settings.plot
method.xgrid
, by type). The first
column of the matrix contains the distance $x$, and the remaining
length(types)
columns contain the (scaled) function values for
each type.
The pointwise confidence intervals of the interaction functions are
returned in similar matrices as attributes: if
length(types)==1
, there is a single attribute "CI"
,
whereas for multiple types, the attributes are named
paste0("CI.",typeNames)
(where the typeNames
are
retrieved from object$qmatrix
). Meyer, S., Held, L. and H
plot.twinstim
, which calls this function.data("imdepifit")
iafplot(imdepifit, "tiaf", scaled=FALSE) # tiaf.constant(), not very exciting
iafplot(imdepifit, "siaf", scaled=FALSE)
# scaled version uses a Monte-Carlo-CI
set.seed(1) # result depends on .Random.seed
iafplot(imdepifit, "siaf", scaled=TRUE, conf.type="MC", conf.B=199,
col.conf=gray(0.4), conf.level=NA) # show MC samples
Run the code above in your browser using DataLab