Estimate \(\theta_i\) for each document, from a fitted textmodel_affinity object.

Other methods below provide standard ways to extract or compute quantities from predicted textmodel_affinity objects.

# S3 method for textmodel_affinity
predict(object, newdata = NULL, level = 0.95, ...)

# S3 method for predict.textmodel_affinity
coef(object, ...)

# S3 method for predict.textmodel_affinity
residuals(object, type = c("response", "pearson"), ...)

# S3 method for predict.textmodel_affinity
rstandard(model, ...)

Arguments

object

a fitted affinity textmodel

newdata

dfm on which prediction should be made

level

probability level for confidence interval width

...

unused

type

see residuals.lm

Value

predict() returns a list of predicted affinity textmodel quantities.

coef() returns a document \(\times\) class matrix of class affinities for each document.

residuals() returns a document-by-feature matrix of residuals. resid() is an alias.

rstandard() is a shortcut to return the pearson residuals.

See also

influence.predict.textmodel_affinity for methods of computing the influence of particular features from a predicted textmodel_affinity model.