Poisson residuals

# Poisson residuals

```Hi,
predicted values in a .yht file.  However, how are the residuals
calculated?

For example, I tried a small example of a fixed effects model with a
poisson model with a log link.  Attached are the various files.  For
example, observation one has parity 1 with nlb=1.  The predicted value
is then 0.3185 or 1.375, the latter value is in the .yht file.  Asreml
reports the the residual as -0.2378 and it is not clear how this is
computed.  Is this the residual directly from Schall's approach?

Bruce```
``` SLOPES FOR LOG(ABS(RES)) on LOG(PV) for Section   1
0.45

*
*
*
*
* *
* *
* *  *  *
* *  *  * *
* *  *  * *    **

Min Mean Max-0.45455     0.92519E-16  1.2857     omitting     0 zeros

```
```  ASREML [21 Mar 2000]  Poisson model
Wed Apr 12 08:45:06 2000   8.00 Mbyte  Unix   fig
*****************************************************
* ASREML 2000  Residuals now written to .yht file,  *
* convergence monitoring of parameters to .res file *
*********************************************** ARG *
QUALIFIERS: !NODISPLAY
Reading fig.dat  FREE FORMAT skipping  0  lines
Univariate analysis of nlb
Using       24 records [of      24 read from      24 lines of fig.dat             ]
Model term      Size Type    COL   Minimum    Mean      Maximum   #zero #miss
1 animal          1 Covariat  1  1.000      12.50      24.00         0     0
2 parity          3 Factor    2      1     1.8333          3         0     0
3 sire            4 Factor    3      1     2.6667          4         0     0
4 nlb             1 Variate   4  1.000      1.667      4.000         0     0
5 mu              1 Constant Term
Forming  4  equations:  4  dense
Initial updates will be shrunk by factor    0.010
Distribution and link: Poisson; Log   Mu=exp(XB) V=Mu
NOTICE:     1 (more) singularities,
LogL= 2.76751     S2=  1.0000         21 df    1.000
LogL= 2.65014     S2=  1.0000         21 df    1.000
LogL= 2.65014     S2=  1.0000         21 df    1.000
LogL= 2.65014     S2=  1.0000         21 df    1.000
Final parameter values                        1.0000
Deviance from GLM fit                     -10.49
Variance heterogenity factor [Deviance/DF]     0.50

Source                Model  terms     Gamma     Component    Comp/SE   % C
Variance                 24     21   1.00000       1.00000       0.00   0 F

Analysis of Variance       DF     F-incr      F-adj  StndErrDiff
5 mu                      1      10.77       1.12
2 parity                  2       0.31       0.31  0.4314

Solution       Standard Error    T-value     T-prev
2 parity
2   0.287682       0.369274          0.78
3   0.241162       0.483494          0.50     -0.11
5 mu
4   0.318454       0.301511          1.06
SLOPES FOR LOG(ABS(RES)) on LOG(PV) for Section   1
0.45
Finished: Wed Apr 12 08:45:06 2000   LogL Converged
```

fig.dat

fig.as

```  parity                          1           0.000       0.000
parity                          2          0.2877      0.3693
parity                          3          0.2412      0.4835
mu                              1          0.3185      0.3015
```
```  Record        Yhat    Residual         Hat
1      1.3750     -0.2378      0.9091E-01
2      1.3750     -0.2378      0.9091E-01
3      1.3750      0.3527      0.9091E-01
4      1.3750      0.3527      0.9091E-01
5      1.8333      0.8577E-01  0.4545E-01
6      1.8333      0.8577E-01  0.4545E-01
7      1.8333      0.5575      0.4545E-01
8      1.8333     -0.4767      0.4545E-01
9      1.8333      0.9767      0.4545E-01
10      1.3750     -0.2378      0.9091E-01
11      1.3750     -0.2378      0.9091E-01
12      1.3750     -0.2378      0.9091E-01
13      1.8333     -0.4767      0.4545E-01
14      1.8333     -0.4767      0.4545E-01
15      1.8333      0.5575      0.4545E-01
16      1.7500       1.028      0.1429
17      1.7500     -0.4363      0.1429
18      1.7500     -0.4363      0.1429
19      1.3750      0.3527      0.9091E-01
20      1.8333     -0.4767      0.4545E-01
21      1.8333     -0.4767      0.4545E-01
22      1.8333      0.8577E-01  0.4545E-01
23      1.8333     -0.4767      0.4545E-01
24      1.7500     -0.4363      0.1429
```