Calculates a second set of person measures after assigning relative weights to items or item sets. The fitted calibration is not changed. In particular, these estimates do not replace the ordinary Rasch person measures used for fit, reliability, targeting or DIF.
Usage
weighted_person_estimates(fit, weights, by = c("item", "set"), sets = NULL)Arguments
- fit
A fitted object from
rasch,rasch_mfrmorrasch_efrm.- weights
A named numeric vector of non-negative finite relative weights. Names must identify every fitted item when
by = "item", or every item set whenby = "set".- by
Whether
weightsnames individual"item"s or"set"s.- sets
For
by = "set", a named character vector mapping items to sets, or a named list whose elements contain item names. It can be omitted for an EFRM fit, which already contains this map.
Value
A data frame with the person identifiers and factors, observed
response-cell count (item count for an ordinary fit), raw and externally
weighted scores, maximum scores, weighted location, sandwich standard
error and extreme-score flag. The resolved
item weights are retained in the "weighting" attribute.
Details
Let \(q_i\) be the external weight and \(a_i\) the model unit for
response cell \(i\). Write
\(H(\theta)=\sum_i q_i a_i^2V_i(\theta)\) and
\(J(\theta)=\sum_i q_i^2a_i^2V_i(\theta)\). The estimate solves the
externally weighted Warm score equation
$$\sum_i q_i a_i\{x_i-E_i(\theta)\}+
\frac{J(\theta)\sum_i q_i a_i^3\mu_{3i}(\theta)}
{2H(\theta)^2}=0.$$
Competing maxima are ranked by the integral of this estimating score.
With equal weights this reduces to the ordinary weighted log likelihood;
unequal external weights require their own correction. Equal maxima use
the lower location.
Its standard error is the sandwich form
$$\operatorname{SE}(\hat\theta)=
\frac{\{\sum_iq_i^2a_i^2V_i(\hat\theta)\}^{1/2}}
{\sum_iq_ia_i^2V_i(\hat\theta)}.$$
This matters because an external weight changes the estimating equation;
it does not create independent replications of an item. With equal weights
the equation and standard error reduce to the person estimates in
fit$person. Weights are normalised to mean one over the fitted
response cells, so only their relative values matter. A zero weight omits
that item or set from the secondary measure. Positive weights must be
numerically representable relative to the largest supplied weight.
For an MFRM fit, an item weight applies to all response cells belonging to
that item. For an EFRM fit, by = "set" uses the fitted item-set map
unless sets is supplied.
References
Warm, T. A. (1989). Weighted likelihood estimation of ability in item response theory. Psychometrika, 54(3), 427–450.
Examples
set.seed(1)
d <- simulate_rasch(n_persons = 200, n_items = 6)
fit <- rasch(d)
weighted_person_estimates(
fit, setNames(c(2, 2, 1, 1, 0.5, 0.5), colnames(fit$X)))
#> id n_items raw max_raw weighted_score max_weighted_score theta
#> 1 P0001 6 3 6 4.2857143 6 0.3100327
#> 2 P0002 6 3 6 4.2857143 6 0.3100327
#> 3 P0003 6 4 6 3.4285714 6 -0.5496423
#> 4 P0004 6 5 6 5.5714286 6 2.1417722
#> 5 P0005 6 2 6 3.4285714 6 -0.5496423
#> 6 P0006 6 3 6 4.2857143 6 0.3100327
#> 7 P0007 6 4 6 5.1428571 6 1.4013653
#> 8 P0008 6 5 6 5.5714286 6 2.1417722
#> 9 P0009 6 3 6 3.4285714 6 -0.5496423
#> 10 P0010 6 1 6 1.7142857 6 -1.9953021
#> 11 P0011 6 4 6 5.1428571 6 1.4013653
#> 12 P0012 6 3 6 4.2857143 6 0.3100327
#> 13 P0013 6 2 6 3.4285714 6 -0.5496423
#> 14 P0014 6 3 6 3.4285714 6 -0.5496423
#> 15 P0015 6 4 6 5.1428571 6 1.4013653
#> 16 P0016 6 5 6 5.5714286 6 2.1417722
#> 17 P0017 6 4 6 3.8571429 6 -0.1385634
#> 18 P0018 6 3 6 4.2857143 6 0.3100327
#> 19 P0019 6 4 6 4.7142857 6 0.8127827
#> 20 P0020 6 2 6 2.5714286 6 -1.2954097
#> 21 P0021 6 4 6 4.7142857 6 0.8127827
#> 22 P0022 6 4 6 5.1428571 6 1.4013653
#> 23 P0023 6 3 6 4.2857143 6 0.3100327
#> 24 P0024 6 0 6 0.0000000 6 -3.7191054
#> 25 P0025 6 3 6 4.2857143 6 0.3100327
#> 26 P0026 6 3 6 4.2857143 6 0.3100327
#> 27 P0027 6 1 6 1.7142857 6 -1.9953021
#> 28 P0028 6 2 6 3.4285714 6 -0.5496423
#> 29 P0029 6 3 6 3.8571429 6 -0.1385634
#> 30 P0030 6 4 6 5.1428571 6 1.4013653
#> 31 P0031 6 4 6 5.1428571 6 1.4013653
#> 32 P0032 6 2 6 2.5714286 6 -1.2954097
#> 33 P0033 6 3 6 4.2857143 6 0.3100327
#> 34 P0034 6 4 6 5.1428571 6 1.4013653
#> 35 P0035 6 0 6 0.0000000 6 -3.7191054
#> 36 P0036 6 3 6 4.2857143 6 0.3100327
#> 37 P0037 6 1 6 1.7142857 6 -1.9953021
#> 38 P0038 6 2 6 1.2857143 6 -2.3535810
#> 39 P0039 6 5 6 5.5714286 6 2.1417722
#> 40 P0040 6 4 6 4.7142857 6 0.8127827
#> 41 P0041 6 2 6 2.5714286 6 -1.2954097
#> 42 P0042 6 2 6 3.4285714 6 -0.5496423
#> 43 P0043 6 4 6 5.1428571 6 1.4013653
#> 44 P0044 6 4 6 5.1428571 6 1.4013653
#> 45 P0045 6 3 6 3.8571429 6 -0.1385634
#> 46 P0046 6 2 6 2.1428571 6 -1.6464092
#> 47 P0047 6 3 6 3.0000000 6 -0.9326581
#> 48 P0048 6 4 6 4.7142857 6 0.8127827
#> 49 P0049 6 3 6 4.2857143 6 0.3100327
#> 50 P0050 6 4 6 5.1428571 6 1.4013653
#> 51 P0051 6 3 6 4.2857143 6 0.3100327
#> 52 P0052 6 3 6 4.2857143 6 0.3100327
#> 53 P0053 6 2 6 3.4285714 6 -0.5496423
#> 54 P0054 6 2 6 1.7142857 6 -1.9953021
#> 55 P0055 6 5 6 5.5714286 6 2.1417722
#> 56 P0056 6 2 6 3.4285714 6 -0.5496423
#> 57 P0057 6 2 6 2.5714286 6 -1.2954097
#> 58 P0058 6 3 6 4.2857143 6 0.3100327
#> 59 P0059 6 4 6 4.7142857 6 0.8127827
#> 60 P0060 6 1 6 1.7142857 6 -1.9953021
#> 61 P0061 6 3 6 4.2857143 6 0.3100327
#> 62 P0062 6 3 6 4.2857143 6 0.3100327
#> 63 P0063 6 2 6 1.7142857 6 -1.9953021
#> 64 P0064 6 2 6 3.4285714 6 -0.5496423
#> 65 P0065 6 2 6 3.4285714 6 -0.5496423
#> 66 P0066 6 4 6 5.1428571 6 1.4013653
#> 67 P0067 6 2 6 3.4285714 6 -0.5496423
#> 68 P0068 6 5 6 5.1428571 6 1.4013653
#> 69 P0069 6 4 6 5.1428571 6 1.4013653
#> 70 P0070 6 4 6 5.1428571 6 1.4013653
#> 71 P0071 6 3 6 4.2857143 6 0.3100327
#> 72 P0072 6 3 6 4.2857143 6 0.3100327
#> 73 P0073 6 5 6 5.5714286 6 2.1417722
#> 74 P0074 6 2 6 3.4285714 6 -0.5496423
#> 75 P0075 6 2 6 2.5714286 6 -1.2954097
#> 76 P0076 6 2 6 3.4285714 6 -0.5496423
#> 77 P0077 6 2 6 3.4285714 6 -0.5496423
#> 78 P0078 6 2 6 2.5714286 6 -1.2954097
#> 79 P0079 6 3 6 4.2857143 6 0.3100327
#> 80 P0080 6 3 6 3.0000000 6 -0.9326581
#> 81 P0081 6 2 6 3.4285714 6 -0.5496423
#> 82 P0082 6 3 6 4.2857143 6 0.3100327
#> 83 P0083 6 4 6 5.1428571 6 1.4013653
#> 84 P0084 6 2 6 2.5714286 6 -1.2954097
#> 85 P0085 6 6 6 6.0000000 6 3.2777140
#> 86 P0086 6 4 6 5.1428571 6 1.4013653
#> 87 P0087 6 4 6 5.1428571 6 1.4013653
#> 88 P0088 6 2 6 2.5714286 6 -1.2954097
#> 89 P0089 6 3 6 3.4285714 6 -0.5496423
#> 90 P0090 6 3 6 4.2857143 6 0.3100327
#> 91 P0091 6 0 6 0.0000000 6 -3.7191054
#> 92 P0092 6 4 6 4.7142857 6 0.8127827
#> 93 P0093 6 4 6 4.2857143 6 0.3100327
#> 94 P0094 6 2 6 3.4285714 6 -0.5496423
#> 95 P0095 6 4 6 5.1428571 6 1.4013653
#> 96 P0096 6 3 6 4.2857143 6 0.3100327
#> 97 P0097 6 2 6 3.4285714 6 -0.5496423
#> 98 P0098 6 1 6 1.7142857 6 -1.9953021
#> 99 P0099 6 2 6 3.4285714 6 -0.5496423
#> 100 P0100 6 2 6 2.5714286 6 -1.2954097
#> 101 P0101 6 3 6 4.2857143 6 0.3100327
#> 102 P0102 6 3 6 4.2857143 6 0.3100327
#> 103 P0103 6 2 6 3.4285714 6 -0.5496423
#> 104 P0104 6 3 6 3.8571429 6 -0.1385634
#> 105 P0105 6 3 6 3.8571429 6 -0.1385634
#> 106 P0106 6 4 6 4.7142857 6 0.8127827
#> 107 P0107 6 2 6 3.4285714 6 -0.5496423
#> 108 P0108 6 3 6 4.2857143 6 0.3100327
#> 109 P0109 6 3 6 4.2857143 6 0.3100327
#> 110 P0110 6 4 6 4.7142857 6 0.8127827
#> 111 P0111 6 2 6 3.4285714 6 -0.5496423
#> 112 P0112 6 3 6 4.2857143 6 0.3100327
#> 113 P0113 6 4 6 3.4285714 6 -0.5496423
#> 114 P0114 6 2 6 3.4285714 6 -0.5496423
#> 115 P0115 6 3 6 4.2857143 6 0.3100327
#> 116 P0116 6 2 6 3.4285714 6 -0.5496423
#> 117 P0117 6 1 6 1.7142857 6 -1.9953021
#> 118 P0118 6 3 6 3.4285714 6 -0.5496423
#> 119 P0119 6 4 6 4.7142857 6 0.8127827
#> 120 P0120 6 4 6 5.1428571 6 1.4013653
#> 121 P0121 6 1 6 1.7142857 6 -1.9953021
#> 122 P0122 6 5 6 5.5714286 6 2.1417722
#> 123 P0123 6 3 6 4.2857143 6 0.3100327
#> 124 P0124 6 4 6 4.7142857 6 0.8127827
#> 125 P0125 6 4 6 5.1428571 6 1.4013653
#> 126 P0126 6 5 6 5.5714286 6 2.1417722
#> 127 P0127 6 3 6 4.2857143 6 0.3100327
#> 128 P0128 6 2 6 3.4285714 6 -0.5496423
#> 129 P0129 6 2 6 3.4285714 6 -0.5496423
#> 130 P0130 6 2 6 2.1428571 6 -1.6464092
#> 131 P0131 6 5 6 5.5714286 6 2.1417722
#> 132 P0132 6 2 6 2.5714286 6 -1.2954097
#> 133 P0133 6 2 6 3.4285714 6 -0.5496423
#> 134 P0134 6 0 6 0.0000000 6 -3.7191054
#> 135 P0135 6 3 6 4.2857143 6 0.3100327
#> 136 P0136 6 0 6 0.0000000 6 -3.7191054
#> 137 P0137 6 3 6 4.2857143 6 0.3100327
#> 138 P0138 6 3 6 3.8571429 6 -0.1385634
#> 139 P0139 6 4 6 3.8571429 6 -0.1385634
#> 140 P0140 6 1 6 1.7142857 6 -1.9953021
#> 141 P0141 6 0 6 0.0000000 6 -3.7191054
#> 142 P0142 6 3 6 4.2857143 6 0.3100327
#> 143 P0143 6 2 6 3.4285714 6 -0.5496423
#> 144 P0144 6 1 6 1.7142857 6 -1.9953021
#> 145 P0145 6 0 6 0.0000000 6 -3.7191054
#> 146 P0146 6 1 6 1.7142857 6 -1.9953021
#> 147 P0147 6 5 6 5.5714286 6 2.1417722
#> 148 P0148 6 3 6 4.2857143 6 0.3100327
#> 149 P0149 6 2 6 2.5714286 6 -1.2954097
#> 150 P0150 6 3 6 4.2857143 6 0.3100327
#> 151 P0151 6 3 6 4.2857143 6 0.3100327
#> 152 P0152 6 2 6 3.4285714 6 -0.5496423
#> 153 P0153 6 3 6 3.4285714 6 -0.5496423
#> 154 P0154 6 3 6 3.4285714 6 -0.5496423
#> 155 P0155 6 2 6 2.5714286 6 -1.2954097
#> 156 P0156 6 1 6 1.7142857 6 -1.9953021
#> 157 P0157 6 3 6 4.2857143 6 0.3100327
#> 158 P0158 6 1 6 0.4285714 6 -3.1728314
#> 159 P0159 6 2 6 3.4285714 6 -0.5496423
#> 160 P0160 6 5 6 5.1428571 6 1.4013653
#> 161 P0161 6 4 6 4.7142857 6 0.8127827
#> 162 P0162 6 2 6 2.1428571 6 -1.6464092
#> 163 P0163 6 4 6 4.7142857 6 0.8127827
#> 164 P0164 6 3 6 4.2857143 6 0.3100327
#> 165 P0165 6 2 6 2.5714286 6 -1.2954097
#> 166 P0166 6 6 6 6.0000000 6 3.2777140
#> 167 P0167 6 3 6 4.2857143 6 0.3100327
#> 168 P0168 6 3 6 4.2857143 6 0.3100327
#> 169 P0169 6 4 6 5.1428571 6 1.4013653
#> 170 P0170 6 3 6 4.2857143 6 0.3100327
#> 171 P0171 6 5 6 5.5714286 6 2.1417722
#> 172 P0172 6 4 6 5.1428571 6 1.4013653
#> 173 P0173 6 2 6 2.5714286 6 -1.2954097
#> 174 P0174 6 3 6 4.2857143 6 0.3100327
#> 175 P0175 6 2 6 3.4285714 6 -0.5496423
#> 176 P0176 6 3 6 3.8571429 6 -0.1385634
#> 177 P0177 6 3 6 3.0000000 6 -0.9326581
#> 178 P0178 6 5 6 5.5714286 6 2.1417722
#> 179 P0179 6 3 6 4.2857143 6 0.3100327
#> 180 P0180 6 5 6 5.1428571 6 1.4013653
#> 181 P0181 6 2 6 3.4285714 6 -0.5496423
#> 182 P0182 6 4 6 4.2857143 6 0.3100327
#> 183 P0183 6 4 6 4.7142857 6 0.8127827
#> 184 P0184 6 0 6 0.0000000 6 -3.7191054
#> 185 P0185 6 3 6 4.2857143 6 0.3100327
#> 186 P0186 6 2 6 2.5714286 6 -1.2954097
#> 187 P0187 6 4 6 4.7142857 6 0.8127827
#> 188 P0188 6 1 6 1.7142857 6 -1.9953021
#> 189 P0189 6 3 6 4.2857143 6 0.3100327
#> 190 P0190 6 1 6 1.7142857 6 -1.9953021
#> 191 P0191 6 2 6 2.5714286 6 -1.2954097
#> 192 P0192 6 3 6 3.4285714 6 -0.5496423
#> 193 P0193 6 3 6 4.2857143 6 0.3100327
#> 194 P0194 6 4 6 4.7142857 6 0.8127827
#> 195 P0195 6 2 6 3.4285714 6 -0.5496423
#> 196 P0196 6 4 6 5.1428571 6 1.4013653
#> 197 P0197 6 5 6 5.5714286 6 2.1417722
#> 198 P0198 6 2 6 3.4285714 6 -0.5496423
#> 199 P0199 6 2 6 3.4285714 6 -0.5496423
#> 200 P0200 6 2 6 3.4285714 6 -0.5496423
#> se extreme
#> 1 1.133804 FALSE
#> 2 1.133804 FALSE
#> 3 1.138379 FALSE
#> 4 1.322617 FALSE
#> 5 1.138379 FALSE
#> 6 1.133804 FALSE
#> 7 1.198472 FALSE
#> 8 1.322617 FALSE
#> 9 1.138379 FALSE
#> 10 1.247243 FALSE
#> 11 1.198472 FALSE
#> 12 1.133804 FALSE
#> 13 1.138379 FALSE
#> 14 1.138379 FALSE
#> 15 1.198472 FALSE
#> 16 1.322617 FALSE
#> 17 1.131615 FALSE
#> 18 1.133804 FALSE
#> 19 1.151176 FALSE
#> 20 1.172337 FALSE
#> 21 1.151176 FALSE
#> 22 1.198472 FALSE
#> 23 1.133804 FALSE
#> 24 1.872040 TRUE
#> 25 1.133804 FALSE
#> 26 1.133804 FALSE
#> 27 1.247243 FALSE
#> 28 1.138379 FALSE
#> 29 1.131615 FALSE
#> 30 1.198472 FALSE
#> 31 1.198472 FALSE
#> 32 1.172337 FALSE
#> 33 1.133804 FALSE
#> 34 1.198472 FALSE
#> 35 1.872040 TRUE
#> 36 1.133804 FALSE
#> 37 1.247243 FALSE
#> 38 1.313364 FALSE
#> 39 1.322617 FALSE
#> 40 1.151176 FALSE
#> 41 1.172337 FALSE
#> 42 1.138379 FALSE
#> 43 1.198472 FALSE
#> 44 1.198472 FALSE
#> 45 1.131615 FALSE
#> 46 1.202659 FALSE
#> 47 1.151781 FALSE
#> 48 1.151176 FALSE
#> 49 1.133804 FALSE
#> 50 1.198472 FALSE
#> 51 1.133804 FALSE
#> 52 1.133804 FALSE
#> 53 1.138379 FALSE
#> 54 1.247243 FALSE
#> 55 1.322617 FALSE
#> 56 1.138379 FALSE
#> 57 1.172337 FALSE
#> 58 1.133804 FALSE
#> 59 1.151176 FALSE
#> 60 1.247243 FALSE
#> 61 1.133804 FALSE
#> 62 1.133804 FALSE
#> 63 1.247243 FALSE
#> 64 1.138379 FALSE
#> 65 1.138379 FALSE
#> 66 1.198472 FALSE
#> 67 1.138379 FALSE
#> 68 1.198472 FALSE
#> 69 1.198472 FALSE
#> 70 1.198472 FALSE
#> 71 1.133804 FALSE
#> 72 1.133804 FALSE
#> 73 1.322617 FALSE
#> 74 1.138379 FALSE
#> 75 1.172337 FALSE
#> 76 1.138379 FALSE
#> 77 1.138379 FALSE
#> 78 1.172337 FALSE
#> 79 1.133804 FALSE
#> 80 1.151781 FALSE
#> 81 1.138379 FALSE
#> 82 1.133804 FALSE
#> 83 1.198472 FALSE
#> 84 1.172337 FALSE
#> 85 1.769650 TRUE
#> 86 1.198472 FALSE
#> 87 1.198472 FALSE
#> 88 1.172337 FALSE
#> 89 1.138379 FALSE
#> 90 1.133804 FALSE
#> 91 1.872040 TRUE
#> 92 1.151176 FALSE
#> 93 1.133804 FALSE
#> 94 1.138379 FALSE
#> 95 1.198472 FALSE
#> 96 1.133804 FALSE
#> 97 1.138379 FALSE
#> 98 1.247243 FALSE
#> 99 1.138379 FALSE
#> 100 1.172337 FALSE
#> 101 1.133804 FALSE
#> 102 1.133804 FALSE
#> 103 1.138379 FALSE
#> 104 1.131615 FALSE
#> 105 1.131615 FALSE
#> 106 1.151176 FALSE
#> 107 1.138379 FALSE
#> 108 1.133804 FALSE
#> 109 1.133804 FALSE
#> 110 1.151176 FALSE
#> 111 1.138379 FALSE
#> 112 1.133804 FALSE
#> 113 1.138379 FALSE
#> 114 1.138379 FALSE
#> 115 1.133804 FALSE
#> 116 1.138379 FALSE
#> 117 1.247243 FALSE
#> 118 1.138379 FALSE
#> 119 1.151176 FALSE
#> 120 1.198472 FALSE
#> 121 1.247243 FALSE
#> 122 1.322617 FALSE
#> 123 1.133804 FALSE
#> 124 1.151176 FALSE
#> 125 1.198472 FALSE
#> 126 1.322617 FALSE
#> 127 1.133804 FALSE
#> 128 1.138379 FALSE
#> 129 1.138379 FALSE
#> 130 1.202659 FALSE
#> 131 1.322617 FALSE
#> 132 1.172337 FALSE
#> 133 1.138379 FALSE
#> 134 1.872040 TRUE
#> 135 1.133804 FALSE
#> 136 1.872040 TRUE
#> 137 1.133804 FALSE
#> 138 1.131615 FALSE
#> 139 1.131615 FALSE
#> 140 1.247243 FALSE
#> 141 1.872040 TRUE
#> 142 1.133804 FALSE
#> 143 1.138379 FALSE
#> 144 1.247243 FALSE
#> 145 1.872040 TRUE
#> 146 1.247243 FALSE
#> 147 1.322617 FALSE
#> 148 1.133804 FALSE
#> 149 1.172337 FALSE
#> 150 1.133804 FALSE
#> 151 1.133804 FALSE
#> 152 1.138379 FALSE
#> 153 1.138379 FALSE
#> 154 1.138379 FALSE
#> 155 1.172337 FALSE
#> 156 1.247243 FALSE
#> 157 1.133804 FALSE
#> 158 1.576322 FALSE
#> 159 1.138379 FALSE
#> 160 1.198472 FALSE
#> 161 1.151176 FALSE
#> 162 1.202659 FALSE
#> 163 1.151176 FALSE
#> 164 1.133804 FALSE
#> 165 1.172337 FALSE
#> 166 1.769650 TRUE
#> 167 1.133804 FALSE
#> 168 1.133804 FALSE
#> 169 1.198472 FALSE
#> 170 1.133804 FALSE
#> 171 1.322617 FALSE
#> 172 1.198472 FALSE
#> 173 1.172337 FALSE
#> 174 1.133804 FALSE
#> 175 1.138379 FALSE
#> 176 1.131615 FALSE
#> 177 1.151781 FALSE
#> 178 1.322617 FALSE
#> 179 1.133804 FALSE
#> 180 1.198472 FALSE
#> 181 1.138379 FALSE
#> 182 1.133804 FALSE
#> 183 1.151176 FALSE
#> 184 1.872040 TRUE
#> 185 1.133804 FALSE
#> 186 1.172337 FALSE
#> 187 1.151176 FALSE
#> 188 1.247243 FALSE
#> 189 1.133804 FALSE
#> 190 1.247243 FALSE
#> 191 1.172337 FALSE
#> 192 1.138379 FALSE
#> 193 1.133804 FALSE
#> 194 1.151176 FALSE
#> 195 1.138379 FALSE
#> 196 1.198472 FALSE
#> 197 1.322617 FALSE
#> 198 1.138379 FALSE
#> 199 1.138379 FALSE
#> 200 1.138379 FALSE