Usage
lavPredict(object, type = "lv", newdata = NULL, method = "EBM", se.fit = FALSE, label = TRUE, fsm = FALSE, optim.method = "nlminb")
Arguments
object
An object of class lavaan
.
type
A character string. If "lv"
, estimated values for
the latent variables in the model are computed. If "ov"
, model
predicted values for the indicators of the latent variables in the model
are computed.
newdata
An optional data.frame, containing the same variables as
the data.frame used when fitting the model in object.
method
A character string. In the linear case (when the indicators are
continuous), the possible options are "regression"
or "Bartlett"
.
In the categorical case, the only option (for now) is "EBM"
for
the Empirical Bayes Modal approach.
label
Logical. If TRUE, the columns are labeled.
fsm
Logical. If TRUE, return the factor score matrix as an attribute.
Only for numeric data.
optim.method
Character string. Only used in the categorical case.
If "nlminb"
(the default), the "nlminb()"
function is used
for the optimization. If "BFGS"
, the "optim()"
function
is used with the BFGS method.