# Tagged Questions

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

239 views

### Zero-order interpolation not going fully around

Connected to this question, I want to do a zero-order interpolation of a bunch of datapoints which is periodic. The code I use is as follows: ...
297 views

### Getting slightly different results in fitting a logit model in R and Mathematica

I'm fitting some data to a Logit model in both Mathematica and R and I'm getting slightly different results. R code: ...
264 views

### Mathematica Interpolation or approximation

I have lists of points X and Y. {1212,1216,1217,1219...}, {1,2,3,4,5,6...} I combine ...
67 views

### Problem with FindFit: Low quality of estimated parameters

I'm trying to fit a Cole-Davidson formula: ...
267 views

### Finding the FWHM of a NonlinearModelFit gaussian [duplicate]

I have a NonlinearModelFit in a very large program, f1 = NonlinearModelFit[d1, a Exp[-(b (x - c1))^2] + yoff, {a, b}, x] Which is used in my program to produce ...
636 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 ...
552 views

### fit a curve in a three dimensional space

I have a list of points of a curve in a three dimensional space, like ...
121 views

### Automatically isolate the linear part of my data so that I can find its gradient?

I have some data plotted which is of bacterial growth curves, I have 96 sets of growth curves and I am wondering if there is a quick way to extract the straight line area of my growth curves in each ...
271 views

### Multi-Fitting with Nonlinear model

I want to fit experimental data by the H-N model. Here is the H-N model: \text{EHN}(T)\text{=}\text{E$\infty$}+\frac{\text{E0}-\text{E$\infty$}}{\left(1+\left(i \omega\tau(T_g)10^{-\frac{\text{C1} ...
149 views

### Simultaneous plotting

For my experiment, I have to simultaneously fit the real part and imaginary part of cavity reflection data which is given here column 1: frequency, column 2: reflection magnitude, column 3: phase I ...
148 views

### Estimated Variance in LinearModelFit

Suppose that lmModel is a linear model which is fit using LinearModelFit. How come ...
79 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 ...
172 views

### Troubles with FindFit for ODE

I need to use FindFit for ODE with arbitary number of parameters. This code (from documentation) works: ...
2k views

### How to enter an equation into FindFit?

I have the equation ...
338 views

### Find the best fitting function for some experimental data

I am almost new in Mathematica, and so I have some problems that may appear basic for you. I am given a set of data taken from an experiment. I am supposed to find the curve that best fits them. The ...
61 views

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

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

### Fitting the Plot by fourier Series of either sine or cosine

I have list of data and its plot and I don't know how to fit the plot with fourier series of either sine or cosine. Full Data: ...
538 views

### Fitting one function to another

I'd like to see how close I can fit an exponential function to a cosine function in the domain of $\;-\frac{\pi}{2}$ to $\frac{\pi}{2}$ in the least squares sense. ...
102 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 ...
107 views

### Fitting problem

I have two points stored in data: data = {{0.0166667, 2.86927*10^-12}, {0.0333333, 1.12725*10^-11}}; ...
197 views

### FindFit with a sophisticated function (integral)

I am trying to find a fit to the distribution function (empiricial data) in terms of a function which is itself an integral of a product of two simpler functions (two polynomials), that is the model. ...
194 views

### Automatically detect higher slope in numerical data (within a certain range)

Suppose the dataset data is part of some simulations whose results should follow a certain model. Here is data and its ...
224 views

### FindFit with parameters which are simultaneously in initial conditions

I have RLC circuit. I would like to find R and L by using FindFit, but L is in initial condition and I have problem with it. Could you help me ? ...
4k views

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

I'm trying to use NonlinearModelFit to fit the data: ...
690 views

### NonlinearModelFit returning nonsense for very simple data

In fitting the following data, if I first log transform the y-values and use LinearModelFit I get a set of parameters that fits the data: ...
913 views

### Problem with NIntegrate in NonlinearModelFit

We are receiving many error messages when using NIntegrate with NonlinearModelFit. Here is a much-simplified version of the code. It arrives at the correct answer after several messages saying that it ...
1k views

### Having Trouble Fitting Complicated Exponential Function with FindFit

I am working on high pressure shock experiments and am trying to figure out a the temperature of a sample under strong shocks. I have a measure value from 4 wavelengths of a pyrometer and am using a ...
142 views

### Ordinary Least Squares (OLS) with RLink

I need to calculate the parameters b0, b1 and b2 in: ...
183 views

### Applying LinearModelFit[] to data obtained with WeatherData[]

I am trying to perform a linear regression on some weather data, but I can't seem to figure out how to perform the operation. What I have right now is this: ...
83 views

### Knowing the functional form, how to find best-fit parameters and their uncertainties for a set of raw data in Mathematica 8?

I am trying to plot the best-fit curve (with known functional form but free parameters) passing through the following set of discrete data points which would take into account the size of error bars ...
123 views

### How to get the “AdjustedRSquared” from FittedModel

This my result of model fit: ...
114 views

### Why is TimeSeriesForecast linear?

When I use FinancialData with TimeSeriesForecast, the resulting graph is always linear and thus not very accurate. ...
53 views

### Displacement around the x axis, how to change a function location

While plotting a function I want to change the location of x. I am doing a regression with the logistic function ...
493 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 ...
174 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 ...
459 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 ...
78 views

### Filtering Background with resonance or Peaks

I have some data, the blue curve which I want to filter out the background to get a flat signal with dips(Idea is to divide signal (except the dips) by the background). The orange curve is my best ...
61 views

### Looking for a convenient way to replace a large data sample with an analytic approximation

Suppose that data is a large data sample, and that Histogram[data] produces a very smooth-looking distribution. Since ...
602 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 ...
360 views

### How do I find the best fit?

I am trying to solve following system of three differential equations ...
149 views

### Estimate parameters of AR1 process

I am trying to estimate the parameters of a series $Z_t=W_t^\beta$, where W_t follows an AR1 process with mean 2, $\rho=0.9$ and $\sigma=0.1$: $W_t = \rho W_{t-1} + (1-\rho) \bar{W} + \epsilon_t$ ...
231 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 ...
693 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 ...
729 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. ...
1k views

### Error message from evaluating NonlinearModelFit

I am trying to fit data to a Morse potential using NonlinearModelFit as follows: ...
53 views

### PearsonChiSquareTest for count/frequency data?

I read with interest a previous question on the PearsonChiSquareTest from a few years ago, and one answer was very helpful: Performing a chi-square goodness of fit ...
98 views

### Writing a function to set up and solve the least squares problem

I have setup the explicit line equation for a given set of points using least-squares approximation and the knots computed below. I have tried extending the same code for use with an arbitrary degree, ...
61 views

### LinearModelFit gives bad fit for simple data set [closed]

I want to fit the rather simple data set: ...