R/LEnvelope.R

Defines functions LEnvelope

Documented in LEnvelope

LEnvelope <- function(
    X,
    r = NULL,
    NumberOfSimulations = 100,
    Alpha = 0.05,
    ReferenceType = "",
    NeighborType = "",
    SimulationType = "RandomPosition",
    Precision = 0,
    Global = FALSE,
    verbose = interactive(),
    parallel = FALSE,
    parallel_pgb_refresh = 1/10) {

  # Calculate the envelope of K
  Envelope <- KEnvelope(
    X,
    r = r,
    NumberOfSimulations = NumberOfSimulations,
    Alpha = Alpha,
    ReferenceType = ReferenceType,
    NeighborType = NeighborType,
    SimulationType = SimulationType,
    Precision = Precision,
    Global = Global,
    verbose = verbose,
    parallel = parallel,
    parallel_pgb_refresh = parallel_pgb_refresh
  )
  # Transform K to L
  Columns <- names(Envelope)[-1]
  for (i in Columns) {
    Envelope[[i]] <- sqrt(Envelope[[i]] / pi) - Envelope$r
  }
  attr(Envelope, "ylab") <- attr(Envelope, "yexp") <- quote(L(r))
  attr(Envelope, "fname") <- "L"
  return(Envelope)
}

Try the dbmss package in your browser

Any scripts or data that you put into this service are public.

dbmss documentation built on June 8, 2025, 1:59 p.m.