s-news
[Top] [All Lists]

RE: [S] Studentized residuals from nls

To: "Laffont, Jean-Louis" <Laffont@phibred.com>, "'s-news@wubios.wustl.edu'" <s-news@wubios.wustl.edu>
Subject: RE: [S] Studentized residuals from nls
From: "Wouters, Luc - 2744 [JanBe]" <lwouters@janbe.jnj.com>
Date: Wed, 22 Sep 1999 10:17:06 +0200
Sender: owner-s-news@wubios.wustl.edu
Dear Jean-Louis,

The following function should do the job:


"StudRes.nls"<-function(grad, nls.fit)
{
# Studentized residuals for nls 
# grad: derivative of model as obtained from function deriv
# nls.fit: fit obtained from nls
        v <- attributes(grad)$gradient
        h <- diag(v %*% solve(crossprod(v)) %*% t(v))
        s <- summary(nls.fit)$sigma
        r <- nls.fit$residuals/(s * sqrt(1 - h))
        r
}

_____________________________________________________________

Luc Wouters                  
Life Sciences Dept. 2744
Janssen Research Foundation     Tel:    +32-(0) 14-60.27.44
Turnhoutseweg 30        Fax:    +32-(0) 14-60.57.88     
B2340 Beerse, Belgium   E-mail: lwouters@janbe.jnj.com
_____________________________________________________________


-----Original Message-----
From: Laffont, Jean-Louis [mailto:Laffont@phibred.com]
Sent: Tuesday, 21 September 1999 21:47
To: 's-news@wubios.wustl.edu'
Cc: Laffont, Jean-Louis
Subject: [S] Studentized residuals from nls



Dear S-Plus users,

Does anybody have written a function to compute studentized residuals from a
non linear model (using nls)?

Thanks,

Jean-Louis (laffont@phibred.com)
Pioneer Genetique
Aussonne, France
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------
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>