R: Display the criteria associated with a collection of PLNPCA...

plot.PLNPCAfamily {PLNmodels} | R Documentation

## Display the criteria associated with a collection of PLNPCA fits (a PLNPCAfamily)

### Description

Display the criteria associated with a collection of PLNPCA fits (a PLNPCAfamily)

### Usage

    ## S3 method for class 'PLNPCAfamily'
    plot(x, criteria = c("loglik", "BIC", "ICL"), annotate = TRUE, ...)

### Arguments

`x` | an R6 object with class `PLNfamily`
`criteria` | vector of characters. The criteria to plot in c("loglik", "BIC", "ICL", "R_squared"). Default is c("loglik", "BIC", "ICL").
`annotate` | logical: should the value of approximated R squared be added to the plot?
`...` | additional parameters for S3 compatibility. Not used

### Value

Produces a plot representing the evolution of the criteria of the different models considered, highlighting the best model in terms of BIC and ICL (the greater, the better). These criteria have the form 'loglik - 1/2 * penalty' so that they are on the same scale as the model loglikelihood.

### Examples

    data(trichoptera)
    trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
    myPCAs <- PLNPCA(Abundance ~ 1 + offset(log(Offset)), data = trichoptera, ranks = 1:5)
    ## Not run:
    plot(myPCAs)

    ## End(Not run)

[Package PLNmodels version 0.10.6 Index]