Skip to contents

S3 methods that make a bayesqm_fit behave like a standard R modelling object: coef() returns the posterior-mean loadings, fitted() the posterior-mean fitted Y on the original Q-sort scale, residuals() is Y - fitted(fit), sigma() is the posterior-mean residual scale, nobs() is the number of participants, and family() returns a small bayesqm_family list with $family, $link, and $nu. as.matrix(), as.array(), and as.data.frame() return the posterior draws in Stan-style parameter naming (Lambda[i,k], F[j,k], nu, sigma, tau), which the posterior, bayesplot, and tidybayes packages consume natively.

update() re-fits the model with modified arguments; the original call and stored data are reused.

Usage

# S3 method for class 'bayesqm_fit'
coef(object, ...)

# S3 method for class 'bayesqm_fit'
fitted(object, ...)

# S3 method for class 'bayesqm_fit'
residuals(object, ...)

# S3 method for class 'bayesqm_fit'
nobs(object, ...)

# S3 method for class 'bayesqm_fit'
sigma(object, ...)

# S3 method for class 'bayesqm_fit'
family(object, ...)

# S3 method for class 'bayesqm_family'
print(x, ...)

# S3 method for class 'bayesqm_fit'
as.matrix(x, ...)

# S3 method for class 'bayesqm_fit'
as.array(x, ...)

# S3 method for class 'bayesqm_fit'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

# S3 method for class 'bayesqm_fit'
update(object, ..., evaluate = TRUE)

Arguments

object, x

A bayesqm_fit object.

...

Further arguments (e.g. arguments for update()).

row.names, optional

Passed to as.data.frame().

evaluate

If FALSE, update() returns the modified call without evaluating it.

Value

Depends on the method; see Description.