Re: [R] How to do global curve fitting in R

2015-09-09 Thread Jianling Fan
Thanks very much William, That's exactly what I need! It is so excellent to do it by a group-separation by [] syntax. Thanks again! Best regards, Jianling On 9 September 2015 at 11:15, William Dunlap wrote: > You can put all your data in one data.frame along with a column called, say, >

Re: [R] How to do global curve fitting in R

2015-09-09 Thread Bert Gunter
Well.. 1) To add to Duncan's comments, if you create a new "dataset" discrete factor column to indicate the dataset in the combined data, then you would fit the model dataset/(corrected denominator). 2) However, there **is** a statistical issue here, for if you have more than a "few" data sets, s

Re: [R] How to do global curve fitting in R

2015-09-09 Thread William Dunlap
You can put all your data in one data.frame along with a column called, say, 'group' that says which group each row is in. Then use the [] syntax in nls's formula argument to get group-specific estimates for some of the parameters. E.g., in the following there is a global parameter 'b' and a group

Re: [R] How to do global curve fitting in R

2015-09-09 Thread Duncan Murdoch
On 09/09/2015 12:28 PM, Jianling Fan wrote: > Hi, Bert > > Thanks for your reply. > > I am fitting a logistic does response model with 3 parameters as : > y=a/(1+(x/x0)b), I have many sets of data. I can fit each of them for > the model. but I want them shared the parameter x0 and b, but varied >

Re: [R] How to do global curve fitting in R

2015-09-09 Thread Jianling Fan
Hi, Bert Thanks for your reply. I am fitting a logistic does response model with 3 parameters as : y=a/(1+(x/x0)b), I have many sets of data. I can fit each of them for the model. but I want them shared the parameter x0 and b, but varied for each a. I don't think it is a statistics problem. It

Re: [R] How to do global curve fitting in R

2015-09-09 Thread Bert Gunter
Jianling: 1. What models are you trying to fit? Details matter, and it is impossible to give a good answer without specifics. 2. In general terms, to do this one combines all the data and allows for "appropriate" changes in the model parameters for the different groups. For example, different int

[R] How to do global curve fitting in R

2015-09-09 Thread Jianling Fan
Hello all, I am trying to fit my data to a nls model. I have many sets of data and each can fit well for the curve. but I want to fit them at once by sharing 2 of 3 parameters of the model. I know it is a typical global curve fitting problem, but I don't know how to do it by R? Does anyone know a