% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vbpm_fit.R
\name{coef.vbpm_fit}
\alias{coef.vbpm_fit}
\title{Extract coefficients from a fitted vbpm model}
\usage{
\method{coef}{vbpm_fit}(object, ...)
}
\arguments{
\item{object}{A fit returned by \code{\link[=vbfa]{vbfa()}} or \code{\link[=vbmimic]{vbmimic()}}.}

\item{...}{Ignored.}
}
\value{
A matrix (vbfa) or a list of two matrices (vbmimic).
}
\description{
For a \code{\link[=vbfa]{vbfa()}} fit, returns the loading matrix. For a \code{\link[=vbmimic]{vbmimic()}} fit,
returns a list with the measurement loadings \code{A} and the structural
coefficients \code{B}.
}
\examples{
sim <- sim_fa(N = 300, K = 3, ipf = 6, lam = .7, lac = .3, rseed = 1)
Q <- matrix(-1L, ncol(sim$dat), 3)
for (k in 1:3) { a <- which(rep(1:3, each = 6) == k)[1:2]
                 Q[a, ] <- 0L; Q[a, k] <- 1L }
fit <- vbfa(sim$dat, Q)
round(coef(fit), 2)
}
