Displaying 1 result from an estimated 1 matches for "fm3dnase2".
Did you mean:
fm3dnase1
2012 Jan 20
1
nobs() and logLik()
...not. Admittedly, the help page of nobs() states that:
For 'lm' and 'glm' fits, observations with zero weight are not
included.
i.e. does not comment on what nls does.
But I wonder whether the following behaviour is desirable:
R> DNase1 <- subset(DNase, Run == 1)
R> fm3DNase2 <- nls(density ~ Asym/(1 + exp((xmid - log(conc))/scal)),
+ data = DNase1, weights=c(0,rep(1,14),0),
+ start = list(Asym = 3, xmid = 0, scal = 1))
R> nobs(fm3DNase2)
[1] 16
> logLik(fm3DNase2)
'log Lik.' 42.62777 (df=4)
> nobs(logLik(fm3DNase2))
[1] 14
Cheers...