Questions tagged [fitting]

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

Filter by
Sorted by
Tagged with
1
vote
3answers
95 views

Fittings of three equations

Can you help me to do the fit for the following equations to obtain the values of $a$ and $b$. {20.7 == a + b/(5^4), 28.62 == a + b/(6^4), 32.04 == a + b/(7^4)} ...
2
votes
3answers
69 views

Solving ODE System and Estimating Parameters with Experimental Data

I am new to Mathematica. I am trying to find out the best-fit values of the parameters appearing in an ODE system of three equations. The three ODE equations are: ...
1
vote
1answer
76 views

Is it feasible to curve fit to a staircase function? [closed]

Taking as a starting point the advice given in this post I am trying to fit data to a staircase function as follows: ...
6
votes
1answer
104 views

Mathematica slow at estimating vector autoregressive model parameters

I have been trying to obtain VAR model parameters using EstimatedProcess and FindProcessParameters. It seems to take a very long time as soon as I have more than 6 or 7 time series and lag length >2. ...
4
votes
0answers
35 views

How can I get the standard error of parameters from FindFit?

I used FindFit with Norm function as written below. ...
1
vote
0answers
30 views

How to perform a 2D-multi-peak fitting?

I am wondering how to decompose the data[x,y] into several elliptic-shaped functions, i.e. $f[x,y]=\frac{H}{(1+(\frac{x-x1}{a1})^2+(\frac{y-y1}{b1})^2)^{3/2}}$. I could follow in 1D case, ...
5
votes
0answers
101 views

What does “Solved to an acceptable level” mean in the context of NonlinearModelFit in M12

I made a simple cosine fit to some data: ...
3
votes
2answers
167 views

How to merge two or more curves smoothly?

I have plotted three curves. For each range of $x$, one of those curves is true. On the other hand, finally, the result must be a unified curve. Is there any command to unify these three curves? ...
0
votes
1answer
67 views

Fitting different data sets with different models and 2 free variables using FindFit

I have a T1 equation from which I got two noisy datasets, one for y=0 (datax) and the other for x=0 (datay) (t is always equal to 1): ...
0
votes
0answers
51 views

Fit piecewise function

I want to fit my data with the following function ...
2
votes
0answers
180 views

How to fit my data with following equation?

I have set of data of electronic specific heat ($C_{el}/\gamma_n T$) vs temperature ($T/T_c$). My fit equation is this $$\frac{C_{el}}{\gamma_n T}=-\frac{6}{\pi ^2}\alpha \frac{\mathrm{d} }{\mathrm{...
1
vote
2answers
59 views

extrapolation data

I need help to extrapolate these data: θ = {20.7, 28.62, 32.04}; ω = {5, 6, 7}; using this equation: θ(ω)=θ(ω⟶∞)+ c /ω^n to know what the values of c and n I ...
0
votes
1answer
41 views

Understanding and solving a problem with FindFit

I have a set of data which I give here ...
2
votes
0answers
31 views

Strange result in LinearModelFit ANOVATable

For one of the models I'm building, the p-value in the ANOVA table obtained from the "ANOVATable" properties of a LinearModelFit ...
0
votes
1answer
65 views

High r square but strong pattern in residuals [closed]

I analyze the development of the total number of users over time. It is obvious that a linear regression fits the data. The r squared is then also 0.9961. Now the problem: a plot of the residuals ...
1
vote
1answer
61 views

How to interpret TimeseriesModelFit parameters? [closed]

I have problems interpreting the parameters that follow using the TimeseriesModelFit command. The time series exists of twelve months and show a positive linear trend. Using TimeseriesModelFit it ...
2
votes
1answer
98 views

how can draw a scatter plot with a regression line across regions using Manipulate[…]

I have the following code: ...
3
votes
2answers
207 views

Levenberg-Marquardt method for fitting

I have a model function: ...
0
votes
0answers
64 views

Fit a three-pulse sequence

I am wondering how to properly fit the three-pulse sequence shown below. I have tried a method which is fitting the three pulses with three polynominal functions seperately and then finding the x-...
2
votes
3answers
125 views

FindFit refuses to work properly

I have the following simple task at hand: given the data ...
1
vote
0answers
65 views

Big Confidence Interval for seemingly rather accurate variable, NonLinearModelFit [closed]

I used NonLinearModelFit to fit a function of the form a*Abs(Cos(x))^b to a set of 5 points, that each have a uncertainty. My ...
0
votes
1answer
55 views

Parameter space for a class of problems

I have some simple equations like p1=(9x+30y^2+28z)/Sqrt[x^2+y+z^3]; p2=(90x+30z)/Sqrt[x^2+z]; p3=(76x^2+57y+z)/z; p4=(5x+36y) Now I have the range of p1,p2,p3,...
0
votes
0answers
40 views

Fitting CauchyDistribution to data list to determine peak

I have a list of data in the form like this {{-3,12},{-3.01,13.4},{-3.04,13.6},...} where the x value is time and the y value is current. FindPeak gives me peaks for everydata point i have and ...
1
vote
0answers
41 views

Find a differential equation from data set

I'm trying to fit a differential equation to a large dataset, but I'm not achieving anything. This is my dataset and my differential equation/model is ...
0
votes
0answers
41 views

Predicting value outside data set

I have a list with values at some points: ...
5
votes
4answers
233 views

Fitting a curve between two sets of points

If I have two lists of points ${x,y}$, say list1 and list2 and I need to find a continuous function $y(x)$ that goes above all ...
0
votes
0answers
33 views

LinearModelFit with predefined coefficients

I want to use an estimation procedure different from OLS (say, LAR or LASSO), but then use the LinearModelFit to produce all the diagnostic statistics. Can I make LinearModelFit or the FittedModel ...
0
votes
1answer
82 views

Transform function {a,b} ->{x,y} ; how to?

I have a 2D list of values that I want to transform/calibrate to another 2D list. I thought of using a predict function but I couldn’t get it to output 2 values. —...
1
vote
0answers
83 views

Measuring Degree Correlations of Networks

I'm trying to write a program that will measure the degree correlation of the network. The theory is here (page 8). I've written something like this up to now: ...
5
votes
1answer
286 views

Why is slope of my linear fit the wrong sign for my data? [closed]

For my lab, I have to fit a line to a linear set of data. Pretty simple. I've done it before with good results using the Fit function. Well this time it didn't work--as the picture below shows, the ...
0
votes
0answers
27 views

Define a delayed function with tested patterns for fitting

This question is a variant of "Define function using variable list" Fitting functions require a model function defined in terms of explicit symbols that should only evaluate given numeric inputs, and ...
9
votes
2answers
525 views

Fitting data in polar coordinates

I have some data in polar coordinates: ...
2
votes
1answer
52 views

Calculate and plot mean values of pairs of data points

I have a list of data points where there can be multiple y values for a given x value, e.g., {{0, 4}, {1, 2}, {1, 3}, {2, 3}}. I would like to Take the mean of the y values for each x value. Get a ...
0
votes
2answers
99 views

Non linear fit data

I am trying to fit this data with this two models. In the first one, the solution is too far from the exact values. In the second one, there is an error. Could you please help? ...
1
vote
1answer
87 views

Logistic fit of data

I would like to use LogitModelFit to find the logistic function to my data. The error I obtain is LogitModelFit::binrsp: The response values are expected to be ...
0
votes
2answers
97 views

How to correctly show the slope of a linear part on LogPlot

I need to plot an Interpolation function of one independent variable (only a 3kB file) on LogPlot and show the slope of its linear part together on the ...
0
votes
1answer
54 views

Why does the FindFormula result contain Abs in result?

If you look at the first example of FindFormula, why is the result Mathematica produces showing an Abs? Table[{x, N[x Sin[x]]}, {x, 0, 4, .3}] FindFormula[%, x] ...
1
vote
1answer
61 views

Restricting a function to prevent divide by zero errors when used in NonlinearModelFit

I have a function which I would like to fit to some data: $$f(\nu) = \sqrt{\left(\frac{A^{2} (\nu \cos(2 \pi T \nu_{0}) \sin(2 \pi T \nu) - \nu_{0} \cos(2 \pi T \nu) \sin(2 \pi T \nu_{0}))^{2} }{\pi^{...
0
votes
1answer
62 views

Approximating missing data points in a list using fit models [closed]

Suppose I have the following list: l={0, 76, 413, 942, 1344, 1651, 1486, 1013, 581, 237, 65, 17, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} I want to find a fit ...
0
votes
0answers
42 views

Get R^2 value between interpolating functions and a list of points

I am looking to compare the degree of accuracy of a theoretical model by comparing my theoretical curve to my experimental data points. My theoretical curve is an interpolating function generated ...
0
votes
0answers
68 views

How to fit a spline (not interpolate) through points in 3D?

I have coordinates of points in 3D and want to fit a spline through these points. I found a least square approach for 2D case: https://demonstrations.wolfram.com/...
2
votes
1answer
73 views

NonlinearModelFit won't fit to gaussian data

The form I'm using should be correct because when I input my initial guesses it plots a shape similar to my data. When I use NonlinearModelFit, the fit is not correct at all and is almost flat, then ...
1
vote
0answers
44 views

FindFormula: can I change the standard TargetFunctions?

FindFormula seems to have a limited number of TargetFunctions: Possible functions for TargetFunctions are Plus, Times, Power, Sin, Cos, Tan, Cot, Log, Sqrt, Csc, Sec, Abs, and Exp. Is it ...
3
votes
3answers
147 views

How to fit spline through points in $ \mathbb{R}^3$?

I have coordinates of points that represent a curve (for example, helix or centerline of moebius strip) in $ \mathbb{R^3}$. I want to fit a Bspline through these points. How to do this in Mathematica? ...
3
votes
3answers
214 views

Linear fitting without intercept

I want to fit the following model: $y_t=\beta x_t+\epsilon_t$ For that, I've tried the following ...
1
vote
1answer
44 views

How to add constraints to “Fitting unknown number of Gaussians to data”?

This question of how to fit a sum Gaussians, where the number of Gaussians is to be determined, to data is answered nicely already by Fittting data with combination of an unknown number of Gaussians, ...
0
votes
0answers
45 views

A curve fitting by two Lorentz function

I am trying to fit my curve by two Lorentzian functions but i could not fit it properly, i found a lot of examples about Lorentzian fitting but none of this work with my data. Here is my code what i ...
0
votes
1answer
43 views

How to find the Maximal Absolute Error?

I found this fit but I do not understand how to find the maximal absolute error nor do I understand what it is really. I do not see what it is I would compare, would it be ...
0
votes
2answers
52 views

What are equations on mathematica and differences between these errors? [closed]

These are the three errors I was given. I so far wrote the code which was computing the polynomial interpolation but now I am asked to find those three norms: norm error mean norm error maximal ...
1
vote
2answers
83 views

How to fit different parts of a log-log plot

I have data of a function that goes like $f(x)\propto x ^\alpha $ for a certain range of $x$ and like $f(x)\propto x^\beta$ for another one. It is common in the literature to make a log log plot and ...

1 2 3 4 5 25