Hello,

This is my first post in this e-mail list and I hope it's enough to justify
calling for help. In case it's not, sorry.

I'm trying to do analysis and graphics using a factor as a criteria to split
data and do the analysis/graphics for each subset of data.

Right now what I'm trying to do is to fit and plot the following logistic
model, according to a third variable named "Cerca":
dm_fit_T<-nls(nDMTRBgm2~(K/(1+((K-nDMTRBgm2.T.1)/nDMTRBgm2.T.1)*exp(-r))),perieph,start=list(K=3,r=0.2),trace=T)

I've found a function called gapply which seems to be what I need, but it
doesn't seem to work. This is the argument I've used:
gapply(perieph,FUN=nls(nDMTRBgm2~(K/(1+((K-nDMTRBgm2.T.1)/nDMTRBgm2.T.1)*exp(-r))),perieph,start=list(K=3,r=0.2),trace=T),groups="Cerca")

But I get this error message returned:
> Error in get(as.character(FUN), mode = "function", envir = envir) :
object 'FUN' of mode 'function' was not found

Can you help me doing this non-linear regression by groups work?

Also, after I manage making the regression, I'd also need fitting a line to
the nDMTRBgm2~nDMTRBgm2.T.1 data using the same model above. I've used
plotfit to do that with one nlm data set. Is it possible to fit each group
trend line and data with different colours/symbols  in one same graphic?

Thank you,
Cristiano

-- 
Cristiano Yuji Sasada Sato
Doutorando
Programa de Pós-Graduação em Ecologia e Evolução - IBRAG / UERJ
Laboratório de Ecologia de Rios e Córregos
Departamento de Ecologia - Universidade do Estado do Rio de Janeiro

	[[alternative HTML version deleted]]

