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

learn more… | top users | synonyms (1)

5
votes
2answers
178 views

Transforming noisy multivariate data

I’ve been racking my brain all afternoon on trying to solve this… I have a set of noisy co-ordinate data data = {{x1,y1,z1}…..{xn,yn,zn}} that forms an ...
2
votes
1answer
271 views

RSquared Mathematica Excel incoherence

I've done a NonLinearRegression with this data ...
0
votes
0answers
40 views

NonLinearModelFit not generating a model without the use of “BestFit”, not sure why [duplicate]

This is my first time using NonLinearModelFit and I have run into an issue that I can't find an explanation for. The fitted model contains a ...
4
votes
2answers
403 views

Numerical Integration as Model for Nonlinear Fit

I'm trying to do a fit for parameters of a function within an integral but I'm getting errors when I try and run it. Essentially I want the following fit to work out: ...
0
votes
1answer
264 views

Nonlinear model fit and Log Log plot [closed]

I am trying to fit the log of a set of five data points (NOTE: the second coordinate(y coordinate) in each data point is already a log quantity): ...
1
vote
0answers
93 views

Can we ask ComponentMeasurements to use NonLinearModelFit to return a covariance matrix for underlying intensity data?

I'd like to be able to calculate a covariance matrix for some data underlying a morphological component. Provided this data, I can write something like: ...
2
votes
2answers
275 views

How do I find the best fit?

I am trying to solve following system of three differential equations ...
2
votes
0answers
522 views

ParametricNDSolveValue or NDSolve + fitting

I have been trying to find the value for the parameter kestim that yields the best fit of a model to some data points. datac has ...
3
votes
1answer
353 views

Generating a “best fit” curve to a set of noisy data corresponding to a moving object

Please note that this is an extension of a previous question: Interpolating a sparse list of two-dimensional coordinates We have an ordered array of coordinates corresponding to the position of an ...
0
votes
0answers
525 views

How to Output Chi-Squared Statistics when using NonLinearModelFit

I am using NonLinearModelFit for some curve fitting and I was wondering if NLM is able to output chi-squared/leastsquared statistics from the best-fit parameters and confidence intervals. From my ...
1
vote
1answer
107 views

How to find best MLE using `FindDistributionParameters`

This question is an extension of this question, if we change the initial values ...
2
votes
1answer
231 views

Problem with Covariance Matrix Output in NonlinearModelFit

I am running NonlinearModelFit based off of some simulated data and trying to fit to a function with more than one parameter. Eventually, I would like to fit to 5 ...
3
votes
1answer
574 views

How to make a multi-peak histogram fitting

I got a multipeak histogram from my data and want to fit it using a Gaussian Distribution function. ...
6
votes
4answers
4k views

Fitting a two-dimensional Gaussian to a set of 2D pixels

Imagine I have a set of data like the following: ...
1
vote
1answer
544 views

Keeping Nonlinear Model Fit Real

So I am using the NonlinearModelFit (NLM) command with a fairly simple function. There are 4 unknowns and the (x, y) points that ...
17
votes
1answer
346 views
2
votes
3answers
158 views

Removing of artificial sampling step effects

Look at this plot, it represents an underground interface between two formations, this interface should dip very gently left-downward, all the steps are artificial effects due to sampling. The natural ...
0
votes
0answers
91 views

Inconsistent results in fits from NArgMin

EDIT: Just realized I had misspelled "inconsistent." I'm using version 7.0. I'm trying to fit a (noisy) data set to a large-order polynomial. (Just for context: there isn't a model for the ...
3
votes
1answer
94 views

How do I test for the occurrence of an error message and act on it?

I want to see how well some curves fit a data set. If a curve doesn't fit after 100 iterations, I get the error cvmit. How do I test for and handle this error ...
12
votes
0answers
472 views

Nonlinear least squares on a GPU with Mathematica 9

Update: A Mathematica wrapper for (https://github.com/zitmen/cuLM) should allow for us to directly implement the Levenberg-Marquardt algorithm in CUDA for nonlinear least squares fitting. In a ...
3
votes
1answer
319 views

How do I draw a credible velocity vs. time graph using Locators?

This is partly a math question, partly a Mathematica question. For educational purposes, I'm making a simple demonstration to create a velocity over time graph from six locators. On the basis of ...
1
vote
0answers
181 views

To what extent can NonlinearModelFit be sped up?

Can NonlinearModelFit be parallelized or compiled to allow one to achieve a scalable speedup for a fitting procedure? Attempting to use this function to fit a ...
0
votes
1answer
368 views

Fit implicit function

Can anyone help me with fitting an implicit function to data? The function is given by: a*x^2 + 2*b*x*y + c*y^2 = e under the condition ...
2
votes
0answers
548 views

Linear regression with x and y errors

I have a question about finding a linear regression weighted with x and y errors. I found the answer provided by 0x4A4D in Estimate error on slope of linear regression given data with associated ...
0
votes
0answers
157 views

Interpolating function as a model in Mathematica's procedures for fitting

Is it possible to use interpolating function with parameters as a model for NonLinearModel fit (and other integrated methods for fitting)? Similar question was already posted earlier - How do I find ...
0
votes
0answers
112 views

FindFit for dimension reduction?

Given an n-dimensional function, can I use FindFit to produce an approximate (n-k)-dimensional function? Here is a simplified illustration of what I am trying to do. I have $$f(x,a,b,\mu,\sigma) = ...
4
votes
1answer
254 views

Using a user defined NormFunction in FindFit or NDSolve

I would like to use a different norm instead of the 2-norm in FindFit (Mathematica 9). For example, instead of using $$\sqrt{\sum (x_{\mathrm{model}} - ...
2
votes
1answer
117 views

making a function of fit results

I have 13*25 datasets consisting each of around 40 points. They are all linear I can easily fit them using fit function but my problem is when I want to call them I want them to be functions. I want ...
20
votes
5answers
3k views

How to perform a multi-peak fitting?

I am wondering how to implement the multi-peak detecting and fitting in Mathematica. Following is an example of fitting the data using three peaks (such that the data ~ peak1 + peak2 + peak3). The ...
2
votes
0answers
193 views

NonLinearModelFit with Two Dimensional List of Weights

I'm currently trying to fit Planck's law (B[λ, T]) to measurements, thereby determining Planck's constant. I have a list of triplets containing wavelength, ...
1
vote
1answer
259 views

Combined NonlinearModelFit [duplicate]

I'm trying to fit a number of data sets. Each of the sets should evaluate to a simple linear solution.ax+b. The problem is, all data sets have interference from a ...
2
votes
3answers
672 views

Plotting a list along with its trend line [duplicate]

Say I have these data: data = {{1, 3}, {2, 4}, {3, 6}, {4, 7}}; I want to fit these data with a quadratic equation, like this: ...
0
votes
1answer
85 views

Solving one equation, then inputting the values into another for NonlinearModelFit

Considering the equation a*x^3 + a*x^2 + x + b == 0 I'm looking to find the best value for a and ...
-1
votes
1answer
213 views

How to define a pure function with a Module?

I was not able to use a self defined (using Module and For loops) piecewise function to fit data. It seems that the problem is that I have to define a pure function. I would like to learn how to ...
1
vote
1answer
1k views

Using NonlinearModelFit to fit data with errors

Assume we have some data of measurements SeedRandom[9]; data = Table[{i,2*(1 + 5*RandomReal[])*Exp[-0.01*(1 + RandomReal[])*i]}, {i, {0, 100, 200, 400, 700}}]; ...
2
votes
1answer
329 views

non-linear trend reduction using thresholds

Doing some mappings of the earth magnetic field results in the left-hand figure below (which consists of 181 profiles): To improve this I tried a non-linear trend reduction using, for example, ...
11
votes
2answers
562 views

Is it possible to use the LevenbergMarquardt algorithm for fitting a black-box residual function?

I have a black-box multiargument multiparametric function of the type SRD[dataPoint_List,params_List] which accepts experimental data along with the parameters of ...
0
votes
0answers
258 views

Performance in parameter estimation from ParametricNDSolve using varied initial conditions

I have 250 data points from a timecourse exeriment in a list, with columns specifying (1) time, (2-4) initial conditions, (5) absorbance reading. I want to fit 4 parameters (k1, k2, k3, k4) in a DAE ...
2
votes
1answer
341 views

How to adjust parameters to experimental data on a NDSolve problem

I have 2 differential equations with 2 variables, x and y,which are a function of t and I have the parameters k1, k2 y k3. ...
4
votes
2answers
285 views

Linear regression in a chosen range of points

Hi I'm absolutely newbie in Mathematica and have following problem: My list looks like {{50, 0.75}, {51, 0.76}, ..., and I want to choose a range out of my ...
4
votes
4answers
330 views

Remove linear trend from data

I have a large data set with 150k lines and two data columns. I noticed that there is a linear trend, which I want to remove. So, I do the following: first fit with a linear model ...
0
votes
3answers
1k views

Fit line similar to power of trendline in Excel

Is there a way to fit a line similar to power trendline in Excel? Something in this fashion: Fit[data, {1, x, x^(-n)}, x] ...
2
votes
2answers
103 views

Putting a matrix inside function

I want to fit a function to some data and inside the function there's a list here's my data ...
16
votes
5answers
6k views

Estimate error on slope of linear regression given data with associated uncertainty

Given a set of data, is it possible to create a linear regression which has a slope error that takes into account the uncertainty of the data? This is for a high school class, and so the normal ...
5
votes
0answers
172 views

Using perpendicular offsets in FindFit

I want to use perpendicular offsets in the built-in FindFit function. Are there any possible ways or do I have to code everything by myself?
5
votes
1answer
365 views

Does LinearModelFit perform an ordinary linear regression (least squares)?

Does LinearModelFit give an ordinary linear regression? I see lots of options, but nothing like "least squares" or OLR.
1
vote
1answer
146 views

How can I nicely overlay fits for multiple arrays with ListPlot or ListLogPlot?

I'm plotting multiple lists with ListPlot[] or ListLogPlot[]: ListLogPlot[{ListA, ListB, ListC, ListD, ListE}, PlotRange -> {{0, 100}, Automatic}] I also have ...
2
votes
2answers
204 views

FindFit: Fit that is always lower - Change of Norm?

I am trying to find a fitting function for a multidimensional set of data. I will have to find a fitting function that is always lower (conservative) than the data fitted. The easiest way is to look ...