Questions tagged [fitting]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
51 views

How to find the best quadratic fit for a set of data?

I'm trying to find a degree-2 polynomial fit with x-intercepts of x=0 and x=1 for the below set of data: ...
29
votes
1answer
890 views

How to fit a linear model in the Bayesian way in Mathematica?

Basically, I'm looking for the Bayesian equivalent of LinearModelFit. As of the moment of writing, Mathematica has no real (documented) built-in functionality for ...
1
vote
0answers
40 views

Best Way For Estimating Parameters Of Hidden Markov Process

Parameter estimation is not stable. First, make a model. ...
0
votes
1answer
43 views

Using NonlinearModelFit function with polynomial I have defined

I have a data set that I wish to write a loop for to fit polynomials to. I want to be able to type in the max order polynomial I want it to calculate the fit for and have it solve each along the way. ...
3
votes
1answer
66 views

Choosing the best fit from given plots

I have some data: x={1,2,3,4,5,6,7,8,9,10} y={3.05,21.05,69.05,162.05,315.05,543.05,861.05,1284.05,1827.05,2505.05} That I plot with ...
1
vote
1answer
69 views

Fitting tail of distribution to Generalized Pareto Distribution

Hello, I have a problem in Mathematica and I don’t know if you could help me. I’m trying to compare the “performance” of a Laplace distribution and a Generalized Pareto Distribution (GPD) for the tail ...
2
votes
1answer
51 views

Put error bars in a plot from a non-linear fit together with confidence level

I want to ask you a problem that I have. I make a non linear fit with some data, and I want to know how can I put the error bars in the plot together with the confidence level of the fit that I ...
0
votes
2answers
50 views

FindDistributionParamters vs. NonlinearModelFit for NormalDistribution

I have the following data: dat["Sag"] ={1.277, 1.913, 1.48, 1.472, 1.787, 1.736, 1.896, 1.715, 1.131} I want to fit a normal Distribution to it and get the ...
4
votes
1answer
41 views

Partial and semipartial correlation

I am interested to know if there are built-in Mathematica functions that performs partial and semipartial computations. If not, what would be a simple and efficient way to compute them from the ...
3
votes
1answer
101 views

Fitting a mixture of two normal distributions for a data set?

EDIT: Raw data can be found here: https://gist.github.com/Kagaratsch/65a931d8d78fcdd81f7e346429a02afd Consider the following binned example data: ...
0
votes
1answer
41 views

Fitting nonlinear function does not converge but looks close to best fit

I'm having trouble fitting this transition temperature equation to my data. Physically speaking, the intensity should flatten out for T>Tc, which seems to be the biggest problem here. The equation I'...
0
votes
1answer
70 views

Getting errors from ParametricNDSolveValue

I am a newcomer to Mathematica (use ver 9.0). I just want to fit the experimental data to a system of odes' by using NonlinearModelFit. The data, contains time in the first column and product ...
0
votes
0answers
81 views

Problem with fitting

So I have a very simple question related to a simple topic, but also directly related to a fitting problem. I see that my question is related to this question but I don't manage to make the bridge ...
0
votes
1answer
68 views

Goodness of fit : how to perform weighted Pearson test (or equivalent)?

I wish to perform goodness of fit. Currently I use NonLinearModelFit : ...
1
vote
1answer
52 views

Finding a fit with a specific mean squared error

I have a fit a data set to the following equation ...
0
votes
2answers
90 views

FindFit or Integration Making Use of NumericQ Not Converging

Hello Mathematica Users, I'm using ?NumericQ to solve an integral numerically and then fit the data to give me values for certain parameters. The integrals involved appear in: $$ \alpha = \frac{...
1
vote
2answers
161 views

Dynamic number of parameter fits in Mathematica

I am trying to learn if in Mathematica one can perform fits of analytic functions that are expanded and written as power series. In particular, we can consider the following generic form: $$ f(B,x) = ...
2
votes
1answer
106 views

Why doesn't Mathematica completely draw the fit?

I have a question, and I really need your help, because I think I'm not understanding the reason... I have a potential model.. F[x_] := k x^n for the next ...
1
vote
0answers
39 views

Fitting a Curie-Weiss law function with a diverging point to a data

I would like to fit a function to some experimental data such that the extracted value of Curie temperature (Tc) describes the temperature at which the response flattens out to a constant value. ...
1
vote
1answer
54 views

How to fit a list of points to a certain form given error bands?

I am trying to fit a list of points to the form F[0]/(1 - a*q^2 + b*q^4), where F[0] is the value at zero of a function, which ...
0
votes
0answers
58 views

Why does ListSurfacePlot3D yield a different surface fit than using Python code for best-fit quadratic curve (2nd-order)?

Using the same data, I obtain different surface fits on Mathematica (using ListSurfacePlot3D) and Python (using a code for best-fit quadratic curve (2nd-order)). Here's my code on Mathematica: ...
0
votes
1answer
41 views

How to extract parameters from fitted model for ListSurfacePlot3D?

I would like to obtain the parameters used by Mathematica to create this surface fit of 3d data: ...
3
votes
0answers
43 views

BSpline vs natural spline [closed]

The BSpline in mathematica is defined mathematically here. These BSplines constitute basis for any Spline. But how do I define natural splines in mathematica, i.e. splines that are linear left of the ...
4
votes
3answers
104 views

Tangent point coordinates when the curve is a set of points

I want to find the coordinates of the tangent point between a convex curve and a line that passes from a point with known coordinates (0,b) ("efficient portfolio" ...
0
votes
2answers
56 views

Accessing nonlinear fit coefficients

I have performed a nonlinear fit onto a set of data according to the form $a+b\cos(2\pi x)+c\sin(2\pi x)+d\cos(4\pi x)+e\sin(4\pi x)$. How do I access the best fit parameters $a,b,c,d,e$, store them ...
1
vote
1answer
36 views

Why UnitCovert doesn't work with Fit?

I need to find the Hubble constant (Ho) in light years, from some data, the exercise tells me that the constant of the hubble is the slope of the line. data: r1 is in MegaParsecs. ...
1
vote
1answer
87 views

NonlinearModelFit returning imaginary numbers after fitting real data

I am getting problems when I try to use NonlinearModelFit to fit a squareroot-like function to a set of real data points. Here is the function: \begin{equation} \...
5
votes
2answers
178 views

NonlinearModelFit when the fitting function produces a discrete list of values?

Short Version: I have a parameterized function (the model) that returns a list of values. I have data that I want to fit this model to, optimizing those parameters, where the list position in the data ...
2
votes
2answers
135 views

How to find fit for this plot?

I have been trying to find an expression that properly models the following plot in Mathematica v9.0: I have tried modelling it as odd-degree polynomials using Fit,...
8
votes
1answer
183 views

Fitting multiple data with model and NDSolve with different initial conditions, and other shared parameters

I know that there are already questions about fitting multiple datasets and about NDSolve and about shared and non shared parameters, but I tried to apply them and some things are still not clear. ...
0
votes
1answer
52 views

Fitting system of differential rate equations to data

I am trying to fit a set of differential equations to experimental data, without luck so far. These are the data: ...
1
vote
0answers
27 views

Fitting 2 curves nonlinearmodelfit

...
2
votes
2answers
135 views

How to do an exponential fit for this data?

Whenever I try to use FindFit or NonlinearModelFit for the data (shown below), I keep getting the following error thrown at me: ...
3
votes
1answer
96 views

What is FindFormula returning?

I was playing around with FindFormula and am experiencing some odd behavior. I am running MMA 12.0.0.0 on a Windows 10, x86 architecture - if that matters. ...
0
votes
0answers
27 views

Covariance matrix from FindMinimum

Despite checking for quite some time online and in the docu, I cannot find an "easy" way to get the covariance matrix from FindMinimum. When FindMinimum has reached the local minimum, it returns the ...
0
votes
0answers
44 views

Well calculated Root Mean Square?

I am trying to estimate root-mean-square of data and fitted curve. However, i don't know it is working well or not. Can you guys give me any idea? ...
0
votes
0answers
61 views

find gravity acceleration (g) using FindFit

I need some help again, with this simple exercise: Use the data to determine g, but this time use the functional form T = 2 pi Sqrt[L/g] for the period T of a ...
1
vote
2answers
103 views

Fitting experimental data with a parametric function

How does one use a fitting routine such as NonlinearModelFit with a ParametricFunction? Example below: First let's generate some data: ...
1
vote
1answer
58 views

Help with NonlinearModelFit Error

I would like to ask if anybody can help me to find a way around solving this problem in Mathematica. I've tried solutions I found here but they don't seem to work. I need all the help I can get. ...
4
votes
2answers
120 views

Non Linear Model Fit - Fitting ODE to Data

Thank you everyone for your meaningful contributions! My Goal and Problem I'm trying to fit a particular ODE in a set of ODE's to experimental data. I've attempted to implement this by following the ...
1
vote
2answers
51 views

Estimating the uncertainty in the slope of a straight line given the uncertainty in the data points

Basically I have some datapoints on the form $(x_i,y_i)$ ...
0
votes
1answer
82 views

How to find a formula that models this plot? [duplicate]

Here is the data that I used to get this plot: ...
0
votes
0answers
55 views

Can Mathematica be used to fit these functions related to the Riemann Xi function $\xi(s)$ to a known probability distribution type?

This question is related to my Math Stack Exchange question at the following link: Question on Probability Distributions Related to the Riemann Xi Function $\xi(s)$ The definitions below are for $x&...
1
vote
0answers
43 views

What is optimized for each available FitRegularization setting?

Fit and FindFit now have a FitRegularization option, but the documentation is brief. What is optimized/minimized when each available setting is used?
1
vote
1answer
64 views

Weibull statistics

I have two data sets am interested in finding the weibull modulus and characteristics strength for the two data sets and plotting the data seperately but on the same graph Material (a) 723, 684, ...
7
votes
1answer
230 views

How could this asymptotic expansion be obtained?

I must precise that I am a very limited user of Mathematica (I can only run it from time when going at university). Working this problem, I found that $$\sigma_n=(1)^n\frac{\pi}{2} \big( j_{0,n+1} \,...
1
vote
0answers
48 views

Force FindFormula to avoid Piecewise in the result?

Is it possible to provide any arguments to FindFormula to force it to avoid using Piecewise in the result, but instead try to ...
-1
votes
1answer
45 views

Selecting method and using Abs[] for FindFit

I'm trying to fit the following list data ...
1
vote
0answers
38 views

Getting a PDF from a NonlinearFitModel

With the help of @JimB, I could fit some experimental data with a CDF using NonLinearFitModel. The set of data is the following: ...
0
votes
2answers
64 views

How to generate two non-overlapping LogNormalDistribution and their CDF?

I'd like to know how to generate two LogNormalDistribution with the same standart deviation and, if possible, get the associated CDF. To contextualize, I'm trying ...