From: L.J.A.Vasquez on 12 Nov 2009 06:02 Hello. I want to perform a nonlinear model fitting on data points with some significant correlations in them. For these correlated data points, the definition of chi^2 is chi^2=Sum_i Sum_j [ y_i - f(y_i) ] * [ y_j - f(y_j) ] / Covariance(y_i, y_j) . Currently, I am using the Mathematica function "NonlinearModelFit" which unfortunately only assumes statistically independent data points and does not allow to incorporate correlation in the data points when estimating the best fit parameters. I have looked at other data fitting functions such as FindFit and even GeneralizedLinearFit but i haven't found one yet that takes into account correlated data. Maybe i am missing something. Is there a way to perform a nonlinear fit for a correlated data points? Is there a way to change how the chi^2 is being defined in any of the Mathematica fitting function? Perhaps, there is an additional Mathematica package that is available and deals with this problem. Any help is most welcome. With my best regards, -- Louella __________________________________ Louella Judy A. Vasquez Department of Physics and Centre for Scientific Computing University of Warwick, Coventry CV47AL United Kingdom PHONE: +44 (24) 765 74309 MOBILE: +44 790 4336687
From: Darren Glosemeyer on 13 Nov 2009 05:54 L.J.A.Vasquez(a)warwick.ac.uk wrote: > Hello. > > I want to perform a nonlinear model fitting on data points with some > significant correlations in them. > For these correlated data points, the definition of chi^2 is > > chi^2=Sum_i Sum_j [ y_i - f(y_i) ] * [ y_j - f(y_j) ] / Covariance(y_i, > y_j) . > > Currently, I am using the Mathematica function "NonlinearModelFit" which > unfortunately only assumes statistically independent data points and does > not allow to incorporate correlation in the data points when estimating > the best fit parameters. > > I have looked at other data fitting functions such as FindFit and even > GeneralizedLinearFit but i haven't found one yet that takes into account > correlated data. > > Maybe i am missing something. Is there a way to perform a nonlinear fit > for a correlated data points? Is there a way to change how the chi^2 is > being defined in any of the Mathematica fitting function? Perhaps, there > is an additional Mathematica package that is available and deals with this > problem. Any help is most welcome. > > With my best regards, > You could try approaching this as a direct optimization problem. One way to do that is to construct the chi^2 expression and use FindMinimum or NMinimize to minimize the chi^2 to obtain parameter estimates. Darren Glosemeyer Wolfram Research
From: Ray Koopman on 13 Nov 2009 05:58 Shouldn't your chisquare (in Mathematica notation) be (y-f).Inverse[covariancematrix].(y-f)? Try NMinimize on the mathematically equivalent but computationally better expression (#.#&)[(y-f).u], where u = Inverse(a)CholeskyDecomposition[covariancematrix]. On Nov 12, 3:02 am, L.J.A.Vasq...(a)warwick.ac.uk wrote: > Hello. > > I want to perform a nonlinear model fitting on data points with some > significant correlations in them. > For these correlated data points, the definition of chi^2 is > > chi^2=Sum_i Sum_j [ y_i - f(y_i) ] * [ y_j - f(y_j) ] / Covariance(y_i, > y_j) . > > Currently, I am using the Mathematica function "NonlinearModelFit" which > unfortunately only assumes statistically independent data points and does > not allow to incorporate correlation in the data points when estimating > the best fit parameters. > > I have looked at other data fitting functions such as FindFit and even > GeneralizedLinearFit but i haven't found one yet that takes into account > correlated data. > > Maybe i am missing something. Is there a way to perform a nonlinear fit > for a correlated data points? Is there a way to change how the chi^2 is > being defined in any of the Mathematica fitting function? Perhaps, there > is an additional Mathematica package that is available and deals with this > problem. Any help is most welcome. > > With my best regards, > -- > Louella > __________________________________ > Louella Judy A. Vasquez > Department of Physics and > Centre for Scientific Computing > University of Warwick, Coventry CV47AL > United Kingdom > > PHONE: +44 (24) 765 74309 > MOBILE: +44 790 4336687
|
Pages: 1 Prev: kernel crash with integrating the derivative of an Next: Importing Excel File into mathematica |