screeplot.sgdgmf | R Documentation |
Plots the variances of the principal components of the residuals against the number of principal component.
## S3 method for class 'sgdgmf'
screeplot(
x,
...,
ncomp = 20,
type = c("deviance", "pearson", "working", "response", "link"),
partial = FALSE,
normalize = FALSE,
cumulative = FALSE,
proportion = FALSE
)
x |
an object of class |
... |
further arguments passed to or from other methods |
ncomp |
number of components to be plotted |
type |
the type of residuals which should be used |
partial |
if |
normalize |
if |
cumulative |
if |
proportion |
if |
A ggplot object showing the residual screeplot of the model.
# 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 partial residual spectrum of a GMF model
screeplot(gmf) # screeplot of the var-cov matrix of the deviance residuals
screeplot(gmf, partial = TRUE) # screeplot of the partial residuals
screeplot(gmf, cumulative = TRUE) # cumulative screeplot
screeplot(gmf, proportion = TRUE) # proportion of explained residual variance
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.