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

learn more… | top users | synonyms (1)

5
votes
2answers
548 views

What is the best distribution for my histogram?

I defined a security bound for a random walk (cube with 15 lengh) and i have this code to obtain a sample of the random times at which the random walk crosses the boundary for the first time: ...
5
votes
3answers
173 views

Looking for ideas for handling a complicated fitting problem

I have the following data: ...
5
votes
2answers
179 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 ...
5
votes
1answer
253 views

LinearModelFit with millions of rows

I'd like to do a simple regression with millions of rows of (x,y) data. It seems to be too long for Mathematica. Is there a way to speed it up? It shouldn't be that hard to do, I am not sure what ...
5
votes
1answer
379 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.
5
votes
2answers
309 views

How to find Matano plane

I have discrete collection of data points (10 to 10^4). I want to describe them by a continuous function and find a x value z, ...
5
votes
1answer
536 views

Multinomial logistic regression

Has anyone done multinomial logistic regression in Mathematica? The binomial case is essentially done on the LogitModelFit documentation page and works fine. I am ...
5
votes
2answers
1k views

In finding a logarithmic fit for some data (of the form a*Log[b*x]), WolframAlpha succeeds where Mathematica 7.0 fails, why?

I would like to fit a function of the form: $a \log(b x)$ to a set of data: ...
5
votes
1answer
237 views

Fit data with linear combinations of Cos and Sin

Recall that if $f$ is a piecewise continuous function on the interval $[-\pi, \pi]$, then the Fourier series of $f$ is $$f(x) = \sum_{n=0}^{\infty} (a_n \cos(nx) + b_n \sin(nx)).$$ See for example, ...
5
votes
1answer
269 views

Specify a constraint on an interval under FindMinimum

I have an interpolated function that looks like this: $\hskip1.2in$ and, based on extreme and critical points, I want to use a polynomial to approximate the function. The points in question are: ...
5
votes
1answer
355 views

Time approximation of decrypting RSA algorithm

I've written a function that encrypts a text using the RSA algorithm. It then decrypts it using prime factorization, and takes the time it took to decrypt it and puts it in a vector together with the ...
5
votes
2answers
372 views

Find parameters of ODEs to fit solution data

Problem How to find the initial conditions x[0],y[0] and the optimal value of parameters ...
5
votes
0answers
68 views

Third syntax version of LogitModelFit: unexpected result of “BestFit”

The third listed syntax version of LogitModelFit allows one to specify input in a simple way: Only a design matrix (with a row of values of the explanatory input ...
5
votes
0answers
610 views

Analytical model fitting

I have a special type of model fitting problem that I am trying to solve in Mathematica. Any insight how to attack it using available tools of Mathematica will be great to hear. We have a variable $$ ...
4
votes
3answers
584 views

Output of NonlinearModelFit differs from the correct result

I'm having a bad time dealing with the NonlinearModelFit in Mathematica 8, since the result given is a bit imprecise. An example is given on potential regression, ...
4
votes
1answer
372 views

NonlinearModelFit does not find a good fit

I am trying to fit my data to the following function, $$\frac{a b t \left(\log \left(\frac{-a d t+a t-1}{a d t}\right)-2\right)}{4 (a t-1)}-c$$ ...
4
votes
4answers
349 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 ...
4
votes
3answers
238 views

Determing two Nonlinear model fits with 95% confidence bands from one data set

I have the following data which is postulated to have contributions from two different sources .....as can be seen from the confidence band, many points are out of the band. Question: How can I ...
4
votes
5answers
1k views

How to plot Fit functions?

If I do something like this f[x_]:=x^2 Plot[f[x],{x,1,10}] Mathematica plots the function $f(x)=x^2$, as expected. However, ...
4
votes
2answers
295 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
1answer
102 views

Removing Linear drift from an oscillating data

I have an array of 800,000 data measured at 1.1s time gap. It is oscillating data but has clear linear drift. I want to remove this linear drift. But the estimates by ...
4
votes
2answers
151 views
4
votes
1answer
1k views

NonlinearModelFit::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations

I have got a problem in my program with NonlinearModelFit: ...
4
votes
1answer
193 views

Fitting piecewise functions

I have several large data sets which follow the following pattern: A position is measured, a force is applied until a new equilibrium is found. I'd like to find a fit for the position, at least at the ...
4
votes
1answer
257 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}} - ...
4
votes
1answer
483 views

Why FindFit could not exactly fulfill condition?

I tried to fit some data with boundary conditions, but FindFit just could not work. Does anyone know the reason? Details: The function to be fitted is ...
4
votes
1answer
196 views

FindFit not giving a good fit despite good initial parameters

I'm having a problem with FindFit not giving a good fit to my data, even though the initial parameters I give look really good when plotted. The fitting function is ...
4
votes
1answer
888 views

How do I find the best parameter to fit my data if the model is a interpolating function?

Hi I have a question regarding to find the best parameters for my model to fit my data. I have 3 ordinary equation, and I now just picked some parameters (...
4
votes
1answer
212 views

Fitting triangular function with HeavisideTheta

I have a problem fitting a triangular function (like potential vs. time in cyclic voltammetry) with a HeavisideTheta function. I just want to get used to ...
4
votes
2answers
485 views

What can I do to eliminate the error FindFit::nrjnum:?

I am testing the "Power Law with finite-time singularity" hypothesis for world population growth for a project. The data I'm using (same behaviour should also be exhibited by the stock market, thats ...
4
votes
1answer
433 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 ...
4
votes
2answers
426 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: ...
4
votes
0answers
169 views

Problems extending NelderMeadMinimize into 2D

I've been playing around with Oleksandr's compiled Nelder-Mead Minimization function presented here: Shaving the last 50 ms off NMinimize First, I'll create some sample data. This creates a noisy ...
4
votes
0answers
198 views

Using FindFit to fit nonlinear ODE parameters, subject to a constraint (an inverse problem) [duplicate]

Similar to this post I am finding that constraints tend to make FindFit poor at finding a good fit. However, unlike the previous post, the constraints are required ...
3
votes
3answers
188 views
3
votes
3answers
151 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: ...
3
votes
1answer
229 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: ...
3
votes
2answers
237 views

fit a curve in a three dimensional space

I have a list of points of a curve in a three dimensional space, like ...
3
votes
1answer
600 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. ...
3
votes
2answers
477 views

How can I consistently get a good logistic regression fit?

I'm executing the command NonlinearModelFit[data, c/(1 + a Exp[-b x]), {a, b, c}, x] with the data being ...
3
votes
2answers
163 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} ...
3
votes
2answers
191 views

In a ListPlot of LinearModelFit, plot error band

This is similar to this question. The fitted line can be plotted alongside with the data with this code: Show[ListPlot[data], Plot[lm[x], {x, 0, 5}]] I would ...
3
votes
3answers
137 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: ...
3
votes
1answer
159 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. ...
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 ...
3
votes
1answer
324 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 ...
3
votes
1answer
273 views

How to get confidence bands of parameters from a fitting procedure?

I have done fitting of data points with a given model that has two parameters (A and B), using NonlinearModelFit. The result of the fit is the maximum of the ...
3
votes
1answer
428 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: ...
3
votes
1answer
915 views

Methods for NonlinearModelFit

I am using NonlinearModelFit for a thesis project. I get quite different results if I change the Method to LevenbergMarquardt or QuasiNewton or ConjugateGradient ...
3
votes
2answers
437 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 ...