-
Notifications
You must be signed in to change notification settings - Fork 0
/
AKIVA.SIF
708 lines (673 loc) · 17.6 KB
/
AKIVA.SIF
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
***************************
* SET UP THE INITIAL DATA *
***************************
NAME AKIVA
* Problem:
* ********
* Find the set of elemental and structural coefficients of a hierarchical
* logit model that maximizes the likelihood of a particular sample of
* observations.
* Source: a simple example of binary logit
* Ben-Akiva and Lerman, "Discrete Choice Analysis", MIT Press, 1985.
*
* SIF input: automatically produced by HieLoW
* Hierarchical Logit for Windows, written by Michel Bierlaire
* Mon Jan 30 12:12:18 1995
* classification OUR2-AN-2-0
* Description of the model : (see HieLoW's User's Guide for details)
* *************************
* List of utility functions
* -------------------------
* 2 Transit
* beta * Transit
* beta * Transit
* 1 Auto
* beta * Auto + cte-auto * un
* beta * Auto + cte-auto * 1
*
* Signification of the variables :
* BET1 beta
* BET2 cte-auto
* Reference : Bierlaire M.,
* "HieLoW: estimation of hierarchical logit models"
* Technical report 94/23, Transportation Research Group,
* Dpt of Mathematics, FUNDP - University of Namur, 1994.
* Report available via anonymous ftp at math.fundp.ac.be as /pub/reports/hielow.ps
* Hielow Demo available at math.fundp.ac.be in /pub/hielow
* HieLoW has been developed thanks to the AGIR program of the
* Region Wallonne, Belgium. HieLoW is copyrighted to Stratec S.A.
VARIABLES
* BET(i) --> elemental coefficients
* THE(i) --> structural coefficients
BET1
BET2
GROUPS
XN LIKE
BOUNDS
FR AKIVA 'DEFAULT'
START POINT
XV AKIVA BET1 0.0D0
XV AKIVA BET2 0.0D0
ELEMENT TYPE
EV LIKE B1
EV LIKE B2
ELEMENT USES
T ELIKE LIKE
ZV ELIKE B1 BET1
ZV ELIKE B2 BET2
GROUP USES
XE LIKE ELIKE -1.0
OBJECT BOUND
*LO SOLUTION 6.1660422124
ENDATA
***********************
* SET UP THE FUNCTION *
* AND RANGE ROUTINES *
***********************
ELEMENTS AKIVA
TEMPORARIES
R F
F F
R G
F G
R H
F H
INDIVIDUALS
T LIKE
F F(B1,B2)
G B1 G(B1,B2,1)
G B2 G(B1,B2,2)
H B1 B1 H(B1,B2,1,1)
H B1 B2 H(B1,B2,1,2)
H B2 B2 H(B1,B2,2,2)
ENDATA
C
DOUBLE PRECISION FUNCTION F(B1,B2)
C
INTEGER NCOEF, NC
LOGICAL COMPG,COMPH
C
PARAMETER (NCOEF = 2)
C
DOUBLE PRECISION B1,B2
C
DOUBLE PRECISION BETA(NCOEF)
DOUBLE PRECISION LIKE
DOUBLE PRECISION GR(NCOEF)
DOUBLE PRECISION HESS(NCOEF,NCOEF)
SAVE COMPG,COMPH,BETA,LIKE,GR,HESS
C
BETA(1) = B1
BETA(2) = B2
C
NC = NCOEF
CALL HIELOW(.FALSE.,.FALSE.,BETA,COMPG,COMPH,LIKE,GR,HESS,NC)
COMPG = .TRUE.
COMPH = .TRUE.
F = LIKE
RETURN
END
C===============================================
DOUBLE PRECISION FUNCTION G(B1,B2,I)
C
INTEGER NCOEF
LOGICAL COMPG,COMPH
C
DOUBLE PRECISION B1,B2
INTEGER I,NC
C
PARAMETER (NCOEF = 2)
C
DOUBLE PRECISION BETA(NCOEF)
DOUBLE PRECISION LIKE
DOUBLE PRECISION GR(NCOEF)
DOUBLE PRECISION HESS(NCOEF,NCOEF)
C
C DATA COMPG/.TRUE./
SAVE COMPH,LIKE,HESS
COMMON /SHARE/BETA,GR,COMPG
COMPG = .TRUE.
C
C Check if the gradient has been evaluated at the same point
C
IF (.NOT. COMPG) THEN
IF (BETA(1) .NE. B1) GOTO 5000
IF (BETA(2) .NE. B2) GOTO 5000
G = GR(I)
RETURN
ENDIF
5000 CONTINUE
BETA(1) = B1
BETA(2) = B2
NC = NCOEF
CALL HIELOW(.TRUE.,.FALSE.,BETA,COMPG,COMPH,LIKE,GR,HESS,NC)
COMPG = .FALSE.
COMPH = .TRUE.
G = GR(I)
RETURN
END
C===============================================
DOUBLE PRECISION FUNCTION H(B1,B2,I,J)
C
INTEGER NCOEF
LOGICAL COMPG,COMPH
C
DOUBLE PRECISION B1,B2
INTEGER I,J,NC
C
PARAMETER (NCOEF = 2)
C
DOUBLE PRECISION BETA(NCOEF)
DOUBLE PRECISION LIKE
DOUBLE PRECISION GR(NCOEF)
DOUBLE PRECISION HESS(NCOEF,NCOEF)
C
C DATA COMPH/.TRUE./
SAVE COMPH,LIKE,HESS
C
COMMON /SHARE/BETA,GR,COMPG
COMPH = .TRUE.
C
C Check if the hessian has been evaluated at the same point
C
IF (.NOT. COMPH) THEN
IF (BETA(1) .NE. B1) GOTO 5000
IF (BETA(2) .NE. B2) GOTO 5000
IF (J .GE. I) THEN
H = HESS(I,J)
ELSE
H = HESS(J,I)
ENDIF
RETURN
ENDIF
5000 CONTINUE
BETA(1) = B1
BETA(2) = B2
NC = NCOEF
CALL HIELOW(.FALSE.,.TRUE.,BETA,COMPG,COMPH,LIKE,GR,HESS,NC)
COMPG = .TRUE.
COMPH = .FALSE.
IF (J .GE. I) THEN
H = HESS(I,J)
ELSE
H = HESS(J,I)
ENDIF
RETURN
END
C=======================================================
C Copyright (c) FUNDP - Namur 1995
C
C Subroutine HieLoW
C
C Author : Michel Bierlaire
C Creation : January 1995
C
SUBROUTINE HIELOW(CGRAD,CHESS,BETA,COMPG,COMPH,LIKE,GR,HESS,NC)
C
C Computation of the loglikelihood function of a hierarchical logit model
C
C Data structures
C
IMPLICIT NONE
INTRINSIC EXP,LOG
C
INTEGER NC
LOGICAL CGRAD,CHESS
LOGICAL COMPG,COMPH
DOUBLE PRECISION BETA(NC)
DOUBLE PRECISION LIKE
DOUBLE PRECISION GR(NC)
DOUBLE PRECISION HESS(NC,NC)
C
C INTEGER NNOEUD, NMAXUT, NDATA, NOBS, NCARAC, NCOEF, NELEM, NTOT
INTEGER NNOEUD, NMAXUT, NOBS, NCARAC, NCOEF, NTOT
C
DOUBLE PRECISION ZERO,GRAND,LOGGRA
C
PARAMETER (NNOEUD = 3,
+ NMAXUT = 2,
+ NOBS = 21,
+ NCARAC = 3,
+ NCOEF = 2,
+ NTOT = NOBS*NNOEUD)
C
PARAMETER (ZERO = 0.0D0 , GRAND = 1.0D308 , LOGGRA = 308.0D0)
C PARAMETER (ZERO = 0.0 , GRAND = 1.0D308)
C
INTEGER ARBRE(NNOEUD)
INTEGER UTCOEF(NNOEUD,NMAXUT)
INTEGER UTCARA(NNOEUD,NMAXUT)
INTEGER UTLENG(NNOEUD)
INTEGER THETA(NNOEUD)
INTEGER CHOSEN(NOBS)
LOGICAL DISP(NOBS,NNOEUD)
DOUBLE PRECISION CARACT(NOBS,NCARAC)
DOUBLE PRECISION UTIL(NNOEUD),SOMEXP(NNOEUD),LOGAR(NNOEUD)
DOUBLE PRECISION EXPUTI(NNOEUD),LOGIT(NNOEUD)
DOUBLE PRECISION DERIV(NNOEUD,NCOEF),DERLOG(NNOEUD,NCOEF)
DOUBLE PRECISION L1IJ(NNOEUD),L2IJ(NNOEUD),VIJ(NNOEUD)
C DOUBLE PRECISION F,G(NCOEF)
SAVE ARBRE,UTCOEF,UTCARA,UTLENG,THETA,CHOSEN,DISP,CARACT,UTIL
SAVE SOMEXP,LOGAR,EXPUTI,LOGIT,DERIV,DERLOG,L1IJ,L2IJ,VIJ
INTEGER I,J,OBS,NOEUD
C LOGICAL ERREUR
C
C Tree structure description
C ARBRE(I) = J <==> Node J is the father of node I
C ARBRE(I) = -1 <==> I is the root of the tree
C Assertion : ARBRE(I) = J ==> J > I
C
DATA ARBRE(1) / 3/
DATA ARBRE(2) / 3/
DATA ARBRE(3) /-1/
C
C Utility function
C
C
C Node 1 : Transit
C
DATA UTCOEF(1,1) /1/
DATA UTCARA(1,1) /2/
DATA UTLENG(1) /1/
C
C Node 2 : Auto
C
DATA UTCOEF(2,1) /1/
DATA UTCARA(2,1) /1/
DATA UTCOEF(2,2) /2/
DATA UTCARA(2,2) /3/
DATA UTLENG(2) /2/
C
C Node 3 : RACINE
C
DATA UTLENG(3) /0/
C
C Structural coefficients
C
C THETA(I) > 0 ==> I structural node
C THETA(I) = -1 ==> I elemental node
C THETA(I) = -2 ==> I root
C
DATA THETA(1) /-1/
DATA THETA(2) /-1/
DATA THETA(3) /-2/
C
C Observations
C
DATA DISP/NTOT*.TRUE./
C
C Observation 1
C
DATA CHOSEN(1)/1/
DATA CARACT(1,1) /52.9D0/
DATA CARACT(1,2) /4.4D0/
DATA CARACT(1,3) /1.0D0/
C
C Observation 2
C
DATA CHOSEN(2)/1/
DATA CARACT(2,1) /4.1D0/
DATA CARACT(2,2) /28.5D0/
DATA CARACT(2,3) /1.0D0/
C
C Observation 3
C
DATA CHOSEN(3)/2/
DATA CARACT(3,1) /4.1D0/
DATA CARACT(3,2) /86.9D0/
DATA CARACT(3,3) /1.0D0/
C
C Observation 4
C
DATA CHOSEN(4)/1/
DATA CARACT(4,1) /56.2D0/
DATA CARACT(4,2) /31.6D0/
DATA CARACT(4,3) /1.0D0/
C
C Observation 5
C
DATA CHOSEN(5)/1/
DATA CARACT(5,1) /51.8D0/
DATA CARACT(5,2) /20.2D0/
DATA CARACT(5,3) /1.0D0/
C
C Observation 6
C
DATA CHOSEN(6)/2/
DATA CARACT(6,1) /0.2D0/
DATA CARACT(6,2) /91.2D0/
DATA CARACT(6,3) /1.0D0/
C
C Observation 7
C
DATA CHOSEN(7)/2/
DATA CARACT(7,1) /27.6D0/
DATA CARACT(7,2) /79.7D0/
DATA CARACT(7,3) /1.0D0/
C
C Observation 8
C
DATA CHOSEN(8)/1/
DATA CARACT(8,1) /89.9D0/
DATA CARACT(8,2) /2.2D0/
DATA CARACT(8,3) /1.0D0/
C
C Observation 9
C
DATA CHOSEN(9)/1/
DATA CARACT(9,1) /41.5D0/
DATA CARACT(9,2) /24.5D0/
DATA CARACT(9,3) /1.0D0/
C
C Observation 10
C
DATA CHOSEN(10)/1/
DATA CARACT(10,1) /95D0/
DATA CARACT(10,2) /43.5D0/
DATA CARACT(10,3) /1.0D0/
C
C Observation 11
C
DATA CHOSEN(11)/1/
DATA CARACT(11,1) /99.1D0/
DATA CARACT(11,2) /8.4D0/
DATA CARACT(11,3) /1.0D0/
C
C Observation 12
C
DATA CHOSEN(12)/2/
DATA CARACT(12,1) /18.5D0/
DATA CARACT(12,2) /84.0D0/
DATA CARACT(12,3) /1.0D0/
C
C Observation 13
C
DATA CHOSEN(13)/2/
DATA CARACT(13,1) /82.0D0/
DATA CARACT(13,2) /38.0D0/
DATA CARACT(13,3) /1.0D0/
C
C Observation 14
C
DATA CHOSEN(14)/1/
DATA CARACT(14,1) /8.6D0/
DATA CARACT(14,2) /1.6D0/
DATA CARACT(14,3) /1.0D0/
C
C Observation 15
C
DATA CHOSEN(15)/2/
DATA CARACT(15,1) /22.5D0/
DATA CARACT(15,2) /74.1D0/
DATA CARACT(15,3) /1.0D0/
C
C Observation 16
C
DATA CHOSEN(16)/2/
DATA CARACT(16,1) /51.4D0/
DATA CARACT(16,2) /83.8D0/
DATA CARACT(16,3) /1.0D0/
C
C Observation 17
C
DATA CHOSEN(17)/1/
DATA CARACT(17,1) /81D0/
DATA CARACT(17,2) /19.2D0/
DATA CARACT(17,3) /1.0D0/
C
C Observation 18
C
DATA CHOSEN(18)/2/
DATA CARACT(18,1) /51D0/
DATA CARACT(18,2) /85D0/
DATA CARACT(18,3) /1.0D0/
C
C Observation 19
C
DATA CHOSEN(19)/2/
DATA CARACT(19,1) /62.2D0/
DATA CARACT(19,2) /90.1D0/
DATA CARACT(19,3) /1.0D0/
C
C Observation 20
C
DATA CHOSEN(20)/1/
DATA CARACT(20,1) /95.1D0/
DATA CARACT(20,2) /22.2D0/
DATA CARACT(20,3) /1.0D0/
C
C Observation 21
C
DATA CHOSEN(21)/2/
DATA CARACT(21,1) /41.6D0/
DATA CARACT(21,2) /91.5D0/
DATA CARACT(21,3) /1.0D0/
C
C Function computation
C
C Initialize
C
C LOGGRA = LOG(GRAND)
LIKE = ZERO
IF (CGRAD .OR. CHESS) THEN
DO 900 I = 1, NCOEF
GR(I) = ZERO
IF (CHESS) THEN
DO 910 J = I, NCOEF
HESS(I,J) = ZERO
910 CONTINUE
ENDIF
900 CONTINUE
ENDIF
C
C Loop on the observations
C
DO 1000 OBS=1,NOBS
DO 1015 NOEUD = 1,NNOEUD
UTIL(NOEUD) = ZERO
SOMEXP(NOEUD) = ZERO
1015 CONTINUE
DO 1010 NOEUD = 1,NNOEUD
IF (DISP(OBS,NOEUD)) THEN
C
C Utility function
C
IF (ARBRE(NOEUD) .NE. -1) THEN
UTIL(NOEUD) = ZERO
DO 1020 I=1,UTLENG(NOEUD)
UTIL(NOEUD)=UTIL(NOEUD)+
+ BETA(UTCOEF(NOEUD,I))*
+ CARACT(OBS,UTCARA(NOEUD,I))
1020 CONTINUE
C
C Check overflow
C
IF (UTIL(NOEUD) .GE. LOGGRA) THEN
UTIL(NOEUD) = LOGGRA
ENDIF
ENDIF
C
C Inclusive value - expected maximum utility
C
IF (THETA(NOEUD) .NE. -1) THEN
LOGAR(NOEUD) = LOG(SOMEXP(NOEUD))
IF (THETA(NOEUD) .GT. 0) THEN
UTIL(NOEUD) = UTIL(NOEUD) +
+ BETA(THETA(NOEUD)) *
+ LOGAR(NOEUD)
ENDIF
ELSE
SOMEXP(NOEUD) = ZERO
ENDIF
C
C Exp(utility)
C
IF (UTIL(NOEUD) .GE. LOGGRA) THEN
EXPUTI(NOEUD) = GRAND
ELSE
EXPUTI(NOEUD) = EXP(UTIL(NOEUD))
ENDIF
C
C Accumulate in the father node and check overflow
C
IF (ARBRE(NOEUD) .NE. -1) THEN
IF (SOMEXP(ARBRE(NOEUD)) .NE. GRAND) THEN
IF (EXPUTI(NOEUD) .EQ. GRAND) THEN
SOMEXP(ARBRE(NOEUD)) = GRAND
ELSE
SOMEXP(ARBRE(NOEUD)) = SOMEXP(ARBRE(NOEUD)) +
+ EXPUTI(NOEUD)
IF (SOMEXP(ARBRE(NOEUD)) .GT. GRAND) THEN
SOMEXP(ARBRE(NOEUD)) = GRAND
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
1010 CONTINUE
C
C Compute the function
C
NOEUD = CHOSEN(OBS)
1050 IF (ARBRE(NOEUD) .NE. -1) THEN
LIKE = LIKE + UTIL(NOEUD) - LOGAR(ARBRE(NOEUD))
NOEUD = ARBRE(NOEUD)
GOTO 1050
ENDIF
C
C Compute derivatives, if required
C
IF (CGRAD .OR. CHESS) THEN
C
C Gradient
C
C Initialize
C
DO 1100 NOEUD = 1,NNOEUD
DO 1150 I=1,NCOEF
DERIV(NOEUD,I) = ZERO
DERLOG(NOEUD,I) = ZERO
1150 CONTINUE
C
C Derivatives of the elemental utility
C
IF (ARBRE(NOEUD) .NE. -1) THEN
DO 1170 I=1,UTLENG(NOEUD)
DERIV(NOEUD,UTCOEF(NOEUD,I)) =
+ CARACT(OBS,UTCARA(NOEUD,I))
1170 CONTINUE
ENDIF
1100 CONTINUE
C
C Derivatives of the inclusive value
C
DO 1200 NOEUD = 1,NNOEUD-1
IF (DISP(OBS,NOEUD)) THEN
C
C Equation (6) of Daly
C
LOGIT(NOEUD) = EXPUTI(NOEUD) / SOMEXP(ARBRE(NOEUD))
IF (THETA(NOEUD) .GT. 0) THEN
C
C Derivatives wrt structural coefficient
C
DERIV(NOEUD,THETA(NOEUD)) =
+ DERIV(NOEUD,THETA(NOEUD)) + LOGAR(NOEUD)
DO 1250 I = 1,NCOEF
C
C Equation (23)
C
IF (I .NE. THETA(NOEUD)) THEN
DERIV(NOEUD,I) = DERIV(NOEUD,I) +
+ BETA(THETA(NOEUD)) * DERLOG(NOEUD,I)
ENDIF
C
C Equation (21)
C
DERLOG(ARBRE(NOEUD),I) =
+ DERLOG(ARBRE(NOEUD),I) +
+ LOGIT(NOEUD) *
+ DERIV(NOEUD,I)
1250 CONTINUE
ELSE
C
C Elemental node
C
DO 1300 I=1,NCOEF
DERLOG(ARBRE(NOEUD),I) =
+ DERLOG(ARBRE(NOEUD),I) +
+ LOGIT(NOEUD) *
+ DERIV(NOEUD,I)
1300 CONTINUE
ENDIF
ENDIF
1200 CONTINUE
C
C Derivatives
C
IF (CGRAD) THEN
NOEUD = CHOSEN(OBS)
1350 IF (ARBRE(NOEUD) .NE. -1) THEN
DO 1400 I=1,NCOEF
GR(I) = GR(I) +
+ DERIV(NOEUD,I) -
+ DERLOG(ARBRE(NOEUD),I)
1400 CONTINUE
NOEUD = ARBRE(NOEUD)
GOTO 1350
ENDIF
ENDIF
ENDIF
C
C Compute Hessian matrix, if required
C
IF (CHESS) THEN
DO 2000 I=1,NCOEF
DO 2010 J=I,NCOEF
C
C Initialize
C
DO 2020 NOEUD=1,NNOEUD
L1IJ(NOEUD) = ZERO
L2IJ(NOEUD) = ZERO
2020 CONTINUE
DO 2030 NOEUD=1,NNOEUD-1
IF (DISP(OBS,NOEUD)) THEN
IF (I .EQ. THETA(NOEUD)) THEN
VIJ(NOEUD) = DERLOG(NOEUD,J)
ELSE IF (J .EQ. THETA(NOEUD)) THEN
VIJ(NOEUD) = DERLOG(NOEUD,I)
ELSE IF (THETA(NOEUD) .NE. -1) THEN
VIJ(NOEUD) = BETA(THETA(NOEUD)) *
+ (L1IJ(NOEUD)+L2IJ(NOEUD) -
+ DERLOG(NOEUD,I)*DERLOG(NOEUD,J))
ELSE
VIJ(NOEUD) = ZERO
ENDIF
L1IJ(ARBRE(NOEUD)) = L1IJ(ARBRE(NOEUD)) +
+ LOGIT(NOEUD) *
+ DERIV(NOEUD,I) *
+ DERIV(NOEUD,J)
L2IJ(ARBRE(NOEUD)) = L2IJ(ARBRE(NOEUD)) +
+ LOGIT(NOEUD) * VIJ(NOEUD)
ENDIF
2030 CONTINUE
C
C Hessian
C
NOEUD = CHOSEN(OBS)
3350 IF (ARBRE(NOEUD) .NE. -1) THEN
HESS(I,J) = HESS(I,J) +
+ VIJ(NOEUD) -
+ L2IJ(ARBRE(NOEUD)) +
+ DERLOG(ARBRE(NOEUD),I) *
+ DERLOG(ARBRE(NOEUD),J) -
+ L1IJ(ARBRE(NOEUD))
NOEUD = ARBRE(NOEUD)
GOTO 3350
ENDIF
2010 CONTINUE
2000 CONTINUE
ENDIF
1000 CONTINUE
END