[R] Nonlinear Regression model: Diagnostics

Spencer Graves spencer.graves at pdf.com
Sat Apr 22 04:51:40 CEST 2006


	  I don't know how to get the error message you reported.  The 
following modification of the first 'nls' example worked for me:

DNase1 <- subset(DNase, Run == 1)
fm1DNase1 <- nls( density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1)
profile(fm1DNase1)

fm1DNase1.2 <- nls( density ~ SSlogis(log(conc), Asym, xmid, scal), 
DNase1, alg="default", trace=TRUE)
profile(fm1DNase1.2)

	  Have you made scatterplots indicating that the model you are trying 
to fit seems plausible?  If yes, I suggest you try to produce an 
extremely simple, self-contained example that generates your error 
message, then send that to this list.  Before you submit another post, 
however, please read the posting guide! 
"www.R-project.org/posting-guide.html".  Some people have reported that 
the posting guide helped them solve their own problem.  Failing that, I 
know that at least one of the R Project's leading contributors has a 
policy of not responding to posts that seem inconsistent with the 
suggestions in that guide.  Even without that, I believe that posts more 
consistent with that guide tend to be clearer and easier to understand. 
  This tends to increase chances of getting (quickly) the information 
you most need to proceed.
	
	  hope this helps,
	  spencer graves	

Sachin J wrote:
> Hi,
>    
>   I am trying to run the following nonlinear regression model. 
>    
>   > nreg <- nls(y ~ exp(-b*x), data = mydf, start = list(b = 0), alg = "default", trace = TRUE)
>    
>   OUTPUT: 
>   24619327 :  0 
> 24593178 :  0.0001166910 
> 24555219 :  0.0005019005 
> 24521810 :  0.001341571 
> 24500774 :  0.002705402 
> 24490713 :  0.004401078 
> 24486658 :  0.00607728 
> 24485115 :  0.007484372 
> 24484526 :  0.008552635 
> 24484298 :  0.009314779 
> 24484208 :  0.009837009 
> 24484172 :  0.01018542 
> 24484158 :  0.01041381 
> 24484152 :  0.01056181 
> 24484150 :  0.01065700 
> 24484149 :  0.01071794 
> 24484148 :  0.01075683 
> 24484148 :  0.01078161 
> 24484148 :  0.01079736 
> 24484148 :  0.01080738 
> 24484148 :  0.01081374 
> Nonlinear regression model
>   model:  y ~ exp(-b * x) 
>    data:  mydf 
>          b 
> 0.01081374 
>  residual sum-of-squares:  24484148 
> 
>   My question is how do I interpret the results of this model. 
>    
>   > profile(nreg)
>    
>   24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> 24484156 :   
> Error in prof$getProfile() : number of iterations exceeded maximum of 50
>    
>   I am unable to understand the error cause. Any pointers would be of great help. 
>    
>   Regards,
>   Sachin
> 
> 		
> ---------------------------------
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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




More information about the R-help mailing list