0
$\begingroup$

I just made a NonlinearModelFit :

 nlm = NonlinearModelFit[data, {Piecewise[{{-((
   n0 r - (lambda n0 R)/(
    lambda - lambda phiL + phiL R Coth[R]))/(-r + R)), r < 0}, {(
  lambda n0 R Csch[R/lambda] Sinh[(-r + R)/
    lambda])/((-r + R) (lambda - lambda phiL + phiL R Coth[R])), 
  r > 0}}], 0 < lambda < 300 && 300 < R < 375 && 0 < phiL < 1}, {lambda, R, phiL}, r]

And read the parameters that resulted :

  nlm["ParameterTable"]

If I copy past it it's something like that :

Estimate Standard Error t‐Statistic P‐Value lambda 135.68187533976533 20.981462255825214 6.4667502047954315 0.007502993516948019 R 300.0000504177876 67.82635272927216 4.423060334900111 0.021460812816808023 phiL 0.04527481766196899 0.01810272462912522 2.5009946618271464 0.08762977813441623 TagBox[GridBox[List[List["\"\"", "\"Estimate\"", "\"Standard Error\"", "\"t-Statistic\"", "\"P-Value\""], List["lambda", "135.68187533976533`", "20.981462255825214`", "6.4667502047954315`", "0.007502993516948019`"], List["R", "300.0000504177876`", "67.82635272927216`", "4.423060334900111`", "0.021460812816808023`"], List["phiL", "0.04527481766196899`", "0.01810272462912522`", "2.5009946618271464`", "0.08762977813441623`"]], Rule[AutoDelete, False], Rule[GridBoxAlignment, List[Rule["Columns", List[List[Left]]], Rule["Rows", List[List[Automatic]]]]], Rule[GridBoxDividers, List[Rule["ColumnsIndexed", List[Rule[2, GrayLevel[0.7`]]]], Rule["RowsIndexed", List[Rule[2, GrayLevel[0.7`]]]]]], Rule[GridBoxItemSize, List[Rule["Columns", List[List[Automatic]]], Rule["Rows", List[List[Automatic]]]]], Rule[GridBoxSpacings, List[Rule["ColumnsIndexed", List[Rule[2, 1]]], Rule["RowsIndexed", List[Rule[2, 0.75`]]]]]], "Grid"]

The image is : enter image description here

But I'd like to get the values separately, and writing something like

       nlm["ParameterTable"][[2]][[2]]

doesn't work !

So how could I extract so individual values of the parameters and not just having the table please ?

$\endgroup$

closed as off-topic by JimB, Carl Lange, m_goldberg, MarcoB, Bob Hanlon Feb 5 at 18:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – JimB, Carl Lange, m_goldberg, MarcoB, Bob Hanlon
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    $\begingroup$ Please have a look at nlm["Properties"] and "BestFitParameters". $\endgroup$ – b.gates.you.know.what Feb 4 at 14:54
1
$\begingroup$

Have you looked at the possible keys to give to the fit result?

nlm["ParameterTableEntries"]

would probably do.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.