Description Usage Arguments Value Examples
Returns the values on the diagonal of the hat matrix, which is the matrix that transforms the response vector (minus any offset) into the fitted values (minus any offset). Note that this method should only be used for linear mixed models. It is not clear if the hat matrix concept even makes sense for generalized linear mixed models.
1 2 |
model |
An object of class |
fullHatMatrix |
Return full hat matrix (not just diagonal values)? |
... |
Not currently used |
The diagonal elements of the hat matrix.
1 2 | m <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
hatvalues(m)
|
Loading required package: Matrix
1 2 3 4 5 6 7
0.22930300 0.16972925 0.12682322 0.10058490 0.09101429 0.09811140 0.12187623
8 9 10 11 12 13 14
0.16230877 0.21940902 0.29317698 0.22930300 0.16972925 0.12682322 0.10058490
15 16 17 18 19 20 21
0.09101429 0.09811140 0.12187623 0.16230877 0.21940902 0.29317698 0.22930300
22 23 24 25 26 27 28
0.16972925 0.12682322 0.10058490 0.09101429 0.09811140 0.12187623 0.16230877
29 30 31 32 33 34 35
0.21940902 0.29317698 0.22930300 0.16972925 0.12682322 0.10058490 0.09101429
36 37 38 39 40 41 42
0.09811140 0.12187623 0.16230877 0.21940902 0.29317698 0.22930300 0.16972925
43 44 45 46 47 48 49
0.12682322 0.10058490 0.09101429 0.09811140 0.12187623 0.16230877 0.21940902
50 51 52 53 54 55 56
0.29317698 0.22930300 0.16972925 0.12682322 0.10058490 0.09101429 0.09811140
57 58 59 60 61 62 63
0.12187623 0.16230877 0.21940902 0.29317698 0.22930300 0.16972925 0.12682322
64 65 66 67 68 69 70
0.10058490 0.09101429 0.09811140 0.12187623 0.16230877 0.21940902 0.29317698
71 72 73 74 75 76 77
0.22930300 0.16972925 0.12682322 0.10058490 0.09101429 0.09811140 0.12187623
78 79 80 81 82 83 84
0.16230877 0.21940902 0.29317698 0.22930300 0.16972925 0.12682322 0.10058490
85 86 87 88 89 90 91
0.09101429 0.09811140 0.12187623 0.16230877 0.21940902 0.29317698 0.22930300
92 93 94 95 96 97 98
0.16972925 0.12682322 0.10058490 0.09101429 0.09811140 0.12187623 0.16230877
99 100 101 102 103 104 105
0.21940902 0.29317698 0.22930300 0.16972925 0.12682322 0.10058490 0.09101429
106 107 108 109 110 111 112
0.09811140 0.12187623 0.16230877 0.21940902 0.29317698 0.22930300 0.16972925
113 114 115 116 117 118 119
0.12682322 0.10058490 0.09101429 0.09811140 0.12187623 0.16230877 0.21940902
120 121 122 123 124 125 126
0.29317698 0.22930300 0.16972925 0.12682322 0.10058490 0.09101429 0.09811140
127 128 129 130 131 132 133
0.12187623 0.16230877 0.21940902 0.29317698 0.22930300 0.16972925 0.12682322
134 135 136 137 138 139 140
0.10058490 0.09101429 0.09811140 0.12187623 0.16230877 0.21940902 0.29317698
141 142 143 144 145 146 147
0.22930300 0.16972925 0.12682322 0.10058490 0.09101429 0.09811140 0.12187623
148 149 150 151 152 153 154
0.16230877 0.21940902 0.29317698 0.22930300 0.16972925 0.12682322 0.10058490
155 156 157 158 159 160 161
0.09101429 0.09811140 0.12187623 0.16230877 0.21940902 0.29317698 0.22930300
162 163 164 165 166 167 168
0.16972925 0.12682322 0.10058490 0.09101429 0.09811140 0.12187623 0.16230877
169 170 171 172 173 174 175
0.21940902 0.29317698 0.22930300 0.16972925 0.12682322 0.10058490 0.09101429
176 177 178 179 180
0.09811140 0.12187623 0.16230877 0.21940902 0.29317698
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.