biplot.sgdgmf: Biplot of a GMF model

biplot.sgdgmfR Documentation

Biplot of a GMF model

Description

Plot the observations on a two-dimensional projection determined by the estimated score matrix

Usage

## S3 method for class 'sgdgmf'
biplot(
  x,
  ...,
  choices = 1:2,
  arrange = TRUE,
  byrow = FALSE,
  normalize = FALSE,
  labels = NULL,
  palette = NULL,
  titles = c(NULL, NULL)
)

Arguments

x

an object of class sgdgmf

...

further arguments passed to or from other methods

choices

a length 2 vector specifying the components to plot

arrange

if TRUE, return a single plot with two panels

byrow

if TRUE, the panels are arranged row-wise (if arrange=TRUE)

normalize

if TRUE, orthogonalizes the scores using SVD

labels

a vector of labels which should be plotted

palette

the color-palette which should be used

titles

a 2-dimensional string vector containing the plot titles

Value

If arrange=TRUE, a single ggplot object with the selected biplots, otherwise, a list of two ggplot objects showing the row and column latent variables.

Examples

# Load the sgdGMF package
library(sgdGMF)

# Generate data from a Poisson model
data = sim.gmf.data(n = 100, m = 20, ncomp = 5, family = poisson())

# Fit a GMF model
gmf = sgdgmf.fit(data$Y, ncomp = 3, family = poisson())

# Get the biplot of a GMF model
biplot(gmf)


sgdGMF documentation built on April 3, 2025, 7:37 p.m.