Learn R Programming

geocausal (version 0.4.0)

dx_supthin: Perform superthinning tests

Description

`dx_supthin()` performs superthinning tests to examine model validity.

Usage

dx_supthin(
  hfr,
  dep_var,
  indep_var,
  window,
  rescale = 1,
  max_r = 50,
  n_sample = 1000,
  nsim = 1000,
  unit = "km"
)

Value

A list of resulting dataframe (`result_data`), windows (`window_list`), data for distance quantiles, and a window object for the entire window

Arguments

hfr

hyperframe

dep_var

The name of the dependent variable. Since we need to obtain the observed density of treatment events, `dep_var` should be the name of the treatment variable.

indep_var

vector of names of independent variables (covariates)

window

owin object

rescale

conversion as needed (namely when the unit of distance of the owin object is in meters). By default = 1 (no conversion)

max_r

max distance in which the envelope tests are performed

n_sample

the number of points to sample. by default = 1000, if the number of points are smaller than this, no sampling is performed

nsim

the number of simulations to perform for the envelope tests

unit

distance units after conversion. By default "km"