Re: [R] Non-linear modelling with several variables including a categorical variable

2013-07-05 Thread Prof J C Nash (U30A)
Weterings To: "Prof J C Nash (U30A)",r-help@r-project.org Subject: Re: [R] Non-linear modelling with several variables including a categorical variable Message-ID: Content-Type: text/plain Dear Prof. Nash, I tried to run nls with the nlxb function and as you mention it

Re: [R] Non-linear modelling with several variables including a categorical variable

2013-07-04 Thread Robbie Weterings
Dear Prof. Nash, I tried to run nls with the nlxb function and as you mention it is fairly slower in terms of running the code. However, if I would have used this function earlier I would have saved a lot of time trying to find the start values. The output looks a little bit sloppy but I think it

Re: [R] Non-linear modelling with several variables including a categorical variable

2013-07-04 Thread Robbie Weterings
Thanks for the advise Prof Nash, but I'm not sure if I understood it right. I managed to make a new model based on what I think you meant. What I did is; I created 3 variables (cat1, cat2, cat3) one for each category with either the value 1 or 0 and added these to the model so they work as differen

Re: [R] Non-linear modelling with several variables including a categorical variable

2013-07-03 Thread Prof J C Nash (U30A)
If preytype is an independent variable, then models based on it should be OK. If preytype comes into the parameters you are trying to estimate, then the easiest way is often to generate all the possible combinations (integers --> fairly modest number of these) and run all the least squares mini