Learn R Programming

smacpod (version 1.0.0)

confenv: Confidence envelopes for difference in estimated K functions

Description

confenv determines confidence envelopes for the difference in estimated K functions for a set of cases and controls using a kdenv object.

Usage

confenv(object, level)

## S3 method for class 'kdenv': confenv(object, level = 0.95)

Arguments

object
A kdenv object from the kd.env function.
level
Confidence level. Should be a number between 0 and 1.

Value

  • Returns an confenvkd object. This is just a data frame with r, the distances at which the confidence envelope is calculated, lo, the lower bounds of the confidence envelopes, and hi, the upper bounds of the confidence envelopes.

References

Waller, L.A. and Gotway, C.A. (2005). Applied Spatial Statistics for Public Health Data. Hoboken, NJ: Wiley.

Examples

Run this code
data(grave)
env = kd.env(grave, nsim = 19)
ci = confenv(env, level = 0.9)
plot(env, legend = FALSE)

Run the code above in your browser using DataLab