Re: [R] Regression and fitting

From: Gunther Höning <hoening_at_3-med.klinik.uni-mainz.de>
Date: Tue, 01 Jul 2008 17:20:28 +0200

Thanks!
I tried already. Still the same error message...

wishes
Gunther
----- Original Message -----
From: "ONKELINX, Thierry" <Thierry.ONKELINX_at_inbo.be> To: "Gunther Höning" <gunther.hoening_at_ukmainz.de>; <R-help_at_r-project.org> Sent: Tuesday, July 01, 2008 3:08 PM
Subject: RE: [R] Regression and fitting

>
> Try to set your own starting values. Use the values that you would expect
> for S0, mu and sigma.
>
> HTH,
>
> Thierry
>
>
> ----------------------------------------------------------------------------
> ir. Thierry Onkelinx
> Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
> Forest
> Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
> methodology and quality assurance
> Gaverstraat 4
> 9500 Geraardsbergen
> Belgium
> tel. + 32 54/436 185
> Thierry.Onkelinx_at_inbo.be
> www.inbo.be
>
> To call in the statistician after the experiment is done may be no more
> than asking him to perform a post-mortem examination: he may be able to
> say what the experiment died of.
> ~ Sir Ronald Aylmer Fisher
>
> The plural of anecdote is not data.
> ~ Roger Brinner
>
> The combination of some data and an aching desire for an answer does not
> ensure that a reasonable answer can be extracted from a given body of
> data.
> ~ John Tukey
>
> -----Oorspronkelijk bericht-----
> Van: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org]
> Namens Gunther Höning
> Verzonden: dinsdag 1 juli 2008 14:41
> Aan: R-help_at_r-project.org
> Onderwerp: [R] Regression and fitting
>
> Dear list,
>
> I have some values like
> Time 2 4 8 24 48 72
>
> UTR 82543 169105 207615 96633 31988 7005
> UTRs 82687 172934 205541 101842 31898 6950
> of a twice repeated meassurement.
>
> I know that the underlying function is of :
>
> f(x) = SO/(sqrt(2*pi)*sigma *x) * exp(-(S0*ln x - mu)^2/(2*sigma^2)).
>
> How can I determine the value of S0, sigma and mu.
>
> I tried nls:
>
> lognormal <- function(x,S0,sigma,mu) {S0/(sqrt(2*pi)*sigma *x) *
> exp(-(S0*log (x) - mu)^2/(2*sigma^2))}
> x <- rep(c(2,4,6,24,48,72),2)
> y <-
> c(82543,169105,207615,96633,31988,7005,82687,172934,205541,101842,31898,6950
> )
> dat <- data.frame(x,y)
> regfit <- nls(y ~ lognormal(x,S0,sigma,mu) ,data =dat)
>
>
> Output:
>
> Error in nlsModel(formula, mf, start, wts) :
> singular gradient matrix at initial parameter estimates
> Warning message:
> No starting values specified for some parameters.
> Intializing 'S0', 'sigma', 'mu' to '1.'.
> Consider specifying 'start' or using a selfStart model in: nls(y ~
> lognormal(x, S0, sigma, mu), data = dat)
>
> Can anybody help on this topic please ?
>
>
> Gunther
>
> ______________________________________________
> 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.
>



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. Received on Tue 01 Jul 2008 - 16:39:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 01 Jul 2008 - 17:31:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive