registration_model: Spatial registration: model

View source: R/registration_model.R

registration_modelR Documentation

Spatial registration: model

Description

This function defines the statistical model that will be used for computing the block correlation as well as pairwise statistics. It is useful to check it in case your sample-level covariates need to be casted. For example, an integer() variable might have to be casted into a factor() if you wish to model it as a categorical variable and not a continuous one.

Usage

registration_model(
  sce_pseudo,
  covars = NULL,
  var_registration = "registration_variable"
)

Arguments

sce_pseudo

The output of registration_pseudobulk().

covars

A character() with names of sample-level covariates.

var_registration

A character(1) specifying the colData(sce_pseudo) variable of interest against which will be used for computing the relevant statistics.

Value

The output of model.matrix() which you can inspect to verify that your sample-level covariates are being properly modeled.

See Also

Other spatial registration and statistical modeling functions: registration_block_cor(), registration_pseudobulk(), registration_stats_anova(), registration_stats_enrichment(), registration_stats_pairwise(), registration_wrapper()

Examples

example("registration_pseudobulk", package = "spatialLIBD")
registration_mod <- registration_model(sce_pseudo, "age")
head(registration_mod)


LieberInstitute/spatialLIBD documentation built on Nov. 4, 2024, 11:57 a.m.