penfa-class {penfa} | R Documentation |
S4 Class for describing a penfa
model
Description
The penfa
class represents a (fitted) penalized factor
analysis model. It contains a description of the model as specified by the
user, a summary of the data, an internal matrix representation, the
fitting results, and the penalized quantities.
Objects from the Class
Objects can be created via the penfa
function.
Slots
version
:The
penfa
package version used to create this object.call
:The function call as returned by
match.call()
.timing
:The elapsed time (user + system) for various parts of the program as a list, including the total time.
Options
:Named list of options that were provided by the user or filled-in automatically. See
penfaOptions
for additional details.ParTable
:Named list describing the model parameters. Can be coerced to a data.frame. This is also called "parameter table". It includes information on the fixed, free and penalized parameters, their indices, the active penalization strategies ("none", "shrink", "diff", or "shrink + diff"), the starting values, the estimated parameters and the associated standard errors.
pta
:Named list containing parameter table attributes, like observed and latent variable names, their indices, and the number of groups.
Data
:Object of internal class
"penfaData"
; contains information about the data set. See thepenfaData
class for additional details.SampleStats
:Object of internal class
"penfaSampleStats"
; contains the sample statistics. See thepenfaSampleStats
class for additional details.Model
:Object of internal class
"penfaModel"
: the internal (matrix) representation of the model. See thepenfaModel
class for additional details.Optim
:List. Information about the optimization process. This includes the estimated parameters (
x
), the number of estimated parameters (npar
), the number of trust-region iterations (iterations
), the value of the penalized objective function (fx.pen
), the value of the unpenalized objective function (fx.unpen
), the penalized log-likelihood (logl.pen
; this is equal tofx.pen
multiplied by (-1)), the unpenalized log-likelihood (logl.unpen
; this is equal tofx.unpen
multiplied by (-1)), the penalized gradient (dx.pen
), the penalized Hessian/Fisher information matrix (hessian.pen
), the list of control arguments for the trust-region algorithm (control
), and how many times the objective function became non-positive definite during the estimation process (npd
). If penfa was called with the optionverbose = TRUE
, the following additional arguments coming from the trust-region functiontrust
are reported in theOptim
slot:argpath
,argtry
,type
,accept
,radii
,rho
,fx.val
,fx.valtry
,change
,stepnorm
. See the manual page oftrust
from thetrust
package for an overview of these quantities.Penalize
:Object of internal class
"penfaPenalty"
; contains information about the penalization. See thepenfaPenalty
for additional details.Implied
:List. Model-implied moments (covariance matrix and mean vector).
Vcov
:List. Information about the covariance matrix (vcov) of the model parameters. This slot includes the following quantities: the type of penalized information matrix used in the model (either Hessian or Fisher;
information
), the vcov matrix of parameters (vcov
), whether the convergence checks on the penalized gradient and the penalized information matrix were satisfied (solution
), whether the employed information matrix was positive-definite (pdef
), whether the estimated factor solution was admissible (admissibility
), the standard errors computed according to the Bayesian result from the information matrix reported ininformation
(se
), and the 95% confidence intervals (ci
).Inference
:List. Information on effective degrees of the model and information criteria for model selection. This slot reports the following quantities: effective degree of freedom for each parameter (
edf.single
), total edf (edf
), influence matrix (influence.mat
), generalized information criteria (IC
), such as AIC and BIC.external
:List. Empty slot.
Methods
The following methods are available for an object of class
penfa
:
- show
signature(object = "penfa")
: Prints a short summary of the estimation process, including the optimization method, the specified penalty functions, the convergence status, the number of iterations, the tuning selection strategy, and the effective degrees of freedom. See the manual page ofshow,penfa-method
for details.- summary
signature(object = "penfa", header = TRUE, estimates = TRUE, ci = TRUE, level =
0.95, nd = 3L, cutoff = 0.05, extra = TRUE)
: Prints a summary of the model parameter estimates, and the optimization process. See the manual page ofsummary,penfa-method
for details.- coef
signature(object = "penfa", type = "free", labels = TRUE)
: Returns the estimates of the parameters in the model as a named numeric vector. See the manual page ofcoef,penfa-method
for details.- fitted
signature(object = "penfa", labels = TRUE)
: Returns a list of the model-implied moments (per group). See the manual page offitted,penfa-method
for details.
References
Geminiani, E., Marra, G., & Moustaki, I. (2021). "Single- and Multiple-Group Penalized Factor Analysis: A Trust-Region Algorithm Approach with Integrated Automatic Multiple Tuning Parameter Selection." Psychometrika, 86(1), 65-95. doi: 10.1007/s11336-021-09751-8