| dropply | R Documentation |
Given a fitted point process model, consider dropping each possible term in the model, and apply a significance test for the dropped covariate.
dropply(object,
action = c("berman.test", "cdf.test", "rhohat", "roc"),
scope = NULL, ..., high = TRUE)
object |
A fitted point process model (object of class |
action |
Character string (partially matched) specifying the hypothesis test to be performed, or other calculation. |
scope |
A formula or a character vector specifying the model term or terms that
are to be considered for deletion, or a fitted model obtained by
deleting some terms from |
high |
Argument passed to |
... |
Other arguments passed to the relevant function
|
This function is like drop1
in that it considers each possible term in the model object
(or only the terms listed in the scope argument),
deletes each such term from the model, and measures the change in the model.
In this case the change is measured by performing the action.
Options are:
action="roc":the ROC curve for the deleted covariate is computed using the updated model as a baseline.
action="berman.test":One of Berman's tests is applied
(see berman.test), using the updated model
as the null hypothesis, and the original model
as the alternative.
action="cdf.test":One of the CDF tests is applied
(see cdf.test), using the updated model
as the null hypothesis, and the original model
as the alternative.
action="rhohat":taking the updated model as a baseline, the true intensity
(ratio of true intensity to baseline intensity)
is estimated as a function of the deleted covariate,
using the function rhohat.
Note that dropply(model, "roc", ...) is equivalent to
dropROC(model, ...).
A named list containing the results for each possible deletion.
The list belongs to the class "anylist"
so it can be printed and plotted in its entirety.
If action="roc" the individual entries are
ROC curves belonging to class "fv".
If action="rhohat" the individual entries are
curves belonging to class "fv" and class "rhohat".
If action="berman.test" the individual entries
are hypothesis tests of class "htest" and "bermantest".
If action="cdf.test" the individual entries
are hypothesis tests of class "htest" and "cdftest".
.
dropROC,
roc.ppm,
rhohat,
berman.test,
cdf.test
dimyx <- if(interactive()) NULL else 32
fut <- ppm(bei ~ grad + elev, data=bei.extra)
z <- dropply(fut, "b", dimyx=dimyx)
z
plot(z, mar.panel=5)
## how to extract p-values from each test
sapply(z, getElement, name="p.value")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.