s-news
[Top] [All Lists]

[S] Fw: difference between predict

To: "s-news" <s-news@wubios.wustl.edu>
Subject: [S] Fw: difference between predict
From: "alain Le Tertre" <alain@worldnet.fr>
Date: Tue, 25 Aug 1998 10:34:05 +0200
Sender: owner-s-news@wubios.wustl.edu
I have received some e-mail from people who need the answer, but no answer,
even from s-help.
So, i'll resend my question.
-----Original Message-----
From: alain Le Tertre <alain@worldnet.fr>
To: s-news <s-news@wubios.wustl.edu>
Date: mercredi 29 juillet 1998 10:24
Subject: difference between predict


>In S-plus 4 guide to statistics p 221, "Specifying type="terms" allows you
>to compute the component of the prediction for each term separately.
Summing
>the columns of the matrix and adding the constant (intercept) term is
>equivalent to specifying type="link"".
>So try :
>zzz_gam(Kyphosis ~ poly(Age, 2) + s(Start), data = kyphosis)
>cbind(predict(zzz,type="link"),zzz$coef[1]+rowSums(predict(zzz,type="terms"
)
>))
>give you :
>1 1.6582944 2.059893
> 2 1.1161389 1.517737
> 3 1.6671144 2.068713
> 4 1.1938420 1.595441
> 5 0.8517588 1.253357
> 6 0.8213737 1.222972
> 7 1.0687632 1.470362
> 8 1.0036325 1.405231
> 9 1.1289169 1.530515
>10 1.2703754 1.671974
>11 1.1993687 1.600967
>[snip]
>Did i misunderstand something?
>
>I'm using S-plus 4.0 release 3 on w95.
>
>
>   O__  ---- Alain Le Tertre
>  c/ /'_ --- Réseau National de Santé Publique (RNSP)
>(*) \(*) --  12 rue du val d'Osne
>~~~~~~~~~~ - 94415 Saint Maurice cedex    FRANCE
>Voice: 33 1 41 79 67 50  Fax: 33 1 41 79 67 68
>email: alain@worldnet.fr
>

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>