FnPCA2: Creating PCA plots with logit(fn) estimates

View source: R/Visualizations.R

FnPCA2R Documentation

Creating PCA plots with logit(fn) estimates

Description

This function creates a 2-component PCA plot using logit(fn) or log(kdeg) estimates.

Usage

FnPCA2(obj, Model = c("MLE", "Hybrid", "MCMC"), log_kdeg = FALSE)

Arguments

obj

bakRFit object

Model

String identifying implementation for which you want to generate a PCA plot

log_kdeg

Boolean; if TRUE, then log(kdeg) estimates used for PCA rather than logit(fn). Currently only compatible with MLE implementation

Value

A ggplot object.

Examples


# Simulate data for 500 genes and 2 replicates
sim <- Simulate_bakRData(500, nreps = 2)

# Fit data with fast implementation
Fit <- bakRFit(sim$bakRData)

# Fn PCA
FnPCA2(Fit, Model = "MLE")

# log(kdeg) PCA
FnPCA2(Fit, Model = "MLE", log_kdeg = TRUE)



bakR documentation built on June 22, 2024, 6:55 p.m.