The function PLNPCA produces a collection of models which are instances of object with class PLNPCAfit.
This class comes with a set of methods, some of them being useful for the user:
See the documentation for the methods inherited by PLNfit and the
plot.PLNPCAfit methods for PCA vizualization
PLNmodels::PLNfit -> PLNPCAfit
var_para list with two matrices, M and S, which are the estimated parameters in the variational approximation
latenta matrix: values of the latent vector (Z in the model)
optim_para list with parameters useful for monitoring the optimization
loglikvariational lower bound of the loglikelihood
BICvariational lower bound of the BIC
ICLvariational lower bound of the ICL
R_squaredapproximated goodness-of-fit criterion
criteriaa vector with loglik, BIC, ICL, R_squared and number of parameters
rankthe dimension of the current model
model_para list with the matrices associated with the estimated parameters of the pPCA model: Theta (covariates), Sigma (latent covariance) and B (latent loadings)
var_para list with two matrices, M and S, which are the estimated parameters in the variational approximation
latenta matrix: values of the latent vector (Z in the model)
optim_para list with parameters useful for monitoring the optimization
loglikvariational lower bound of the loglikelihood
BICvariational lower bound of the BIC
ICLvariational lower bound of the ICL
R_squaredapproximated goodness-of-fit criterion
criteriaa vector with loglik, BIC, ICL, R_squared and number of parameters
nb_paramnumber of parameters in the current PLN model
percent_varthe percent of variance explained by each axis
corr_circlea matrix of correlations to plot the correlation circles
scoresa matrix of scores to plot the individual factor maps (a.k.a. principal comonents)
rotationa matrix of rotation of the latent space
new()PLNPCAfit$new(rank, responses, covariates, offsets, weights, model, control)
update()PLNPCAfit$update( Theta = NA, Sigma = NA, B = NA, M = NA, S = NA, Z = NA, A = NA, Ji = NA, R2 = NA, monitoring = NA )
setVisualization()PLNPCAfit$setVisualization(scale.unit = FALSE)
optimize()PLNPCAfit$optimize(responses, covariates, offsets, weights, control)
postTreatment()PLNPCAfit$postTreatment(responses, covariates, offsets, weights, nullModel)
latent_pos()PLNPCAfit$latent_pos(covariates, offsets)
plot_individual_map()PLNPCAfit$plot_individual_map( axes = 1:min(2, self$rank), main = "Individual Factor Map", plot = TRUE, cols = "default" )
plot_correlation_circle()PLNPCAfit$plot_correlation_circle( axes = 1:min(2, self$rank), main = "Variable Factor Map", cols = "default", plot = TRUE )
plot_PCA()PLNPCAfit$plot_PCA( nb_axes = min(3, self$rank), ind_cols = "ind_cols", var_cols = "var_cols", plot = TRUE )
compute_fisher()PLNPCAfit$compute_fisher(type = c("wald", "louis"), X = NULL)show()PLNPCAfit$show()
clone()The objects of this class are cloneable with this method.
PLNPCAfit$clone(deep = FALSE)
deepWhether to make a deep clone.
The function PLNPCA, the class PLNPCAfamily
# NOT RUN {
data(trichoptera)
trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
myPCAs <- PLNPCA(Abundance ~ 1 + offset(log(Offset)), data = trichoptera, ranks = 1:5)
myPCA <- getBestModel(myPCAs)
class(myPCA)
print(myPCA)
# }
Run the code above in your browser using DataLab