Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
0answers
41 views

How to fit ODE's coefficient, just like using NMinimize [duplicate]

I want to fit ODE's coefficients to a model. I tried using NMinimize, but it seems it does symbolic instead of numerical calculations. ...
2
votes
0answers
138 views

NonlinearModelFit is not giving the fit with minimum chi^2

First of all, a bit of background, I am using Mathematica to fit angular distributions of gamma rays, so I apologize for some of the serious messiness in the formulas. The data is simple I have three ...
2
votes
1answer
166 views

Judging the quality of fitting an EventData object to a distribution using LogRankTest

I have $389$ data points defined in an EventData object and want to judge the quality of fit of this data to a fitted $3$-parameter Weibull distribution. This ...
1
vote
0answers
128 views

LeastSquares with some parameters missing

I want to do a partial least squares (PLS) regression using LeastSquares on my data. The input parameters are temperature, humidity and pressure for a given date. ...
4
votes
1answer
572 views

How does Mathematica estimate error on fit parameters?

When performing a fit using NonlinearModelFit (or any of Mathematica fitting functions, but I am particularly interested in nonlinear models), Mathematica makes a ...
12
votes
1answer
404 views

Does anyone have experience with performing symbolic regression using Mathematica?

I understand that there is at least one Mathematica package, DataModeler commercially available for symbolic regression. I'm seeking any observations with this or any other similar tool. I'm ...
0
votes
1answer
127 views

Curve Fitting Errors

I am trying to fit a part of a dataset to the function $$ae^{-b\sqrt{x-c}}$$. My friend was using GNUPlot to this and got reasonably good results. However when I try to this with Mathematica : ...
4
votes
1answer
137 views

How to Use ProbabilityScalePlot with Censored Data?

I am trying to reproduce a ProbabilityScalePlot of censored data shown here (see Sample Analysis Plot). Here is my Mathematica code. First I deal with the uncensored case. ...
0
votes
1answer
69 views

LMS distance from a point to an InterpolatingFunction

I have a short script to NDSolve a second-order nonlinear BVP, which as its output produces an InterpolatingFunction object. I ...
2
votes
1answer
548 views

Nonlinear least squares

I have a typical nonlinear least square problem and it seems very similar to the example provided in the section on parameter fitting at the Wolfram website. Unfortunately I always get some error ...
3
votes
2answers
501 views

FindFit for a differential equation model with multiple variables?

I'm trying to figure out how to use FindFit with a multivariable differential equation model and data. I've successfully made it work for the one-variable version ...
2
votes
2answers
855 views

How to enter an equation into FindFit?

I have the equation ...
6
votes
1answer
120 views

Why LinearModelFit is slower than NonlinearModelFit?

Why LinearModelFit is slower than NonlinearModelFit? ...
0
votes
1answer
131 views

fit recursive function to data

I have a function $g(x, n)$, which is a recursive expression: $x$ is a variable and $n$ the number of iterations. In my case $n=3$ for all $x$. An example is the following: ...
3
votes
2answers
284 views

SinglePredictionBands versus MeanPredictionBands from NonlinearModelFit

From my Statistics lectures I know the term confidence and prediction interval, whereas the confidence interval is smaller than the prediction interval. If I plot the mean and single prediction bands ...
2
votes
1answer
1k views

Problem with NonlinearModelFit: “The function value… is not a list of real numbers…”

I'm trying to use NonlinearModelFit to fit the data: ...
9
votes
1answer
805 views

Measure length and diameter of objects in an image

I am new to Mathematica, and I am trying measure length and diameter of rectangular objects in an image. I wanted to fit rectangles in the objects, and then get the values. Can I do that with ...
0
votes
1answer
229 views

FindFit: why do I get negative value as result?

I am trying fo fit a model to data using FindFit. ...
5
votes
2answers
186 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 ...
3
votes
2answers
912 views

Find a best fitting curve for some data with no regular pattern

Suppose some data with no regular pattern is given, so common patterns of functions all fail to fit it. Then how can one find the best fitting curve? I believe there will be some data for which we can ...
2
votes
1answer
302 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 ...
1
vote
0answers
94 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: ...
4
votes
2answers
154 views
3
votes
2answers
291 views

How do I find the best fit?

I am trying to solve following system of three differential equations ...
1
vote
2answers
222 views

Plotting a dynamical NonlinearModelFit Function

Currently I'm playing around with dynamics and the NonlinearModelFit function. To be precise, I want to fit a function the data, which range I want to specify ...
3
votes
1answer
407 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 ...
1
vote
0answers
647 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
115 views

How to find best MLE using `FindDistributionParameters`

This question is an extension of this question, if we change the initial values ...
0
votes
2answers
194 views
2
votes
1answer
256 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 ...
17
votes
2answers
2k views

How to fit 3 data sets to a model of 4 differential equations?

I'm a biologist and a newbie in Mathematica. I want to fit three data sets to a model consisting of four differential equations and 10 parameters. I want to find the parameters best fitting to my ...
3
votes
1answer
725 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. ...
5
votes
2answers
476 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: ...
2
votes
3answers
160 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 ...
1
vote
1answer
716 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 ...
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 ...
13
votes
0answers
537 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
388 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
206 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 ...
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: ...
0
votes
0answers
94 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 ...
0
votes
1answer
418 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 ...
0
votes
0answers
191 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 ...
2
votes
0answers
606 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
122 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) = ...
6
votes
2answers
910 views

How can I compute and plot the 95% confidence bands for a fitted logistic regression model?

I have a set of binary data that I' d like to fit a logistic regression model to and show the 95% confidence band around the fitted function. I can produce the regression model but how do I compute ...
2
votes
1answer
123 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 ...
2
votes
0answers
231 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, ...
20
votes
5answers
4k 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 ...