Learn R Programming

bakR (version 1.0.1)

FnPCA2: 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)

Value

A ggplot object.

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

Examples

Run this code
# \donttest{
# 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)

# }

Run the code above in your browser using DataLab