run_var_proportions {mxnorm}R Documentation

Run random effects modeling on mx_dataset object to determine proportions of variance at the slide level

Description

Run random effects modeling on mx_dataset object to determine proportions of variance at the slide level

Usage

run_var_proportions(
  mx_data,
  table,
  metadata_cols = NULL,
  formula_override = NULL,
  save_models = FALSE,
  ...
)

Arguments

mx_data

mx_dataset object used to compute UMAP dimensions

table

dataset in mx_data used to compute metrics. Options include: c("raw","normalized","both"), e.g. a y-axis parameter.

metadata_cols

other identifiers of the input data to use in the modeling process (default=NULL). This must be a vector of column name(s) in the mx_dataset object

formula_override

String with user-defined formula to use for variance proportions modeling analysis (default=NULL). This will be the RHS of a formula with ⁠marker~⁠ as the LHS.

save_models

Boolean flag to save lme4::lmer() models in a list to the mx_dataset object

...

optional additional arguments for lme4::lmer() modeling

Value

mx_dataset object with modeling results in var_data table

Examples

mx_data = mx_dataset(mxnorm::mx_sample, "slide_id", "image_id",
  c("marker1_vals","marker2_vals","marker3_vals"),
  c("metadata1_vals"))
mx_data = mx_normalize(mx_data, transform="log10",method="None")
mx_data = run_var_proportions(mx_data, table="both")

[Package mxnorm version 1.0.3 Index]