# Tagged Questions

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

164 views

### Difference between Fitting Algorithms

I am new to Mathematica, and I don´t quite understand, what the difference between the fitting algorithms Fit, FindFit, ...
148 views
+500

### Is there any strategy to have a compiled version of FindFit or NonlinearModelFit?

Disclaimer: This is not a precise question with a definite answer. I know that neither FindFit nor NonlinearModelFit is in the ...
103 views

### How to fit parameters in a system of coupled differential equations

Problem description: I'm studying a chemical reaction that can be modeled by a system of coupled differential equations, and I want to use measured data to determine the parameters that appear in the ...
179 views

### How to fit a surface to 3D data in Mathematica?

I have a set of data coordinates which is mostly compatible with an Ellipsoid: {{x1,y1,z1},{x2,y2,z2}, ... , {xn,yn,zn}} Now I want to find the best 3d volume ...
38 views

### How to calculate a linear regression on the HP 40gs calculator? [on hold]

I have a question like my title explained. I'm not really a fan of using this calculator but for my studys I have to. So for a simple example, how to I make a linear regression on the HP 40gs on the ...
70 views

### How can I get the coefficient of the exponent from a nonlinear model fit?

I have been trying for over an hour now to get the numeric value for "HalfLifeN" from the code in the screenshot below. Not to mention mathematica simplifies ...
140 views

### Confidence and prediction bands for custom nonlineal for CDF from ProbabilityDistribution

I have a CDF obtained with the code: ...
34 views

### Using Check[] on multiple statements

I am using a loop to run run multiple fits. If a fit fails, I don't want it to either appear in my data or to affect later fits so I am using the Check[] function to catch if any errors occurred (I'm ...
34 views

### Is this behavior of DistributionFitTest together with StableDistribution a bug?

I have been using DistributionFitTest to fit the following data: ...
71 views

### NonlinearModelFit: fit a vector-valued function to a data vector

I have a vector of data points: data = 10 Sin[#/10] + RandomVariate@NormalDistribution[] & /@ Range[200]; And I have model that provides the complete ...
2k views

### Mathematica envelope for the bottom of a plot, a generic function

I have the following set-up: xaxis = Table[x, {x, 0, 10, 0.01}]; yaxis = Table [Sin[x] + Abs[RandomReal[{-1, 1}]], {x, 0, 10, 0.01}]; ListLinePlot[Transpose[{ xaxis, yaxis}]] My ...
253 views

### FindMaximum of loglikelihood in Gaussian Process

I am trying to implement a Gaussian Process and have problems to maximize the loglikelihood because the function consists of a determinant of a matrix that is dependent of 2 variables and the product ...
44 views

### LogitModelFit bias term when using design matrix

I'm using the LogitModelFit function with a 32-columns design matrix and 0 or 1 output vector: LogitModelFit[{datax, datay}]. ...
86 views

### How to adjust excel data for NonlinearModelFit?

I'm really new to Mathematica and I'm facing a problem and would really appreciate some help! Maybe my question is similar to one described in How to fit 3 data sets to a model of 4 differential ...
29 views

### How to use FindFit to find the parameter in Laplace space(numerically inverting Laplace transforms)

I am trying to find the parameter in Laplace space, and a very simple example is shown below: I have known the solution $y_{laplace}$ in the laplace space is $a/s^2$, and I also have some discrete ...
61 views

### Log Linear Fitting of a data: e.g. {xi,Log [yi]} and plotting the fit

I have a Log-Linear plot, and i'm unsure about how to fit a line to it. The data represents a I (current) vs V (voltage) curve. The exponential portion of this curve (linear in a Log-Linear plot) is: ...
41 views

### How to determine a function that fits a geological model

I have a problem. I am currently working on a code that works by comparing data (real or synthetic) to an earth model (described by earth layers, or in this particular, velocity (...
81 views

### Better output for NonlinearModelFit “ParameterTable”

The Standard table fo parameters of NonlinearModelFit is obtained from NonlinearModelFit[{{0, 1}, {1, 2}, {3, 3}}, a + b*x, {a, b}, x] %["ParameterTable"]] I ...
46 views

### Precision of starting values in FindMinimum [closed]

I am currently working on an optimization of chemical kinetic model. Starting points for FindMinimum are defined as: ...
52 views

### Wrong fit with FindFit

I have a set of data (Datax for x-axis and Datay for y-axes) to fit to a sigmoidal function (Hill type). While Origin gives me the right answer, Mathematica does not. The fit values given by Origin ...
44 views

### Fitting an ellipse to data with a special constraint [duplicate]

I have a bunch of x,y scatter data and I am trying to fit an ellipse through them. I understand there are solutions for the fit where the data points are defined for a full or partial ellipse. ...
5k 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 ...
81 views

### Simultaneously fitting two data sets to two functions is too slow [closed]

I have to fit two data sets to two functions(eps1,eps2) with same parameters (w0,f,g) Initially, I know only one function ...
50 views

### ANCOVA (ANalysis of COVAriance)

I have two time series of the form {time, value} I have linear fits of each set individually, and I am interested in the statistical differences between the ...
514 views

### Estimating a distribution using binned data

I have data from which information has been irretrievably lost through binning and I am trying to find a plausible distribution from which it derives. There is an academic paper suggesting that the ...
87 views

...
58 views

### Curve fitting of a list and exclude some figure

I am a fresher of Mathematica and trying to program a list of digits. When I plot the diagram of the list, it shows that the figure at 12 is much larger than the others. Does anyone have idea on it? ...
58 views

### Decompose Point-Spread Function into Seidel Aberration/Zernike Polynomials

I have measured the point spread function (PSF of a microscope) and I want to quantify it. For that purpose I want to fit my PSF data to the primary Seidel optical aberrations (or Zernike Polynomials, ...
252 views

### Computing launch parameters for hitting a point in 3D with projectile under influence of wind

The end goal of this problem is to compute functions which describe the launch parameters which are needed to hit a specified goal in 3D in the presence of wind disturbances. This is as far I have ...
40 views

### combining separate data into pairs after reading from excel so I can run regression

I have the following code that reads data from an excel spreadsheet: ...
38 views

### Fit a complicated function to a constant with NonlinearModelFit

I wish to fit a complicated parametric function (logder, with lambda parameters) to a constant (L) in order to minimize its dependence with the variable k in a given interval. To do that, I use a ...
42 views

### Fitting data with a complex function, but requiring real parameters

I am trying to fit a complex data with a complex function, with the real fitting parameters. I was trying to put there constraints like this, but I got error: ...
56 views

### Fitting data in form $f = f_0 + c A^x$

The Fit[] function in Mathematica can fit data in form of $f = f_0+c_1x+c_2x^2+...$ ($f_0$ and $c_i$ are unknown constants), is there a function can fit date in ...
70 views

### PredictionBands and the presence of {0,0} point

We know from this post, that the default fitting method cannot handle data with a {0,0} point, and that there are alternative methods. But, with these alternative methods, the prediction bands ...
82 views

### FindFit runs extremely slow for my Function,how do I optimize this?

My function is the first order Bessel Function, and I am basically just trying to get this to fit in a way that does not take forever. I define the function as follows, (it seems to work faster if I ...
66 views

### Fitting Legendre polynomial - Integer constraints in Fitting functions

I have some data in the form of {theta,y} and I am trying to fit a Legendre polynomial to it, however I don't know how I can get it to vary the m and l parameters in integer increments as I don't know ...
63 views

### Encoding variables

I'm trying to fit a Logistic Model using LogitModelFit in Mathematica. The data I'm using contain qualitative variables that I have to encode. I've searched in ...
25 views

### Fit a custom process to a data: inhomogeneous 2-state Markov chain

I would like to fit a custom process - a time inhomogeneous 2-state Markov chain, to data. The time inhomogeneity is a result of the transition probabilities varying sinusoidally through time with a ...
42 views

### NonlinearModelFit returning unexpected result

I am attempting to perform a weighted fit of some data. The Fit function produces the correct quadratic fit, which I am fine with, but it does not appear to support ...
59 views

### How to do dynamic range selection for data fitting in Log plot?

In linear plot, this can be achived by Locator like this: http://mathematica.stackexchange.com/a/24935/13580 ...
51 views

### How to control precision of parameters in NonlinearModelFit?

I am using NonlinearModelFit for fitting a dataset to some complex numerical model function that depends on a few parameters. The final required precision of these parameters is very low, like 3 ...
39 views

### ANOVA on data with different lengths

I have data in the following form: ...
50 views

### Kalman filter estimation

Does anyone have any examples of the estimation of Kalman filters in Mathematica? I am new to these filters and struggling to compose the likelihood function. Some examples would be really helpful. ...
109 views

### FindFit “is not a real number” error when fitting a parametric function to the data

I am using Mathematica's FindFit function to fit a parametric solution to my data and I am getting the error ...
126 views

### How can the Theil-Sen estimator be made to work on larger datasets?

The Theil-Sen estimator finds the slope and intercept of a line passing through a set of points by calculating the median slope and median intercept of the set of lines passing through all possible ...
107 views

### RSquared: LinearModelFit vs NonlinearModelFit

I'm trying to understand the differences between LinearModelFit and NonlinearModelFit. One thing I notice is that the computation of AdjustedRSquared seems to be different, even when the model results ...
45 views

### NonlinearModelFit not hunting for good values

I have the following data which come from complex values but I have turned them into a 3D list ...
364 views

### Fit convoluted Gaussian and Lorentzian functions to a peak profile [duplicate]

I have a peak profile data like this: ...