The penfaData class gives information on the data set provided in input for analysis. This class is an adaptation of the lavData class from the lavaan package.

Slots

ngroups

Integer. The number of groups.

group

Character. The observed variables defining the groups.

group.label

Character. The group labels, that is, the values of the group variable, if any.

std.ov

Logical indicating whether the observed variables should be standardized.

nobs

List of the effective number of observations in each group.

norig

List of the original number of observations in each group.

ov.names

List of the observed variable names in each group.

ov

List of details at the observed variable level.

case.idx

List of the case (i.e., observation) indices in each group.

X

List. Local copy of the input data set split into groups.

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@Data
#> Number of observations 767 #>
str(alasso_fit@Data)
#> Formal class 'penfaData' [package "penfa"] with 10 slots #> ..@ ngroups : int 1 #> ..@ group : chr(0) #> ..@ group.label: chr(0) #> ..@ std.ov : logi FALSE #> ..@ nobs :List of 1 #> .. ..$ : int 767 #> ..@ norig :List of 1 #> .. ..$ : int 767 #> ..@ ov.names :List of 1 #> .. ..$ : chr [1:12] "h1" "h2" "h3" "h4" ... #> ..@ ov :List of 6 #> .. ..$ name: chr [1:12] "h1" "h2" "h3" "h4" ... #> .. ..$ idx : int [1:12] 2 3 4 5 6 7 8 9 10 11 ... #> .. ..$ nobs: int [1:12] 767 767 767 767 767 767 767 767 767 767 ... #> .. ..$ type: chr [1:12] "numeric" "numeric" "numeric" "numeric" ... #> .. ..$ mean: num [1:12] 6.78e-17 -4.64e-17 -2.60e-16 2.81e-16 -1.20e-16 ... #> .. ..$ var : num [1:12] 1 1 1 1 1 1 1 1 1 1 ... #> ..@ case.idx :List of 1 #> .. ..$ : int [1:767] 1 2 3 4 5 6 7 8 9 10 ... #> ..@ X :List of 1 #> .. ..$ : num [1:767, 1:12] -1.9784 -0.0535 0.5881 -0.0535 0.5881 ...