Dear All,
 
made some headways with my nls model, thanks for the help... I would like to 
ask if you could provide some insights to the following: 
 
I am trying to use wfct() from minpack.lm so that I could do the weighting 
using one of the predictors, but getting an error message:
 
library(minpack.lm)
raw <-data.frame(y=rep(1,25),
      D1=c(2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 20, 20, 20, 20, 
20, 50, 50, 50, 50, 50),
      D2=c(0.2, 0.5, 1, 2, 5, 0.2, 0.5, 1, 2, 5, 0.2, 0.5, 1, 2, 5, 0.2, 0.5, 
1, 2, 5, 0.2, 0.5, 1, 2, 5),
      E=c(76.3, 48.8, 44.5, 15.5, 3.21, 56.7, 47.5, 26.8, 16.9, 3.25, 46.7, 
35.6, 21.5, 11.1, 2.94, 24.8, 21.6, 17.3, 7.78, 1.84, 13.6, 11.1, 6.43, 3.34, 
0.89))
names(raw)                        
start <-list(p1=8,p2=80,p3=-0.7,p4=-2.5,p5=0.3,p6=0.7)
nls(y ~ 
I(D1/(p1*((E/(p2-E))^(1/p3)))+D2/(p6*((E/(p2-E))^(1/p4)))+(p5*D1*D2)/(p1*p6*((E/(p2-E))^(0.5/p3+0.5/p4)))),data=raw,start=start,weights
 = wfct(sqrt(E)),control=nls.control(maxiter=100))
 
......
 Error in assign(NAMES[i], DATA[[i]], envir = newEnv) : 
  attempt to use zero-length variable name
 
 
I have compared my data frame to the example in the doc for wfct, and unable to 
idebtify why I may be getting this error.
 
Your help is greatly appreciated
 
Andras
        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to