biplot.initgmf: Biplot of an initialized GMF model

biplot.initgmfR Documentation

Biplot of an initialized GMF model

Description

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

Usage

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

Arguments

x

an object of class initgmf

...

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

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.

See Also

biplot.sgdgmf.

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
init = sgdgmf.init(data$Y, ncomp = 3, family = poisson())

# Get the biplot of a GMF model
biplot(init) # 1st vs 2nd principal components
biplot(init, choices = 2:3) #2nd vs 3rd principal components


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