Questions on the use of Mathematica to construct models for approximating empirical data.

learn more… | top users | synonyms (3)

1
vote
1answer
45 views

LinearModelFit: Standard error or Standard error of the mean on the slope

I have generated some data points for y = 2x equation. Both x and y have SD of 1 using normal distribution. Now, I can fit the result with LinearModelFit. ...
1
vote
1answer
72 views

LinearModelFit: How to compute R-squared? [on hold]

Is there a simple way to computed the R-Squared(adjusted and not adjusted), from the LinearModelFit? It has so many options, but none for the R-Squared, that I suspect there's a simple way to compute ...
1
vote
1answer
62 views

Fitting bivariate data using FindFit [on hold]

I am trying to fit the following bivariate data set using the FindFit function: ...
-2
votes
0answers
45 views
3
votes
2answers
55 views

Problem with FindFit: Low quality of estimated parameters

I'm trying to fit a Cole-Davidson formula: ...
5
votes
2answers
105 views

Linear fit with conditional noise distribution

I need to fit a linear model of the form $y_i = a · x_i + b + e_i$. The $e_i$ are independent noise from a distribution that depends on $x$ as well as on global parameters of the data; however, the ...
2
votes
1answer
96 views

Find a family of curves

I have a diagram with seven curves (each with a different parameter). My goal is to find a function for the family of curves (i.e. a single function not just for the seven parameters, but for all ...
0
votes
1answer
71 views

How can I calculate the root of any order of power series

How can I calculate the root of any order of power series with Mathematica. Here I insert every quantity by hand. But I want to give a, ...
1
vote
0answers
44 views

x and y axis nonlinear error fit possible? [duplicate]

I have a set of datapoints with x (position) errors as well as y (measurement) errors. Is there a way in Mathematica to fit a nonlinear function through this points, with weighting both, the x and y ...
22
votes
3answers
763 views

Exponential fitting - isn't actually a BUG there?

There are many questions on this site about wrong exponential fitting in Mathematica but no one considers this well-known problem as a potential bug. Usually people suggest well-known workarounds ...
6
votes
1answer
247 views

Findfit does not find the best fit

I am working on a project that needs curve fitting. The experimental data should be fitted with a model that calculated with an integration equation. At first, I enter my experimental data ...
0
votes
1answer
90 views

How to fit parameters, not functions?

Given a set of parameters ...
2
votes
0answers
41 views

How to realize Global Fitting with shared parameters, same as OriginPro9.0?

I have an experimental data from Michelson interference and I can fit the envelope in OriginPro9.0 using Global Fitting with shared parameters. The figure by OriginPro9.0 is like this: However, I ...
1
vote
1answer
51 views

Paramter Scans and $\chi^2$ Test in Mathematica

Is there any in-built function or a recommended package that enables one to find, say, 10 Parameters, which are used as boundary conditions in NDSolve, that minimize $\chi^2$? ...
12
votes
2answers
389 views

Fitting a curve to an image object: not a superellipse, not an egg curve.. what else?

I'm facing the problem of quantifying the morphology of objects with such a shape (nannoconids... they are fossils). One of the final goals is to produce a solid of revolution and compute ...
0
votes
2answers
61 views

Getting image data values with coordinates in circular region

I have a number of gray level images (600, with size: 2400x2400 pixel, small instance see above). In this image there is a circular region of interest. The aim is to fit a function to the gray value ...
2
votes
1answer
49 views

Fitting data in Log-Log scale

I want to fit my data from a txt file to a curve in log-log scale. What I tried to do was this: ...
4
votes
0answers
86 views

Fitting data with unique variable per measurement

Imagine we are in the following situation, we have a nonlinear system of functions $f$ with coördinates $x_i$, and unknown parameters $\delta_i$'s and $t$. Let this system be defined as, ...
0
votes
0answers
31 views

How to calculate a required definition only once for each iteration of NonlinearModelFit

This is my first post here. I've been using Mathematica for about 4 years now to analyze data, but am still very new and have no background in formal programming. This is the first question I couldn't ...
1
vote
1answer
68 views

How to improve the nonlinear fit to a data set [closed]

Some data to begin with ...
1
vote
0answers
47 views

Multivariate FindFormula? [on hold]

I am using Mathematica Online and want to do FindFormula with two independent variables, but I cannot figure out if it's possible and if so what the syntax is. Here's my dataset: ...
0
votes
2answers
70 views

Find the linear combination of two functions to fit to a third

I have been trying to solve a simple enough problem, but I can't seem to find the proper method. The problem is given as, Find 0 < x < 1 for which, h(t) $\approx$ (1-x) f(t)+x g(t), where is ...
1
vote
0answers
49 views

Fitting with constraints including the independent variable

I would like to write the following statement: data2fit = NonlinearModelFit[data2, {a Sqrt[b x + c] + d, b x + c > 0}, {a, b, c, d}, {x}] However, it returns ...
0
votes
0answers
89 views

Find the (gaussian) function to fit a series of points?

I have a series of measurements for concentration of pollutant on a river C(x,t) where x is the location on the river and t is the timestamp. When plotted these data suggests a bell curve like Gauss ...
2
votes
2answers
134 views

Multiple regression curve fitting

I've got some data with 2 independent variables and 1 dependent variable I'm trying to fit a curve to. I'm really kind of a dummy with Mathematica except for the most basic things, so I looked ...
1
vote
0answers
58 views

Deriving ordinary least squares (OLS) in matrix form

How can I instruct Mathematica to derive the OLS in matrix form with respect to $\beta$ and obtain the result ${-2X}^{T}(y-X\beta)$? The matrices have the following dimensions: $y_{n \times 1}$, ...
3
votes
1answer
117 views

How to get the `“AdjustedRSquared”` from `FittedModel`

This my result of model fit: ...
5
votes
0answers
92 views

Multivariate Adaptive Regression Splines (MARS) - Mathematica implementation?

Does anybody have or know of a Mathematica implementation of the Multivariate Adaptive Regression Splines (MARS) algorithm?
1
vote
0answers
101 views

Fitting data to an Normal Inverse Gaussian distribution

I am using data which I suspect is distributed according to the Normal Inverse Gaussian distribution (NIG). The literature says that the 4 parameters of the NIG can be estimated from the sample mean, ...
6
votes
1answer
68 views

Simulated Annealing, SearchPoints and InitialPoints options set at the same time

I have a function that needs to be minimized. Since the function depends on real-time data (which is fetched every few hours, and the function is redefined according to the new data), I have to run ...
1
vote
0answers
45 views

polar form of generalized superellipse (not Gielis formula!)

I am looking for the polar form of the following generalized superelliptic shape such that I can use it with NonLinearModelFit for curve fitting to data: $$ \left ...
3
votes
1answer
101 views

Why is TimeSeriesForecast linear?

When I use FinancialData with TimeSeriesForecast, the resulting graph is always linear and thus not very accurate. ...
0
votes
1answer
72 views

FindFit and log norm function

I'm trying to fit a function to data using FindFit, but I can't find a way to replace norm function RMSE with a RMSE in log space: ...
3
votes
0answers
52 views

Fitting real and imaginary parts of a function

I have an analytic form of a function G[w_] = -I*z0*w/(1 + I*z0*w*a) I know this function can be obtained (up to some overall normalization) from solving a ...
6
votes
2answers
206 views

Fitting does not work

I have a set of points, which is basically one minus a Lorentz curve. And the NonlinearModelFit ...
2
votes
1answer
77 views

Fitting a set of functions using same basis functions

I am trying to fit the functions in the plot below, but I need them to be fitted using the same basis functions. I want to interpolate between the functions by interpolating between their ...
1
vote
1answer
60 views

Boundary parameter in Beta Distribution

I use EasyFit to find the probability distribution of my data. It turns out the data follows BetaDistribution with 0.54022,0.70601 shape parameters and 1.33,6.83 continuous boundary parameters I am ...
0
votes
0answers
47 views

Iterative process of least squares solution

I'm doing an inversion of gravity data in which the least squares solution is: V^(k+1) = V^(k) + Inverse[W].(Transpose[A.(Inverse[W])]).α; where ...
3
votes
1answer
47 views

Displacement around the x axis, how to change a function location

While plotting a function I want to change the location of x. I am doing a regression with the logistic function ...
1
vote
1answer
71 views

Data fitted by two linear fits [duplicate]

can anybody help me please and tell me how to fit my set of points by two linear fits? It is always exactly two of them and are always linear and should cover all the data. The second line should ...
0
votes
1answer
56 views

problems of Lorentizan fit with Nonlinear fit model [closed]

I tried to do a Lorentzian fit for a Spectroscopy data.I found that I have to actually give the precise value for this fit.[i do not like to call this as fit ,if that is the case]? Am I missing ...
0
votes
1answer
79 views

What´s wrong with my FindFit

I updated the data which is a table I deleted the first coordinate as it was the quote from the document. ...
0
votes
1answer
72 views

Invert and fit implicitly defined curve

I need to fit an implicitly defined curve. I thought I could get some data out of Solve, and then using FindFit. Therefore, I ...
1
vote
0answers
77 views

Fitting in Mathematica: Which function? [closed]

in other programs, there is a possibility to take a data set and to find the function which fits best. Is there also such a possibility in Mathematica? I only could find ...
2
votes
2answers
91 views

NonlinearModelFit gives imaginary numbers [duplicate]

I am having trouble using NonlinearModelFit to fit to data generated by the equation I am trying to fit to. ...
1
vote
1answer
89 views

Is there a built-in function implementing the minimum and maximum gradient?

Suppose I have a set of data. Mathematica has fitting functions to determine the line and corresponding equation to the best fit given any arbitrary set of data. But in experimental techniques, ...
1
vote
0answers
49 views

Fitting data using ParametricNDSolveValue and NonlinearModelFit [closed]

I'm trying to evaluate the kinetics of the chemical reaction. For that I need to fit my experimental data to the kinetic equation. These are my steps in Mathematica. ...
1
vote
0answers
69 views

Detecting and measuring an ellipse in a glaucoma photo? [duplicate]

I've tried the solutions given in How to find a circular object in the image glaucoma? to detect the ellipse, but the detection results are not quite what I wanted. In glaucoma we have a cup to disk ...
12
votes
2answers
1k views

Detecting an ellipse in a glaucoma photo

For glaucoma diagnosis it is common to determine a "cup to disk ratio" which compares the diameter of the optic disk (VDD) and optic cup (VCD). The optical disk is visible as a circular red feature ...
2
votes
1answer
144 views

Fitting to the system of equations with no analytical solution

I'm trying to fit linear combination of 2 functions to my experimental data set (it represents voltage of 2 photodiodes - Voc1 and Voc2 - connected in series under illumination - S) ...