s-news
[Top] [All Lists]

Standard error for (G)AM model

To: s-news@lists.biostat.wustl.edu
Subject: Standard error for (G)AM model
From: Eva Cantoni <Eva.Cantoni@metri.unige.ch>
Date: Fri, 24 Oct 2003 09:33:30 +0200
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.3.1) Gecko/20030508
Dear Splus users,


I do have an example of a gaussian additive model where the standard error obtained with preplot.gam() are not the same as those obtained by predict.gam() (cf. below). Has someone else observed this behavior? (which seems strange to me, because I understood that preplot.gam() was simply using predict.gam()).

I'm using Version 6.1.2 Release 2 for Sun SPARC, SunOS 5.6 : 2002.

Thank you in advance for any insight.

Eva Cantoni

--

Dr Eva Cantoni              phone  : (+41) 22 379 8240
Econométrie - Univ. Genève  fax    : (+41) 22 379 8299
40, Bd du Pont d'Arve       e-mail : Eva.Cantoni@metri.unige.ch
CH-1211 Genève 4            http://www.unige.ch/ses/metri/cantoni


---------------------------------------------------------------------------------------------------------------

xx1 <- sort(rnorm(50))
yy1 <- 2+5*xx12+2*rnorm(50)

gamfit1 <- gam(yy1~s(xx1,spar=0.005/(max(xx1)-min(xx1))3))

(preplot.gam(gamfit1)[[1]])$se.y
      1        2        3        4        5        6        7        8
1.491961 1.316211 1.140203 1.048695 1.049141 0.951788 0.865604 0.843049

9 10 11 12 13 14 15 16 0.8321379 0.8358734 0.8541559 0.9144309 0.9891901 1.121024 0.9510405 0.878901

      17        18        19        20       21        22        23
0.8619451 0.8121189 0.7051739 0.7020254 0.696297 0.6854458 0.7156899

      24        25        26        27        28       29        30
0.7215519 0.8246976 0.8737922 0.9615788 0.8114632 0.688451 0.6600137

31 32 33 34 35 36 37 38 0.6147368 0.6138927 0.6145545 0.618617 0.631937 0.7366704 0.7574085 0.751308

39 40 41 42 43 44 45 46 0.7301003 0.7299721 0.7335928 0.8317819 0.8597737 0.9948622 1.066162 1.048952

     47       48       49       50
1.048959 1.038358 1.046152 1.566741

predict.gam(gamfit1,se.fit=T)$se.fit
     1        2       3        4        5         6         7         8
1.51961 1.347471 1.17615 1.087671 1.088102 0.9945692 0.9124351 0.8910663

9 10 11 12 13 14 15 16 0.8807503 0.8842804 0.9015819 0.9588803 1.03042 1.157568 0.9938539 0.9250592

      17        18        19        20        21        22        23
0.9089647 0.8618612 0.7619303 0.7590173 0.7537221 0.7437093 0.7716732

      24       25        26       27        28      29        30        31
0.7771131 0.873724 0.9202067 1.003943 0.8612433 0.74648 0.7203371 0.6790942

      32        33        34        35        36        37        38
0.6783302 0.6789292 0.6826086 0.6947028 0.7911705 0.8105154 0.8048175

      39        40        41       42       43       44       45       46
0.7850567 0.7849375 0.7883057 0.880414 0.906906 1.035866 1.104522 1.087919

     47       48      49       50
1.087925 1.077708 1.08522 1.593093



<Prev in Thread] Current Thread [Next in Thread>
  • Standard error for (G)AM model, Eva Cantoni <=