View source: R/Visualizations.R
FnPCA2 | R Documentation |
This function creates a 2-component PCA plot using logit(fn) or log(kdeg) estimates.
FnPCA2(obj, Model = c("MLE", "Hybrid", "MCMC"), log_kdeg = FALSE)
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 |
A ggplot object.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.