[R] Simple question regarding to specifying model

David Winsemius dwinsemius at comcast.net
Wed Oct 12 20:46:23 CEST 2011


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



More information about the R-help mailing list