I am trying to fit a nonlinear regression model to data. There are several predictor variables and 8 parameters. I will write the model as
Y ~ Yhat(theta1,...,theta8) OK, I can do this using nls() - but "only just" as there are not as many observations as might be desired. Now the problem is that we have a factor "Site" and I want to include a corresponding error component. I tried something like (excuse the doctored R output): > mod0.nlme <- nlme(Y ~ Yhat(theta1,...,theta8) + site.err , + start = c(mod0.st,0), + groups = ~ Site, + fixed = theta1 + ... + theta8 ~ 1, + random = site.err ~ 1) Error in nlme.formula(Y ~ Yhat(theta1,...,theta8 : starting values for the fixed component are not the correct length and then > mod0.nlme <- nlme(Y ~ Yhat(theta1,...,theta8) + site.err , + start = mod0.st, + groups = ~ Site, + fixed = theta1 + ... + theta8 ~ 1, + random = site.err ~ 1) Error: Singularity in backsolve at level 0, block 1 The straightforward way would be to go > mod0.nlme <- nlme(Y ~ Yhat(theta1,...,theta8) , + start = mod0.st, + groups = ~ Site, + fixed = theta1 + ... + theta8 ~ 1) making all 8 parameters random, but there is little hope of getting that to work. (I did try it and it does not crash straight away but settles down to run forever.) Any comments welcome. I regret that I cannot go into much detail about the actual problem. -- Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: [EMAIL PROTECTED] Fax 7 838 4155 Phone +64 7 838 4773 wk Home +64 7 825 0441 Mobile 021 1395 862 ______________________________________________ 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