I have hunted around but cannot find the command which allows me to specify parameters of a model. For example, model.m1 <- nls(y ~ alpha * x1/(beta + x1), data = data, start = list(beta 20, alpha = 120), trace = TRUE) This will estimate the parameters, which allows to investigate the residuals. What I would like to do is fix the parameters to the data that I have estimated elsewhere, to analyse their residuals. For example, model.m2 <- y ~ 80 * x1/30 +x1 ?????? Thanks -- View this message in context: http://r.789695.n4.nabble.com/Simple-question-regarding-to-specifying-model-tp3899049p3899049.html Sent from the R help mailing list archive at Nabble.com.
On Oct 12, 2011, at 2:25 PM, BvZ wrote:> I have hunted around but cannot find the command which allows me to > specify > parameters of a model. > > For example, > > model.m1 <- nls(y ~ alpha * x1/(beta + x1), data = data, start = > list(beta > 20, alpha = 120), trace = TRUE) > > This will estimate the parameters, which allows to investigate the > residuals. > > What I would like to do is fix the parameters to the data that I have > estimated elsewhere, to analyse their residuals. For example, > > model.m2 <- y ~ 80 * x1/30 +x1 ??????Wouldn't this just be resids <- predict(model.m1) - with( data, 80 * x1/30 +x1) -- David Winsemius, MD West Hartford, CT
Tried this, it does not seem to work. It is really simple what I am trying to do. I have a pre-specified best-fit line, and wish to run some diagnostic tests for goodness of fit. I will play around with the predict function, thanks a lot David! -- View this message in context: http://r.789695.n4.nabble.com/Simple-question-regarding-to-specifying-model-tp3899049p3899216.html Sent from the R help mailing list archive at Nabble.com.
Reasonably Related Threads
- How to interpret these results from a simple gamma-frailty model
- two basic question regarding model selection in GAM
- difficulties computing a simple anova
- Residuals from GLMMs in the lme4 package
- [bug report] drm/nouveau/devinit: move simple pll setting routines to devinit