Re: [R] Help: how can i build a constrained non-linear model?

2007-09-05 Thread

Dear all
I try to run the code as follows,
 
test.model<-nls(y~exp(A)*(x-PMA)^4+exp(B)*(x-PMA)^2+Const,
data=test,
start=list(A=8,B=5,Const=10,PMA=0),
control=nls.control(maxiter = 50,minFactor=1/1048),
trace=TRUE)
 
But how can i build a selfSart, since i have much data ? 
Thanks for your help first!
Vina
 


From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Help: how can i build a constrained 
non-linear model?Date: Tue, 4 Sep 2007 07:53:41 +


DearI have a data.frame, and want to fit a constrained non-linear model:data:





x
y

-0.08
20.815

-0.065
19.8128

-0.05
19.1824

-0.03
18.7346

-0.015
18.3129

0.015
18.0269

0.03
18.4715

0.05
18.9517

0.065
19.4184

0.08
20.146

0
18.2947model:y~exp(a)*(x-m)^4+exp(b)*(x-m)^2+const I try to use nls() and set 
start=list(a=1,b=1,c=1,m=1), but which always give me a error message that " 
Error in qr.solv(QR.B,cc): singular matrix 'a' in solve". How can i build a 
selfStart? or any suggestion! Thanks&Regards,Vina

Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy! Try it! 
_


[[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
and provide commented, minimal, self-contained, reproducible code.


[R] Help: how can i build a constrained non-linear model?

2007-09-04 Thread

Dear
I have a data.frame, and want to fit a constrained non-linear model:
data:






x
y

-0.08
20.815

-0.065
19.8128

-0.05
19.1824

-0.03
18.7346

-0.015
18.3129

0.015
18.0269

0.03
18.4715

0.05
18.9517

0.065
19.4184

0.08
20.146

0
18.2947
model:
y~exp(a)*(x-m)^4+exp(b)*(x-m)^2+const
 
I try to use nls() and set start=list(a=1,b=1,c=1,m=1), but which always give 
me a error message that " Error in qr.solv(QR.B,cc): singular matrix 'a' in 
solve". How can i build a selfStart? or any suggestion!
 
Thanks&Regards,
Vina
_


[[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
and provide commented, minimal, self-contained, reproducible code.