Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
0answers
21 views

Mystifying failure of NonlinearModelFit

Fitting the following two time-series (two repeats of the same exponential growth process) ...
0
votes
0answers
24 views

Fitting to a power law — is there any reason to fit a line to the log of the data instead? [on hold]

Let's say I have some data I think follows a power law of the form $y=a x^b$. Obviously I can use NonlinearModelFit[] like so: ...
0
votes
0answers
29 views

NonlinearModelFit indeterminate or not a list of real numbers

I'm trying to fit my data using NonlinearModelFit but keep getting errors that I don't quite understand how to correct ...
0
votes
0answers
40 views

I have the best fit, How can wiggle a plane between the max and min errors [on hold]

I have a table representing 3 dimensional data, I have found the plane of best fit but I now want to move the plane of best fit through the maximum and minimum error and display the planes current RSS ...
3
votes
1answer
82 views

Troubles with FindFit for ODE

I need to use FindFit for ODE with arbitary number of parameters. This code (from documentation) works: ...
0
votes
1answer
68 views

Fitting data with inclusion of constraints

How do I find a fit for the dataS (see below) with the constraint that the parameter np is an integer, and that the parameters la+lc = 100. A weak attempt at this is provided below for a specific ...
9
votes
1answer
417 views

Curve fitting by running through hundreds of models and return the one with best fit

In the past, I used to solve a lot of my regression analysis (curve fitting) problems with a program called DataFit which runs on Windows. It has hundreds of regression models which it runs through in ...
0
votes
1answer
79 views

Fitting data to a circle with FindFit

I'm currently trying to use the Mathematica's FindFit command to fit a curve of some data to the bottom half of a circle. The data is of the form ...
5
votes
1answer
146 views

Forcing NonLinearModelFit through a point

Like the title says, is there a way to make an NLM fit pass through a specific point.
0
votes
0answers
35 views

Using List/Histogram Data As A Weighted Function?

I have a list of data points that I would like to use as a weighted fucntion. The data represents the number of particles within a bin of a particle distribution. Ultimately I would like to multiply ...
0
votes
0answers
73 views

Non linear curve fit

I am trying to fit a non linear curve to my data which looks like following The code I am using is following. You can see I have six unknown variables ...
2
votes
1answer
51 views

Is there a way to show some “weighted” residuals after LinearModelFit?

I am fitting some functions to some data and then I want to analyze the residuals of that fit. I'd like to see how those residuals compare to the values of the original data, hence my "weighted" in ...
0
votes
2answers
59 views
0
votes
0answers
46 views

Can not understand the code to join points into line segments

I'm reading the CDF file from Making Formulas… for Everything in wolframalpha blog. It's hard for me to understand the In[17] code of function pointListToLines. I especially want to know what the use ...
2
votes
1answer
55 views

BSpline or other curve through arbitrary ordered sequence of two-dimensional points

How does one create a BSplineCurve or other smooth curve passing through each point in an ordered list, where the curve may be non-simple, i.e., can double-back upon itself, loop, and so forth as for ...
3
votes
2answers
133 views

Best fit equation from a scanned image

I am trying to extract a curve from a scanned graph and find a best fit equation. For example, starting from: How could one find an equation starting from the image file ?
1
vote
0answers
24 views

Error associated with parameters in Minimize (or NMinimize) in discrete fitting

my problem goes as follows: I need to a discrete fit of a discrete function. Say I have the following made up data points, which are generated by the parabola ...
0
votes
0answers
73 views

Multi-peak fitting

Suppose we have a data set that looks like this: I have to fit this data to 9 peaks knowing μ and σ beforehand & have to ...
1
vote
0answers
58 views

Updating procedural fitting algorithm to more efficient style?

For some time now, I have used this procedural programming approach to fit data in my research that is too cumbersome for the built in Mathematica functions. (Although this simple example works fine ...
0
votes
1answer
61 views

Equation of line from loglog plot

Given some data that looks linear on a ListLogLogPlot, how can I find the correct equation (and particularly, the correct slope of the line)? I have a sample code here ...
0
votes
0answers
32 views

How to perform a distribution fit test to censored data

With following code I will get an error: ...
-1
votes
0answers
47 views

Non linear Model Fit error [duplicate]

I am a chemistry student, and I am trying to fit a isotherm for physicalchemistry, for some reason I cannot do it... This is what I've done: data = {{0.617, 0.8}, {0.605, 0.6}, {0.5997, 0.4}, ...
0
votes
0answers
75 views

Curve fitting of a list

I have list obtained using an integrals. I want to obtain an analytical formula that fits my list using curve fitting. Please suggest a simple analytical structure that fits my curve. ...
3
votes
1answer
75 views

Remove redundant parameters from equation

I have random expressions like (b1 x + b2 x)/(b3 + b4/b5 x) + Sin[b6 x] where $x$ is a variable and {b1, ..., b6} are parameters to be fitted. This expression is ...
0
votes
1answer
65 views

Non linear model fit

I need to fit this, but for some reason I cannot... data = {{0.617,0.8}, {0.605,0.6}, {0.5997,0.4}, {0.5972,0.2}, {0.5985,0.1}}; soln = NonlinearModelFit[data, {y - 2478.82*wlog[kc + 1]}, {y,w,k}, ...
0
votes
0answers
53 views

Using FindFit to return a list of possible best fits

Can I use some variant of FindFit that will return a list of the best fit and some worse fits, not just the best fit? This is for a function where the residual function can have several local ...
5
votes
0answers
99 views

PenaltyFunction Option in NMinimize

I am curious if anybody has some experience in using the built-in Option "PenaltyFunction" in any of the numerical optimization functions like NMinimize. According to the documentation the user ...
1
vote
0answers
46 views

Findfit doesn't provide reasonable results when fitting a complex function [closed]

I am trying to fit some data using the function which contains two parameters (a, b) as described below. Hope to determine the a, b that best fit the data. My input is: ...
3
votes
0answers
50 views

How to derive SinglePredictionBands from a NonlinearModelFit model

I have found NonlinearModelFit to be extremely useful in my work. Here I have fit 4 points to a function and am being asked to explain how the 95% SinglePredictionBands associated with the plot below ...
1
vote
0answers
51 views

Simultaneous fitting to multiple data sets with multiple variables and some common parameters

I am trying to fit two data sets to a function model described below which share a few common parameters. Say I have two functions with some common parameter(s) ...
1
vote
0answers
36 views

Plots to check all assumptions of linear regression

I'm running a linear regression with LinearModelFit and would like to plot graphs to check the assumptions of linear regression: linearity, independence of the ...
2
votes
1answer
62 views

Struggling with FindFit

I'm trying to fit a sinusoidal wave to some numerical data. I can do it by hand using manipulate, so I know roughly the sort of parameter values that I should get back, but functions such as FindFit ...
6
votes
2answers
108 views

2D smoothing spline interpolation

Does Mathematica have 2D smoothing spline interpolation built in? I requires an interpolation method with smooth first derivatives and cubic bivariate splines fulfill this nicely. In python I would ...
5
votes
3answers
335 views

How can I obtain a smooth curve from my data but preserve two inversion points

I have a list of data points, {x, y}, my data. When I plot them, the curve is jagged. I want to smooth the curve and preserve the two sharp corners. This is a plot ...
1
vote
0answers
40 views

How to regress negative log? [closed]

I made a regression using Linearmodelfit. The residual-fit plot showed that this was not a good approximation. Now I'm trying to use Nonlinearmodelfit. I assume my data to have a negative log look. ...
0
votes
0answers
49 views

Fitting a plane from a set of (x,y,z) values with uncertainties on 3 variables

I would like to fit a plane from a set of measurements (x,y,z) with uncertainties on the 3 variables. Currently I am using the command "LinearModelFit" that computes the best plane but I have a ...
10
votes
1answer
631 views

Curve fit based on minimal data

Inspired by the fantastic answers here and here, I would like to ask a questions along similar lines. I have 6 curve types that follow these rules: Type A: If point 1 is positive and point 2 is ...
13
votes
3answers
613 views

Fitting ellipse to 5 given points on the plane

Five points are required to define a unique ellipse. An ellipse has five degrees of freedom: the $x$ and $y$ coordinates of each focus, and the sum of the distance from each focus to a point on the ...
1
vote
0answers
29 views

Non-aggregated solution for NonlinearModelFit [closed]

I try to fit a rather simple functional form to data, lm = NonlinearModelFit[estdata, a + b*x^2, {a, b}, x] obtaining ...
0
votes
0answers
45 views

Convergence Problem using FindFit

I have the following input where there is a convergence problem in the FindFit as shown in the attached figure.The figure shows 2 plots: one of the real data and the other of the fitted line. Any ...
3
votes
1answer
53 views

Saving data from NonlinearModelFit

If you use NonlinearModelFit the results are put into some sort of output package. How do you save these packages so that you can go back to them later? My particular problem is that I generating ...
1
vote
0answers
77 views

Comparing two ways of fitting systems of ODEs to data

I'd like to ask you if you see any difference between the two following ways of estimating parameters. Given my system of ordinary differential equations that I want to use to find the values of all ...
0
votes
0answers
22 views

Why does my Dynamic NonliearModelFit keep running?

I have complex data and which I am fitting to a complex formula. In order to use NonlinearModelFit I split the formula and the data into real and imaginary parts. As usual NonlinearModelFit is ...
5
votes
3answers
212 views

Finding exponential model from data [duplicate]

I'm trying to find an exponential model from data for a homework problem. There is an accompanying video explaining how to do the bigger problem but it omits any instructions on the step where the ...
1
vote
1answer
113 views

General F statistic and p value in LinearModelFit

Many statistical packages provide a "F statistic" and the corresponding p value in their output of a multiple linear regression. I don't find that in the parameters of the Mathematica function ...
1
vote
1answer
83 views

Fitting composed model to experimental data

I have mathematical model based on equation: $y(x) = 1 - \sum_{b=1}^{\inf} 2c_b \sin(c_b x/L) \exp(ax) $ (1), where $c_b$ are the positive roots of equation: $c_b \cot c_b + aL = 0$ (2). $L$ is a ...
6
votes
1answer
164 views

Using Manipulate to dynamically correct the baseline of a signal

i have data with a baseline and will correct it with a polynomial fit using Manipulate to see immediatly the changes in the resulting spectrum. It works so far, but ...
3
votes
0answers
86 views

Stuck in local minimum in NonlinearModelFit using Simulated Annealing? [closed]

I recorded a set of experimental rates $r = r(c,T,P)$ at 2 values of $c$ and >15 values of $T$. $r(c,T,P)$ obeys the following functional form: $$ r(c,T,P) = ...
4
votes
1answer
178 views

Fitting numerical model to experimental data

I have diffusion equation with the initial/boundary conditions: ...
2
votes
0answers
107 views

Power::infy: error using FindFit [closed]

I have a 2D data to fit (the Airy type pattern from diffraction of Gaussian beam on the circular aperture). Please see the attached picture. I was going to use a function like ...