The penfaSampleStats class provides information on the sample moments of the factor analysis model. This class is an adaptation of the lavSampleStats class from the lavaan package.

Slots

var

List of the variances of the observed variables in every group.

cov

List of the covariance matrices of the observed variables in every group.

mean

List of the means of the observed variables in every group.

group.w

List of group weights.

nobs

List of the effective number of observations for every group.

ntotal

Integer. Total number of observations across all groups.

ngroups

Integer. Number of groups.

icov

List of the inverse matrices of the covariance matrices of the observed variables in every group.

cov.log.det

List of the logarithms of the determinants of the covariance matrices of the observed variables for every group.

See also

Examples

data(ccdata) syntax = 'help =~ h1 + h2 + h3 + h4 + h5 + h6 + h7 + 0*v1 + v2 + v3 + v4 + v5 voice =~ 0*h1 + h2 + h3 + h4 + h5 + h6 + h7 + v1 + v2 + v3 + v4 + v5' alasso_fit <- penfa(## factor model model = syntax, data = ccdata, std.lv = TRUE, ## penalization pen.shrink = "alasso", eta = list(shrink = c("lambda" = 0.01), diff = c("none" = 0)), ## automatic procedure strategy = "auto")
#> Computing weights for alasso (ML estimates)... done. #> #> Automatic procedure: #> Iteration 1 : 0.00298271 #> Iteration 2 : 0.00452604 #> #> Largest absolute gradient value: 12.76355181 #> Fisher information matrix is positive definite #> Eigenvalue range: [180.2917, 9189645] #> Trust region iterations: 15 #> Factor solution: admissible #> Effective degrees of freedom: 27.12936
alasso_fit@SampleStats
#> An object of class "penfaSampleStats" #> Slot "var": #> [[1]] #> [1] 0.9986962 0.9986962 0.9986962 0.9986962 0.9986962 0.9986962 0.9986962 #> [8] 0.9986962 0.9986962 0.9986962 0.9986962 0.9986962 #> #> #> Slot "cov": #> [[1]] #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 0.9986962 0.7324446 0.6582768 0.6991043 0.6707437 0.6584068 0.6371664 #> [2,] 0.7324446 0.9986962 0.7075285 0.7988196 0.7311182 0.7800300 0.7093328 #> [3,] 0.6582768 0.7075285 0.9986962 0.7176571 0.6878761 0.6837715 0.6331770 #> [4,] 0.6991043 0.7988196 0.7176571 0.9986962 0.7981995 0.7936238 0.7453160 #> [5,] 0.6707437 0.7311182 0.6878761 0.7981995 0.9986962 0.7930928 0.7504264 #> [6,] 0.6584068 0.7800300 0.6837715 0.7936238 0.7930928 0.9986962 0.8118928 #> [7,] 0.6371664 0.7093328 0.6331770 0.7453160 0.7504264 0.8118928 0.9986962 #> [8,] 0.6068802 0.6506414 0.5977097 0.6650654 0.6834911 0.7149524 0.7239390 #> [9,] 0.6008534 0.6864146 0.6312143 0.6983221 0.7011685 0.7243845 0.7452085 #> [10,] 0.5941055 0.6700023 0.6099459 0.6830820 0.6726631 0.6906560 0.6908550 #> [11,] 0.6057474 0.6665377 0.6090964 0.6580129 0.6821517 0.6931624 0.7047642 #> [12,] 0.5776645 0.6366429 0.5849625 0.6396187 0.6506030 0.6484770 0.6357505 #> [,8] [,9] [,10] [,11] [,12] #> [1,] 0.6068802 0.6008534 0.5941055 0.6057474 0.5776645 #> [2,] 0.6506414 0.6864146 0.6700023 0.6665377 0.6366429 #> [3,] 0.5977097 0.6312143 0.6099459 0.6090964 0.5849625 #> [4,] 0.6650654 0.6983221 0.6830820 0.6580129 0.6396187 #> [5,] 0.6834911 0.7011685 0.6726631 0.6821517 0.6506030 #> [6,] 0.7149524 0.7243845 0.6906560 0.6931624 0.6484770 #> [7,] 0.7239390 0.7452085 0.6908550 0.7047642 0.6357505 #> [8,] 0.9986962 0.7859599 0.7296203 0.7360779 0.7168406 #> [9,] 0.7859599 0.9986962 0.7858874 0.7359273 0.7067616 #> [10,] 0.7296203 0.7858874 0.9986962 0.7423038 0.6937184 #> [11,] 0.7360779 0.7359273 0.7423038 0.9986962 0.7651156 #> [12,] 0.7168406 0.7067616 0.6937184 0.7651156 0.9986962 #> #> #> Slot "mean": #> [[1]] #> [1] 6.719961e-17 -4.631960e-17 -2.598874e-16 2.812468e-16 -1.190559e-16 #> [6] 1.925882e-16 8.628836e-17 -3.291677e-17 -2.267291e-16 8.286867e-17 #> [11] -4.419813e-17 1.641406e-16 #> #> #> Slot "group.w": #> [[1]] #> [1] 1 #> #> #> Slot "nobs": #> [[1]] #> [1] 767 #> #> #> Slot "ntotal": #> [1] 767 #> #> Slot "ngroups": #> [1] 1 #> #> Slot "icov": #> [[1]] #> [,1] [,2] [,3] [,4] [,5] [,6] #> [1,] 2.56666779 -0.89838405 -0.43259377 -0.32421942 -0.28777293 0.14384062 #> [2,] -0.89838405 3.95326317 -0.44053127 -1.11869229 0.02923219 -0.98482962 #> [3,] -0.43259377 -0.44053127 2.55815889 -0.51748759 -0.33656130 -0.21268026 #> [4,] -0.32421942 -1.11869229 -0.51748759 4.38641636 -1.13430268 -0.66819097 #> [5,] -0.28777293 0.02923219 -0.33656130 -1.13430268 3.82775834 -0.91839165 #> [6,] 0.14384062 -0.98482962 -0.21268026 -0.66819097 -0.91839165 4.67858561 #> [7,] -0.17310371 0.02463264 0.07352768 -0.40899326 -0.42918960 -1.43719481 #> [8,] -0.23576724 0.16145846 0.02863931 0.08864097 -0.11676810 -0.40475083 #> [9,] 0.14652390 -0.20923871 -0.18695637 -0.10152597 -0.13393274 -0.06775339 #> [10,] -0.03071658 -0.16324880 -0.07073100 -0.28942767 -0.03411934 -0.06008535 #> [11,] -0.12066923 -0.17892478 -0.10165373 0.22341331 -0.21314749 -0.08840909 #> [12,] -0.06729872 -0.13855313 -0.08660113 -0.13423818 -0.18704450 0.02032045 #> [,7] [,8] [,9] [,10] [,11] [,12] #> [1,] -0.17310371 -0.23576724 0.14652390 -0.03071658 -0.12066923 -0.06729872 #> [2,] 0.02463264 0.16145846 -0.20923871 -0.16324880 -0.17892478 -0.13855313 #> [3,] 0.07352768 0.02863931 -0.18695637 -0.07073100 -0.10165373 -0.08660113 #> [4,] -0.40899326 0.08864097 -0.10152597 -0.28942767 0.22341331 -0.13423818 #> [5,] -0.42918960 -0.11676810 -0.13393274 -0.03411934 -0.21314749 -0.18704450 #> [6,] -1.43719481 -0.40475083 -0.06775339 -0.06008535 -0.08840909 0.02032045 #> [7,] 3.85478920 -0.42527880 -0.64374297 -0.05729874 -0.43801838 0.19841068 #> [8,] -0.42527880 3.51881217 -1.09635019 -0.36152562 -0.44749735 -0.58638339 #> [9,] -0.64374297 -1.09635019 4.06158608 -1.17098217 -0.24083979 -0.32528433 #> [10,] -0.05729874 -0.36152562 -1.17098217 3.36702270 -0.70263464 -0.26599088 #> [11,] -0.43801838 -0.44749735 -0.24083979 -0.70263464 3.54156388 -1.15812678 #> [12,] 0.19841068 -0.58638339 -0.32528433 -0.26599088 -1.15812678 2.97071802 #> #> #> Slot "cov.log.det": #> [[1]] #> [1] -11.98038 #> #>