NonlinearRegress
NonlinearRegress[data,expr,pars,vars]
finds numerical values of the parameters pars that make the model expr give a best fit to data as a function of vars and provides diagnostics for the fitting.
NonlinearRegress[data,{expr,cons},pars,vars]
finds a best fit and provides diagnostics subject to the constraints cons.
更多信息和选项
- To use NonlinearRegress, you first need to load the Nonlinear Regression Package using Needs["NonlinearRegression`"].
- The data can have the form {{x1,y1,…,f1},{x2,y2,…,f2},…}, where the number of coordinates x,y,… is equal to the number of variables in the list vars.
- The data can also be of the form {f1,f2,…}, with a single coordinate assumed to take values 1, 2, ….
- The model expr must yield a numerical value when pars and vars are all numerical.
- The estimates of the model parameters give a least‐squares fit, minimizing the sum of squared residuals.
- NonlinearRegress returns a list of rules for results and diagnostics specified by the option RegressionReport.
- The model expr must yield a numerical value when pars and vars are all numerical.
- For constrained models, the constraints cons can contain equations, inequalities, or logical combinations of equations and inequalities.
- Parameters are specified using the same syntax as in FindFit.
- The results found by NonlinearRegress may correspond only to a local optimum.
- The following options can be given:
-
AccuracyGoal Automatic the accuracy sought Compiled Automatic whether to compile the model ConfidenceLevel 0.95 confidence level for confidence intervals Gradient Automatic list of gradient functions MaxIterations 100 maximum number of iterations to use Method Automatic method to use PrecisionGoal Automatic the precision sought RegressionReport SummaryReport fit diagnostics to include Tolerance Automatic numerical tolerance for matrix operations Weights Automatic list of weights for each point or pure function WorkingPrecision MachinePrecision the precision used in internal computations - The options AccuracyGoal, Compiled, Gradient, MaxIterations, Method, PrecisionGoal, and WorkingPrecision are the same as for FindFit.
- Possible settings for Weights are Automatic, a list of numbers with the same length as data, or a pure function.
- With the default setting Weights->Automatic, each data point is given a weight of 1.
- With the setting Weights->g, the weight associated with each point is g[fi,xi,yi,…].
- The default setting RegressionReport->SummaryReport includes the elements BestFitParameters, ParameterCITable, EstimatedVariance, ANOVATable, AsymptoticCorrelationMatrix and FitCurvatureTable.
- For constrained models, RegressionReport values based on approximate normality assumptions may not be valid. When such values are included, the values will be generated along with a warning message.
范例
打开所有单元关闭所有单元Options (5)
Weights (2)
文本
Wolfram Research (2007),NonlinearRegress,Wolfram 语言函数,https://reference.wolfram.com/language/NonlinearRegression/ref/NonlinearRegress.html.
CMS
Wolfram 语言. 2007. "NonlinearRegress." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/NonlinearRegression/ref/NonlinearRegress.html.
APA
Wolfram 语言. (2007). NonlinearRegress. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/NonlinearRegression/ref/NonlinearRegress.html 年