Oops I forgot to add another line to the code (see below)!! You could add some noise if you want to. Generating the data from the function was merely a way to test if the fitting procedure works - I have experimental data that should allow me to calculate the parameters mu, sig, chi and Ms based upon my input M, H and diameter.
df <- data.frame(H=htest,M=mtest) -- View this message in context: http://r.789695.n4.nabble.com/Fitting-problem-tp2715234p2715271.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.