predict.textmodel_wordscores.Rd
Predict textmodel_wordscores
# S3 method for textmodel_wordscores predict( object, newdata = NULL, se.fit = FALSE, interval = c("none", "confidence"), level = 0.95, rescaling = c("none", "lbg", "mv"), force = TRUE, ... )
object | a fitted Wordscores textmodel |
---|---|
newdata | dfm on which prediction should be made |
se.fit | if |
interval | type of confidence interval calculation |
level | tolerance/confidence level for intervals |
rescaling |
|
force | make the feature set of |
... | not used |
predict.textmodel_wordscores()
returns a named vector of predicted
document scores ("text scores" \(S_{vd}\) in LBG 2003), or a named list if
se.fit = TRUE
consisting of the predicted scores ($fit
) and the
associated standard errors ($se.fit
). When interval =
"confidence"
, the predicted values will be a matrix. This behaviour matches
that of predict.lm
.
#> R1 R2 R3 R4 R5 #> -1.317931e+00 -7.395598e-01 -8.673617e-18 7.395598e-01 1.317931e+00 #> V1 #> -4.480591e-01#> Warning: More than two reference scores found with MV rescaling; using only min, max values.#> R1 R2 R3 R4 R5 V1 #> -1.5000000 -0.8417280 0.0000000 0.8417280 1.5000000 -0.5099572#> R1 R2 R3 R4 R5 V1 #> -1.58967683 -0.88488724 0.01632248 0.91753220 1.62232179 -0.52967149#> $fit #> R1 R2 R3 R4 R5 #> -1.317931e+00 -7.395598e-01 -8.673617e-18 7.395598e-01 1.317931e+00 #> V1 #> -4.480591e-01 #> #> $se.fit #> [1] 0.006699613 0.011433605 0.012005250 0.011433605 0.006699613 0.011897667 #>#> $fit #> fit lwr upr #> R1 -1.317931e+00 -1.33106234 -1.30480034 #> R2 -7.395598e-01 -0.76196925 -0.71715035 #> R3 -8.673617e-18 -0.02352986 0.02352986 #> R4 7.395598e-01 0.71715035 0.76196925 #> R5 1.317931e+00 1.30480034 1.33106234 #> V1 -4.480591e-01 -0.47137808 -0.42474008 #> #> $se.fit #> [1] 0.006699613 0.011433605 0.012005250 0.011433605 0.006699613 0.011897667 #>#> $fit #> fit lwr upr #> R1 -1.58967683 -1.60567795 -1.5736757 #> R2 -0.88488724 -0.91219485 -0.8575796 #> R3 0.01632248 -0.01235043 0.0449954 #> R4 0.91753220 0.89022458 0.9448398 #> R5 1.62232179 1.60632067 1.6383229 #> V1 -0.52967149 -0.55808746 -0.5012555 #> #> $se.fit #> [1] 0.02448647 0.03025520 0.03095179 0.03025520 0.02448647 0.03082069 #>