Skip to contents

Computes summary statistics for response values within each cell of a partition.

Usage

compute.partition.cell.stats(partition, y, compute.mad = TRUE)

Arguments

partition

Numeric vector of cluster membership assignments (1-based indexing). Each element indicates which partition cell the corresponding vertex belongs to.

y

Numeric vector of response values, same length as partition.

compute.mad

Logical indicating whether to compute MAD (median absolute deviation). Default is TRUE.

Value

A data.frame with one row per super-cell containing:

cell.id

Super-cell identifier

n.vertices

Number of vertices in the super-cell

min.value

Minimum response value

max.value

Maximum response value

mean.value

Mean response value

median.value

Median response value

range

Range (max - min)

iqr

Interquartile range

mad

Median absolute deviation (if compute.mad = TRUE)

Details

This function summarizes the distribution of response values within each super-cell of a partition. The statistics provide insight into the variability and central tendency of the response across the geometric decomposition.