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_par
a list with two matrices, M and S, which are the estimated parameters in the variational approximation
latent
a matrix: values of the latent vector (Z in the model)
optim_par
a list with parameters useful for monitoring the optimization
loglik
variational lower bound of the loglikelihood
BIC
variational lower bound of the BIC
ICL
variational lower bound of the ICL
R_squared
approximated goodness-of-fit criterion
criteria
a vector with loglik, BIC, ICL, R_squared and number of parameters
rank
the dimension of the current model
model_par
a list with the matrices associated with the estimated parameters of the pPCA model: Theta (covariates), Sigma (latent covariance) and B (latent loadings)
var_par
a list with two matrices, M and S, which are the estimated parameters in the variational approximation
latent
a matrix: values of the latent vector (Z in the model)
optim_par
a list with parameters useful for monitoring the optimization
loglik
variational lower bound of the loglikelihood
BIC
variational lower bound of the BIC
ICL
variational lower bound of the ICL
R_squared
approximated goodness-of-fit criterion
criteria
a vector with loglik, BIC, ICL, R_squared and number of parameters
nb_param
number of parameters in the current PLN model
percent_var
the percent of variance explained by each axis
corr_circle
a matrix of correlations to plot the correlation circles
scores
a matrix of scores to plot the individual factor maps (a.k.a. principal comonents)
rotation
a 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)
deep
Whether 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