Hi all, I'm trying to use the nls function to do a nls curve fit. I have a histogram for my data. I need to get athe best curve fit for this. i am plotting experimental vs the theoretical values. my experimental values are got from my dnorm function, mean=mean of my mid values(hist) and sd=sd of my mid values. For the theoretical i'm using mean and sd of all 20000 raw values as the start values. I'm getting no sd in my new curve. Can someone gimme some pointers to get started here. I need my nls to spit out sd and mean of the new fit which it does'nt. is there a better function or can i somehow get around this. Thanks in advance. Choudary Jagarlamudi Instructor Southwestern Oklahoma State University STF 254 100 campus Drive Weatherford OK 73096 Tel 580-774-7136 [[alternative HTML version deleted]]
Have you tried fitdistr in the MASS package (should be installed with R by default)? Andy> From: Jagarlamudi, Choudary > > Hi all, > I'm trying to use the nls function to do a nls curve fit. I > have a histogram for my data. I need to get athe best curve > fit for this. i am plotting experimental vs the theoretical > values. my experimental values are got from my dnorm > function, mean=mean of my mid values(hist) and sd=sd of my > mid values. For the theoretical i'm using mean and sd of all > 20000 raw values as the start values. I'm getting no sd in my > new curve. Can someone gimme some pointers to get started here. > I need my nls to spit out sd and mean of the new fit which it > does'nt. is there a better function or can i somehow get around this. > Thanks in advance. > > Choudary Jagarlamudi > Instructor > Southwestern Oklahoma State University > STF 254 > 100 campus Drive > Weatherford OK 73096 > Tel 580-774-7136 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > R-project.org/posting-guide.html > >