Skip to content
Back to formatted view

Raw Message

Message-ID: <CACk-te37N6ZHty4+dnLRYOXY=VxTC_Ps8iRi6NqhkOeQnPQMdw@mail.gmail.com>
Date: 2013-01-31T20:26:19Z
From: Bert Gunter
Subject: LogLik of nls
In-Reply-To: <CAF7StsYtuHtvn_TXQAa6svi-4qP7LgtHnEOY08SF4hrJiNCzuA@mail.gmail.com>

methods(logLik)   ## for S3 methods
stats:::logLik.nls
### and look at the code!

-- Bert

On Thu, Jan 31, 2013 at 12:06 PM, Diviya Smith <diviya.smith at gmail.com> wrote:
> Hello there,
>
> Can anyone point me to the code for logLik of an nls object? I found the
> code for logLik of an lm but could not find exactly what function is used
> for calculating the logLik of nls function?
>
> I am using the nls to fit the following model to data -
> Model 1: y ~ Ae^(-mx) + Be^(-nx) +c
>
> and want to understand what is the likelihood function used by nls.
> Presumably it is using -
> N(Ae^(-mx) + Be^(-nx) +c, var = residuals from nls)
>
> Thank  you in advance,
>
> Diviya
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm