[R] nls: missing value or an infinity (Error in numericDeriv) and singular gradient matrixError in nlsModel

2007-02-13 Thread Daniela Salvini
Hi,

I am a non-expert user of R. I am essaying the fit of two different functions 
to my data, but I receive two different error messages. I suppose I have two 
different problems here... But, of which nature? In the first instance I did 
try with some different starting values for the parameters, but without 
success. 
If anyone could suggest a sensible way to proceed to solve these I would be 
really thankful! 

Daniela

***

Details on data and formulas:

  polcurve=read.table(polcurve.txt,header=TRUE)
 polcurve
   distfath
1 1 0.138908965
2 2 0.113768871
3 3 0.114361753
4 4 0.051065765
5 5 0.095787946
6 6 0.123601131
7 7 0.117340746
8 8 0.054049434
9 9 0.112000962
10   10 0.074843028
11   11 0.064735196
12   12 0.098210497
13   13 0.093786895
14   14 0.033752379
15   15 0.038961039
16   16 0.023048216
17   17 0.010018243
18   18 0.007177034
19   19 0.003787879
20   20 0.0
21   21 0.0

#Exponential power function
 s=nls(fath~((b^2)/(a^2))*exp((-dist/a)^b),polcurve)


Error in numericDeriv(form[[3]], names(ind), env) : 
Missing value or an infinity produced when evaluating the model
In addition: Warning message:
No starting values specified for some parameters.
Intializing 'b', 'a' to '1.'.
Consider specifying 'start' or using a selfStart model in: nls(fath ~ 
((b^2)/(a^2)) * exp((-dist/a)^b), polcurve) 

#Geometric function
s=nls(fath~((b-1)*(b-2)/a)*((1+dist/a)^-b),polcurve)


Error in nlsModel(formula, mf, start, wts) : 
singular gradient matrix at initial parameter estimates
In addition: Warning message:
No starting values specified for some parameters.
Intializing 'b', 'a' to '1.'.
Consider specifying 'start' or using a selfStart model in: nls(fath ~ ((b - 1) 
* (b - 2)/a) * ((1 + dist/a)^-b),  

Daniela Salvini 
Ph.D. student
University of Copenhagen, 
Faculty of Life Sciences, 
Centre for Forest and Landscape
Hørsholm Kongevej 11
2970 Hørsholm, Denmark
 
e-mail: [EMAIL PROTECTED] 
Tel.: (+45)35281639 / 35281645
Fax.: (+45)35281517

__
R-help@stat.math.ethz.ch 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] Console

2005-08-18 Thread Daniela Salvini
I am at my first steps with R... and I already notice that the console has a 
quite limited number of lines. Can anyone tell me how to visualise all the 
information, which is actually present? I only see the last part of the output, 
which obviosly exceeds the maximum number of rows in the console.
Thank you very much for your help!
Daniela
 


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html