update.ppm(spatstat)
update.ppm()所属R语言包:spatstat
Update a Fitted Point Process Model
更新安装点过程模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
update method for class "ppm".
update方法类"ppm"。
用法----------Usage----------
## S3 method for class 'ppm'
update(object, ..., fixdummy=TRUE, use.internal=NULL,
envir=parent.frame())
参数----------Arguments----------
参数:object
An existing fitted point process model, typically produced by ppm.
现有的装过程模型,通常是由ppm。
参数:...
Arguments to be updated in the new call to ppm.
在新的调用ppm的参数进行更新。
参数:fixdummy
Logical flag indicating whether the quadrature scheme for the call to ppm should use the same set of dummy points as that in the original call.
逻辑标志,指示是否调用ppm的积分方案应该使用相同的一组虚拟的点,在原来的呼叫。
参数:use.internal
Optional. Logical flag indicating whether the model should be refitted using the internally saved data (use.internal=TRUE) or by re-evaluating these data in the current frame (use.internal=FALSE).
可选。逻辑标志,说明模型是否应该使用内部存储的数据(use.internal=TRUE)或重新评估,这些数据在当前帧(use.internal=FALSE)进行改装。
参数:envir
Environment in which to re-evaluate the call to ppm.
环境重新评估调用ppm。
Details
详细信息----------Details----------
This is a method for the generic function update for the class "ppm". An object of class "ppm" describes a fitted point process model. See ppm.object) for details of this class.
这是一种通用功能update类"ppm"。一个对象的类"ppm"的描述了一个拟合点过程模型。 ppm.object)这个类的详细信息。
update.ppm will modify the point process model specified by object according to the new arguments given, then re-fit it. The actual re-fitting is performed by the model-fitting function ppm.
update.ppm将修改点过程模型指定的object根据给定的新论点,然后重新适应它。模型的拟合函数ppm的实际进行重新装修。
If you are comparing several model fits to the same data, or fits of the same model to different data, it is strongly advisable to use update.ppm rather than trying to fit them by hand. This is because update.ppm re-fits the model in a way which is comparable to the original fit.
如果你是比较的几个模型拟合相同的数据,或符合同一型号的不同的数据,它是强烈建议使用update.ppm,而不是试图以适应他们的手。这是因为update.ppm再与原来的适合的方式是在适合的模型。
The arguments ... are matched to the formal arguments of ppm as follows.
的参数...是相匹配的形式参数的ppm如下。
First, all the named arguments in ... are matched with the formal arguments of ppm. Use name=NULL to remove the argument name from the call.
首先,所有的命名参数...相匹配的形式参数的ppm。使用name=NULL删除name的调用参数。
Second, any unnamed arguments in ... are matched with formal arguments of ppm if the matching is obvious from the class of the object. Thus ... may contain
第二,任何未命名的参数...相匹配的形式参数的ppm如果是明显的类的对象进行匹配。因此...可能包含
exactly one argument of class "ppp" or "quad", which will be interpreted as the named argument Q;
只有一个参数的类"ppp"或"quad",将被解释为命名的参数Q;
exactly one argument of class "formula", which will be interpreted as the named argument trend (or as specifying a change to the trend formula);
只有一个参数的类"formula",将被解释为命名的参数trend(或指定一个变化的趋势公式);
exactly one argument of class "interact", which will be interpreted as the named argument interaction;
只有一个参数的类"interact",命名的参数将被解释为interaction;
exactly one argument of class "data.frame", which will be interpreted as the named argument covariates.
只有一个参数的类"data.frame",将被解释为命名的参数covariates。
The trend argument can be a formula that specifies a change to the current trend formula. For example, the formula ~ . + Z specifies that the additional covariate Z will be added to the right hand side of the trend formula in the existing object.
trend参数可以指定一个公式,改变目前的趋势公式。例如中,式~ . + Z指定的额外的协变量Z将被添加到的趋势公式的右手侧的在现有的object。
The argument fixdummy=TRUE ensures comparability of the objects before and after updating. When fixdummy=FALSE, calling update.ppm is exactly the same as calling ppm with the updated arguments. However, the original and updated models are not strictly comparable (for example, their pseudolikelihoods are not strictly comparable) unless they used the same set of dummy points for the quadrature scheme. Setting fixdummy=TRUE ensures that the re-fitting will be performed using the same set of dummy points. This is highly recommended.
参数fixdummy=TRUE确保前和更新后的对象具有可比性。当fixdummy=FALSE,调用update.ppm是完全一样调用ppm更新的参数。然而,原始的和更新的模型是不严格的比较(例如,pseudolikelihoods是不严格的比较),除非他们使用相同的一组虚拟点积分方案。设置fixdummy=TRUE确保,将使用相同的一组伪点进行重新装配。这是强烈建议。
The value of use.internal determines where to find data to re-evaluate the model (data for the arguments mentioned in the original call to ppm that are not overwritten by arguments to update.ppm).
use.internal决定在哪里可以找到数据来重新评估模型的论点,在原来的调用ppm(数据不会被覆盖的参数update.ppm)。
If use.internal=FALSE, then arguments to ppm are re-evaluated in the frame where you call update.ppm. This is like the behaviour of the other methods for update. This means that if you have changed any of the objects referred to in the call, these changes will be taken into account. Also if the original call to ppm included any calls to random number generators, these calls will be recomputed, so that you will get a different outcome of the random numbers.
如果use.internal=FALSE,然后参数为ppm你叫update.ppm的帧被重新评估。这是像其他方法update的行为。这意味着,如果你已经改变了在调用任何的对象,这些变化将被考虑。此外,如果原来的呼叫ppm包括任何调用随机数生成器,这些呼叫将被重新计算,这样,你会得到一个不同的结果的随机数。
If use.internal=TRUE, then arguments to ppm are extracted from internal data stored inside the current fitted model object. This is useful if you don't want to re-evaluate anything. It is also necessary if if object has been restored from a dump file using load or source. In such cases, we have lost the environment in which object was fitted, and data cannot be re-evaluated.
如果use.internal=TRUE,然后参数的ppm乃摘录自内部数据存储在当前拟合模型object。这是非常有用的,如果你不想重新评估什么。这也是必要的,要是object已恢复从dump文件中使用load或source。在这种情况下,我们已经失去了的环境中object拟合,数据不能被重新评估。
By default, if use.internal is missing, update.ppm will re-evaluate the arguments if this is possible, and use internal data if not.
默认情况下,如果use.internal失踪,update.ppm将重新评估参数,如果这是可能的,而如果不使用内部数据。
值----------Value----------
Another fitted point process model (object of class "ppm").
另一个安装点过程模型(对象类"ppm"“)。
(作者)----------Author(s)----------
Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>
实例----------Examples----------
data(nztrees)
data(cells)
# fit the stationary Poisson process[适合平稳泊松过程]
fit <- ppm(nztrees, ~ 1)
# fit a nonstationary Poisson process[适合非平稳泊松过程]
fitP <- update(fit, trend=~x)
fitP <- update(fit, ~x)
# change the trend formula: add another term to the trend[变化的趋势公式:添加另一个术语的趋势]
fitPxy <- update(fitP, ~ . + y)
# change the trend formula: remove the x variable[变化的趋势公式:删除变量x]
fitPy <- update(fitPxy, ~ . - x)
# fit a stationary Strauss process[适合固定施特劳斯过程]
fitS <- update(fit, interaction=Strauss(13))
fitS <- update(fit, Strauss(13))
# refit using a different edge correction[改装使用不同的边缘校正]
fitS <- update(fitS, correction="isotropic")
# re-fit the model to a subset[重新拟合模型的一个子集]
# of the original point pattern[原来的点模式]
nzw <- owin(c(0,148),c(0,95))
nzsub <- nztrees[,nzw]
fut <- update(fitS, Q=nzsub)
fut <- update(fitS, nzsub)
# WARNING: the point pattern argument is called 'Q'[警告:点模式参数被称为Q]
ranfit <- ppm(rpoispp(42), ~1, Poisson())
ranfit
# different random data! [不同的随机数据!]
update(ranfit)
# the original data[的原始数据]
update(ranfit, use.internal=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|