plot_gamma_regression: Function for plotting the mean-variance gamma regressions

View source: R/plot_gamma_regression.R

plot_gamma_regressionR Documentation

Function for plotting the mean-variance gamma regressions

Description

Generates a scatter plot with the gamma regressions of the mean-variance trends for the precision weights and imputation.

Usage

plot_gamma_regression(data, design, id_col = "id")

Arguments

data

The data to use for producing the plots.

design

A design matrix as produced by model.matrix.

id_col

A character for the name of the column containing the name of the features in data (e.g., peptides, proteins, etc.).

Value

a plot with the mean-variance trend used for the precision weights on the left side, and the trend lines used for the imputation on the right side.

Examples

# Produce a design matrix
design <- model.matrix(~ 0 + factor(rep(1:2, each = 3)))
colnames(design) <- paste0("ng", c(50, 100))

# Normalize and log transform the data
yeast <- psrn(yeast, "identifier")

# Generate the plots
plot_gamma_regression(yeast, design, "identifier")

PhilipBerg/PaiR documentation built on March 18, 2022, noon