Perform RMAPI analysis.

rmapi_analysis(
  proj,
  eccentricity = 0.5,
  null_method = 1,
  n_perms = 100,
  n_breaks = 1,
  dist_breaks = NULL,
  empirical_tail = "both",
  min_intersections = 5,
  report_progress = TRUE
)

Arguments

proj

object of class rmapi_project.

eccentricity

eccentricity of ellipses, defined as half the distance between foci divided by the semi-major axis. We can say \(e = sqrt{1 - b^2/a^2}\), where \(e\) is the eccentricity, \(a\) is the length of the semi-major axis, and \(b\) is the length of the semi-minor axis. Eccentricity ranges between 0 (perfect circle) and 1 (straight line between foci).

null_method

what method to use for the null model:

  1. permutation test on raw statistic. If n_breaks = 1 then this is identical to the original MAPI method, if n_breaks > 1 then a spatial permutation test is implemented in which edges are binned based on spatial distance and permutation only occurs within a bin.

  2. permutation test on residuals. The fitted model from a previously call of fit_model() is used to compute residuals, and the permutation test method is carried out on residual values. As with method 1, this permutation test can be spatially binned.

n_perms

number of permutations to run when checking statistical significance. Set to 0 to skip this step.

n_breaks

alternative to defining sequence of dist_breaks. If dist_breaks == NULL then the full spatial range of the data is split into n_breaks equal groups.

dist_breaks

vector of breaks that divide spatial distances into permutation groups. Defaults to the full spatial range of the data, i.e. all edges are included in permutation testing.

empirical_tail

whether to do calculate empirical p-values using a one-sided test (empirical_tail = "left" or empirical_tail = "right") or a two-sided test (empirical_tail = "both").

min_intersections

minimum number of ellipses that must intersect a hex for it to be included in the final map, otherwise NA.

report_progress

if TRUE then a progress bar is printed to the console during the permutation testing procedure.