You have not specified a nonlinear formula.  There are no parameters to 
estimate in the formula you provide, y1~dist.  What is the nonlinear 
relation you are trying to fit?  Look at the help file for nls to see some 
examples worked.

?nls

Jean


Gyanendra Pokharel <gyanendra.pokha...@gmail.com> wrote on 10/01/2012 
10:27:23 AM:
> 
> Hi all,
> I got following problem in fitting the data.
> Any kind of suggestions are welcome
> 
> 
> > beta <- 3.5
> > d <- seq(0.1,62.5,0.1)
> > y <- exp(-beta*d)
> > y1 <- y
> > x <- read.table("epidist.txt", header = TRUE)
> > data.nls <- as.data.frame(cbind(y1,x))
> > #attach(data.nls)
> > nls.fit <- nls(y1~dist,data.nls)
> Error in cll[[1L]] : object of type 'symbol' is not subsettable
> 
> 
> Best

        [[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