0

i have 4 sets of data of JCS as a function of T at 4 different B values the equation is
JCS = JCST*Exp[-(B/BSC)];

JCST = JCS0*(1 - T/78.4)^alpha2;

BSC = BSC0*Exp[-(T/TSC)];

where JCS0 BSC and TCS have to be the same for all the dataset while B changes for each data but they are known. i use to do a fit whit a single data set setting B every fit, but I get different best values for JCS0 BSC and TCS. how can I perform a single Fit of JCS vs T with all 4 sets of data including the fact that B is not a fitting parameter but is a know value?

thanx modified to add the code I'm using actually

JCS = JCST*Exp[-(B/BSC)];
JCST = JCS0*(1 - T/78.4)^alpha2;
BSC = BSC0*Exp[-(T/TSC)];
JCS2 = JCS /. {B -> 1}

fit3T = NonlinearModelFit[ a1T, {JCS2, alpha2 > 0, BSC0 > 0, TSC > 0}, {{TSC, 8}, {JCS0, 0.5}, {BSC0, 90}, {alpha2, 0.8}}, T]; fit3Ta = fit3T["BestFitParameters"]

Show[ListLogPlot[a1T, PlotRange -> {{0, 90}, {0.0001, 2}}, PlotStyle -> PointSize[0.02]], LogPlot[JCS2 /. fit3Ta, {T, 0, 90}, PlotRange -> {0.0001, 2}]] ```

  • Please make use of code blocks and ensure that the question is readable / the code is copyable. – Szabolcs Nov 12 '20 at 11:40
  • @Szabolcs what do you mean with code blocks? – Achille Angrisani Armenio Nov 12 '20 at 12:30
  • MAybe the following may help: https://mathematica.stackexchange.com/questions/5362/finding-a-fit-to-a-multi-dimensioned-function – Daniel Huber Nov 12 '20 at 15:25
  • 1
    Check my resource function MultiNonlinearModelFit – Sjoerd Smit Nov 12 '20 at 16:56
  • @SjoerdSmit 's MultiNonlinearModelFit is the way to go but it does assume (and please correct me if I'm wrong) that the error variances are identical among the individual models. If the response variables are in different units, then that assumption of a common error variance, it unlikely to be true. – JimB Nov 12 '20 at 17:27
  • @JimB You can apply different weights to the different datasets to compensate I guess. Or you rescale. For exponential models you have to reconsider the standard error assumptions anyway, because they range over many orders of magnitude. – Sjoerd Smit Nov 12 '20 at 19:57
  • @SjoerdSmit Agreed - if one "knows" the weights as opposed to estimating the weights. And you point about exponential models is great: one needs to look at the residuals to see if the error function part of the model is appropriate. – JimB Nov 12 '20 at 23:49
  • thanx all guy i solved using LogLikelihood function and minimizing the parameter with all data sets – Achille Angrisani Armenio Nov 19 '20 at 10:58

0 Answers0