coef,penfa-method {penfa}R Documentation

Coefficients from a penfa object

Description

An S4 method returning the estimates of the model parameters.

Usage

## S4 method for signature 'penfa'
coef(object, type = "free", labels = TRUE)

Arguments

object

An object of class penfa, found as a result of a call to penfa.

type

Character. If type="free", only the estimated parameters (both penalized and unpenalized) are returned. If type="user", all parameters listed in the parameter table are returned, including fixed parameters.

labels

Logical. If TRUE, parameters are returned with their names.

Value

A numeric vector of class penfa.vector containing the estimated model parameters.

See Also

penfa, penfa-class

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")

coef(alasso_fit)





[Package penfa version 0.1.1 Index]