# Tagged Questions

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

87 views

### Find fit does not find the best fit

Here is my data ...
81 views

### How to make a twice-differentiable function that approximates some data?

I have some time series data that I would like to approximate with a twice-differentiable function. Each time series has ~10,000 datapoints, so I definitely do not want a function that passes through ...
46 views

### Fit linear data with weights for y and x in LinearModelFit

I am quite new using Mathematica, I hope someone could give me some help. I have a set of {x, y} data and I have a list of {deltaX, deltaY} standard deviation. I would like to fit my data taking into ...
82 views

### Apply NonlinearModelFit to an image

I have several images (in FITS format), which I want to fit with a 2D-Gaussian distribution. The problem is that NonlinearModelFit expects data in the form of a ...
77 views

### FindDistributionParameters gives an error for a mixture of user defined sinh-arcsinh distributions

I have some data (1593 values). I first binned it using the Knuth rule and fitted a function that is a linear combination of two sinh-arcsinh functions. I then ...
225 views

### ODE fitting to dataset

So, I have a ODE system, it is a complex biochemical kinetic mechanism with six species changing over time. ...
88 views

### Fitting data to plot using errors as weights

I have some enzyme kinetics data that I want to fit to the Michaelis-Menten curve in order to obtain the kinetic parameters of the enzyme. Is it meaningful, statistically and functionally speaking, ...
52 views

### Solve an integral equation: to fit the given data with an integral of two functions?

I am trying to find an efficient way to solve the following equation $$h\left(b\right)=\int_{0}^{b}f\left(\frac{b-c}{1-c}\right)\frac{g\left(c\right)}{1-c}dc$$ where for $h(b)$ I have the data ...
135 views

### Intersection of a ListPlot3D surface with a plane

I'm trying to use Mathematica to analyze some physics data from an experiment, more precisely, I have to fit a 2D data series with a one dimension function. At the moment I'm able to load and plot ...
109 views

### non linear Least Squares with model function given by ODE's

I have to fit to experimental data a model function given by a linear combination of functions y1(t) and y2(t) a1*y1(t) + a2*y2(t) with a1 and a2 ...
46 views

### FindFit returning Power::infy: Infinite expression

So, I'm having an issue trying to fit some data to a function with a 2nd order pole. I know there are other functions that fit the data, just fine ... but the model is from the literature, however the ...
59 views

### Investigating the correlation between this 2 set of data

The picture below shows the growth of the traffic and the total number of published articles on that website. Which functions can I use to investigate if there is a correlation between them? Both ...
63 views

### How can I plot more regression trend line in the same graph?

I would like to do something like the example I drawed manually: ...
73 views

### Traffic growth forecast: showing the change of linear regression

The following picture shows a changement in the trend of data. (The data used are available here). Is there any tool that can show this change of trend? Until now I managed to show even more ...
215 views

### TimeSeriesModelFit incorrect?

I am trying to determine the optimal model for time series data (1592 observations). When I run TimeSeriesModelFit, Mathematica selects $AR(1)$ model, the estimated ...
245 views

### How to Fit experimental data with 4D ParametricNDSolve?

Let me first explain the background problem. I'm trying to solve a problem with a projectile motion in 4D such that the position vector is: $\boldsymbol{r}(t)=\boldsymbol{r}[x(t),y(t),z(t)]$ I have ...
102 views

### Custom Methods for NMinimize/NonLinearModelFit

Is there a way to write custom methods for NonLinearModelFit or NMinimize? To give background, I currently have a batch of code ...
119 views

### NonlinearModelFit and plot with multiple parameters function

i ve got quite simple function: $f(t) = x1 * a(t) + x2 * b(t)$ and table of results like this one: t | f(t) | a(t) | b(t) ---------------------- 1 | 2 | 5 | 3 ---------------------- 2 | 4 ...
56 views

### Fitting a vector-valued model using Mathematica

I'm wondering if there is a way within Mathematica to perform some kind of parameter fitting on a vector-valued model function (in this case a model of electric field vectors). Essentially what I want ...
84 views

### How to do linear fit for 2D data points [closed]

I am very much new to Mathematica, and facing several difficulties. I used the following code Fit[{2, 4, 6, 8}, {1, x}, x] The output is ...
86 views

### Computing a Gamma function-Gaussian integral

I would like to compute the following function: Integrate[Gamma[k,0,Exp[-2 e x^2]],x] k is an integer and ...
64 views

### How can I use NonlinearModelFit with multiple variables? [closed]

I am trying to find the coefficients for following equation: $\quad \quad f(x,\,y,\,z) = a (x^2)\, exp(b x + y^2) + c z^2 y$ using NonlinearModelFit. But I can't ...
34 views

### How does LinearModelFit handle cases where the design matrix rank is lower than the model terms?

So, I understand what this error means: ...
103 views

### Interpreting P-Value on ParameterTable

When using LinearModelFit[] we can generate a table of parameter values and statistics for the corresponding model using the property "ParameterTable". Looking in the documentation I can't find an ...
298 views

### Find fit of an experimental PDF

After quite some struggle, I managed to put up a code that is syntaxically correct. The goal is to find the parameters for a gamma distribution that best match experimental data. The data is a set of ...
559 views

### Difference between Fitting Algorithms

I am new to Mathematica, and I don´t quite understand, what the difference between the fitting algorithms Fit, FindFit, ...
199 views

### How to fit parameters in a system of coupled differential equations

Problem description: I'm studying a chemical reaction that can be modeled by a system of coupled differential equations, and I want to use measured data to determine the parameters that appear in the ...
463 views

### How to fit a surface to 3D data in Mathematica?

I have a set of data coordinates which is mostly compatible with an Ellipsoid: {{x1,y1,z1},{x2,y2,z2}, ... , {xn,yn,zn}} Now I want to find the best 3d volume ...
101 views

### How can I get the coefficient of the exponent from a nonlinear model fit?

I have been trying for over an hour now to get the numeric value for "HalfLifeN" from the code in the screenshot below. Not to mention mathematica simplifies ...
42 views

### Using Check[] on multiple statements

I am using a loop to run run multiple fits. If a fit fails, I don't want it to either appear in my data or to affect later fits so I am using the Check[] function to catch if any errors occurred (I'm ...
55 views

### Is this behavior of DistributionFitTest together with StableDistribution a bug?

I have been using DistributionFitTest to fit the following data: ...
157 views

### NonlinearModelFit: fit a vector-valued function to a data vector

I have a vector of data points: data = 10 Sin[#/10] + RandomVariate@NormalDistribution[] & /@ Range[200]; And I have model that provides the complete ...
115 views

### How to adjust excel data for NonlinearModelFit?

I'm really new to Mathematica and I'm facing a problem and would really appreciate some help! Maybe my question is similar to one described in How to fit 3 data sets to a model of 4 differential ...
52 views

### Convert Dates to values on an X axis

I have a bunch of dates and values which I put into the DateListPlot to get a graph. However I would also like to put this information into the Fit or LeastSquares to estimate what the value would be ...
32 views

### How to use FindFit to find the parameter in Laplace space(numerically inverting Laplace transforms)

I am trying to find the parameter in Laplace space, and a very simple example is shown below: I have known the solution $y_{laplace}$ in the laplace space is $a/s^2$, and I also have some discrete ...
311 views

### How can I improve my prediction for the end time of the Reddit button game?

There is an April Fools game on Reddit where users with accounts can press a button (once) to reset a 60 second countdown timer: https://www.reddit.com/r/thebutton ...
169 views

### Log Linear Fitting of a data: e.g. {xi,Log [yi]} and plotting the fit

I have a Log-Linear plot, and i'm unsure about how to fit a line to it. The data represents a I (current) vs V (voltage) curve. The exponential portion of this curve (linear in a Log-Linear plot) is: ...
166 views

### FindFit returns “tensors have incompatible shapes”

I'm trying to fit experimental data with FindFit and implicitly calculated function. It seems, that function works fine and satisfactorily approximates data when parameters are fed manually. However ...
76 views

### How to determine a function that fits a geological model

I have a problem. I am currently working on a code that works by comparing data (real or synthetic) to an earth model (described by earth layers, or in this particular, velocity (...
43 views

### Why does ParallelMap throw errors where Map does not?

I am encountering a problem with ParallelMap. I have a call in a large code base, part of which attempts to fit data in parallel using ...
110 views

### Better output for NonlinearModelFit “ParameterTable”

The Standard table fo parameters of NonlinearModelFit is obtained from NonlinearModelFit[{{0, 1}, {1, 2}, {3, 3}}, a + b*x, {a, b}, x] %["ParameterTable"]] I ...
64 views

### Precision of starting values in FindMinimum [closed]

I am currently working on an optimization of chemical kinetic model. Starting points for FindMinimum are defined as: ...
68 views

### Wrong fit with FindFit

I have a set of data (Datax for x-axis and Datay for y-axes) to fit to a sigmoidal function (Hill type). While Origin gives me the right answer, Mathematica does not. The fit values given by Origin ...
45 views

### Fitting an ellipse to data with a special constraint [duplicate]

I have a bunch of x,y scatter data and I am trying to fit an ellipse through them. I understand there are solutions for the fit where the data points are defined for a full or partial ellipse. ...
73 views

### ANCOVA (ANalysis of COVAriance)

I have two time series of the form {time, value} I have linear fits of each set individually, and I am interested in the statistical differences between the ...
120 views

### Simultaneously fitting two data sets to two functions is too slow [closed]

I have to fit two data sets to two functions(eps1,eps2) with same parameters (w0,f,g) Initially, I know only one function ...
176 views

...
70 views

### Curve fitting of a list and exclude some figure

I am a fresher of Mathematica and trying to program a list of digits. When I plot the diagram of the list, it shows that the figure at 12 is much larger than the others. Does anyone have idea on it? ...