bivariate {mxfda} | R Documentation |
bivariate
Description
Internal function called by extract_summary_functions
to calculate a bivariate spatial summary function for a single image.
Usage
bivariate(
mximg,
markvar,
mark1,
mark2,
r_vec,
func = c(Kcross, Lcross, Gcross, entropy),
edge_correction,
breaks = NULL
)
Arguments
mximg |
Dataframe of cell-level multiplex imaging data for a single image.
Should have variables |
markvar |
The name of the variable that denotes cell type(s) of interest. Character. |
mark1 |
Character string that denotes first cell type of interest. |
mark2 |
Character string that denotes second cell type of interest. |
r_vec |
Numeric vector of radii over which to evaluate spatial summary functions. Must begin at 0. |
func |
Spatial summary function to calculate. Options are c(Kcross, Lcross, Gcross) which denote Ripley's K, Besag's L, and nearest neighbor G function, respectively, or entropy from Vu et al, 2023. |
edge_correction |
Character string that denotes the edge correction method for spatial summary function. For Kcross and Lcross choose one of c("border", "isotropic", "Ripley", "translate", "none"). For Gcross choose one of c("rs", "km", "han") |
breaks |
an integer for the number of breaks used for entropy |
Details
Value
A data.frame
containing:
r |
the radius of values over which the spatial summary function is evaluated |
sumfun |
the values of the spatial summary function |
csr |
the values of the spatial summary function under complete spatial randomness |
fundiff |
sumfun - csr, positive values indicate clustering and negative values repulsion |
Author(s)
Julia Wrobel julia.wrobel@emory.edu
References
Xiao, L., Ruppert, D., Zipunnikov, V., and Crainiceanu, C. (2016). Fast covariance estimation for high-dimensional functional data. Statistics and Computing, 26, 409-421. DOI: 10.1007/s11222-014-9485-x.
Vu, T., Seal, S., Ghosh, T., Ahmadian, M., Wrobel, J., & Ghosh, D. (2023). FunSpace: A functional and spatial analytic approach to cell imaging data using entropy measures. PLOS Computational Biology, 19(9), e1011490.