2.4.16 nlbeginor


Menu Information

Analysis: Fitting: Nonlinear Implicit Curve Fit...

Brief Information

Start a nonlinear implicit curve fitting session, and work on functions with multiple variables(>=3)

Additional Information

Minimum Origin Version Required: 2022 (Pro Only)

X-Function not designed for Auto GetN Dialog.

Command Line Usage

nlbeginor irng:=(1,2,3) func:=Ellipsoid; //initialize to fit data with column 1 to 3 as Y with user-defined function

nlbeginor irng:=(1,2,3) theme:=MyTheme; //initialize to fit data with column 1 to 3 as Y with saved theme file

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input irng

Input

Range

<active>
The data to be fitted
Fitting Function Name func

Input

string

<unassigned>
The fitting function used to fit data
NLFit Tree nltree

Input/Output

TreeNode

nlt
Tree containing the information of fitting such as parameter values, standard error, etc.
Fitting Mode mode

Input

int

0
The method to treat the input data for fitting.

Option list:

  • auto:Auto
    The input dataset is fitted use the model
  • concat:Concatenate Fit
    All input datasets are concatenated and fitted as one curve.
  • global:Global Fit
    All datasets are fitted globally. This mode should be used when you want to fit one model to multiple datasets with shared parameters.
  • cons:Independent Fit - Consolidated Report
    All datasets are fitted independently. This mode should be used when you want to fit one model to multiple datasets without shared parameters and create the consolidated reports.
Dialog Theme theme

Input

string

<optional>
The theme is used to store the special settings that user often use.
Notation of Parameters pnotation

Input

int

0
Notation of parameters in the output tree.

Option list:

  • para:ParaName
    Use name of parameter as notation.
  • abbr:Abbreviation
    Use abbreviation of parameter as notation.
  • both:Both
    Use both name and abbreviation of parameter as notation.
Parameter Initialization init

Input

int

0
Specify the status of Parameter Initialization.

Option list:

  • auto:Auto
    Origin automatically decides whether to enable parameter initialization according to the FDF file of the fitting function.
  • enable:Enable
    Enable parameter initialization.
  • disable:Disable
    Disable parameter initialization.
Global Weight Method weight

Input

int

-1

Option list:

  • -1=auto
    Weight is Instrumental if error data are co-selected.
  • 0=none: No Weights
    No weight is used.
  • 1=ins:Instrumental (=1/ei^2)
    Use instrumental weight method.
  • 2=stat:Statistical (=1/yi)
    Use statistical weight method.
How to Initialize the NLFit Object option

Input

int

0

Option list:

  • init_all:Init All Parameters
    Initialize all parameters and then do the fitting with these parameters.
  • change_data:Only Change Data
    Keep the former settings and only change dataset, then do the fitting to the new dataset.



Description

Start a nonlinear implicit fitting session, including option settings and parameter initialization.

The nltree is a TreeNode variable, which can control many fitting settings and allows you to read fitting results such as the parameter values, standard error, etc.

For details please refer to this.

Note that only the fitting functions under the Implicit category in Fitting Function Organizer are available with this x-function.


Algorithm

The nonlinear implicit fitting uses the orthogonal distance regression (ODR) iteration algorithm.


Reference

"J. W. Zwolak, P.T. Boggs, and L.T. Watson, ``Algorithm 869: ODRPACK95: A weighted orthogonal distance regression code with bound constraints, ACM Transactions on Mathematical Software Vol. 33, Issue 4, August 2007."


Examples

This example shows to fit an implicit ellipse function with X Y error.

string fn$=system.path.program$ + "Samples\Curve Fitting\Ellipsoid.dat";
newbook;
impasc fname:=fn$; 
nlbeginor irng:=(1,2,3) func:=Ellipsoid; // This function is a user-defined function
nlfit;
nlend 1 1;

The parameter control in nlbeginor is similar to nlbegin, you could refer to more examples.


Related X-Functions

nlbegin nlfit nlend nlpara nlbegino



Keywords:regression, NLFit