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

learn more… | top users | synonyms (3)

2
votes
0answers
61 views

Algorithm used by Fit[]

Does anyone know what algorithm Mathematica's basic Fit[] function uses? Is it proprietary? I'm trying to do some pretty basic, linear, polynomial data fitting ...
4
votes
4answers
187 views

Fitting Coxian distribution to some data

I'm trying to fit a transformed (actually shifted to the right) Coxian distribution to some data ( if needed an example set is here Sim data ). I've tried a number of ways for this: ...
-2
votes
1answer
97 views

Computing least squares error [closed]

I have a mathematica subroutine setup that computes the least squares approximation as follows ...
3
votes
1answer
180 views

How to make a diagnostic plot for the regression?

Context I am interested in LinearModelFit, and would like to make diagnostic plots using Mathematica. I cannot find them in Mathematica document center. For example, the following R program makes ...
0
votes
2answers
122 views

No real number fitting double exponential in Mathematica

I am trying to fit a double exponential curve to my data, but I got the error saying there are non real number. Also I tried with starting values for my 4 parameters, but this does not work either. ...
5
votes
0answers
97 views

Ridge and lasso regression missing? [closed]

There is no implemented command to perform ridge or lasso regression? I couldn't find it in the documentation. Might be there are add-on packages I am not aware of.
27
votes
6answers
11k 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 ...
3
votes
0answers
96 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, ...
1
vote
1answer
73 views

Paramter Scans and $\chi^2$ Test in Mathematica

Is there any in-built function or a recommended package that enables one to find, say, 10 Parameters, which are used as boundary conditions in NDSolve, that minimize $\chi^2$? ...
4
votes
1answer
89 views

Fitting real and imaginary parts of a function

I have an analytic form of a function G[w_] = -I*z0*w/(1 + I*z0*w*a) I know this function can be obtained (up to some overall normalization) from solving a ...
5
votes
1answer
186 views

How to fit data to a convolution equation

How to fit data to a convolution equation: ...
6
votes
1answer
98 views

Simulated Annealing, SearchPoints and InitialPoints options set at the same time

I have a function that needs to be minimized. Since the function depends on real-time data (which is fetched every few hours, and the function is redefined according to the new data), I have to run ...
1
vote
0answers
155 views

Fitting data to an Normal Inverse Gaussian distribution

I am using data which I suspect is distributed according to the Normal Inverse Gaussian distribution (NIG). The literature says that the 4 parameters of the NIG distribution can be estimated from the ...
1
vote
2answers
140 views

Problem fitting a exponential function to data points [closed]

finale edit: i found someone who solved my problem via matlab. therefore i wont try out the proposed solutions now, but wont delete my question in case someone might have use for the proposed ...
3
votes
2answers
162 views
1
vote
1answer
707 views

FindMinimum produces error message

I'm trying to solve a logistic regression problem using Mathematica -- more to improve my Mathematica skills than to solve the problem as I have already solved it using Octave. The problem I am ...
1
vote
0answers
48 views

NonLinearModelFit to a Function [closed]

I have a multiple dimension function that is fairly complicated. Instead of simply using Series to get a taylor series of the function, I would rather specify my ...
5
votes
1answer
105 views
1
vote
1answer
74 views

Faster way to test possible points-to-plane-fitting identity?

Summary: I want to confirm the three sum-defined quantities in https://github.com/barrycarter/bcapps/blob/master/STACK/planetest.m (also below) are identically zero for all values of n>=3. While ...
1
vote
0answers
89 views

LinearModelFit: Standard error or Standard error of the mean on the slope [closed]

UPDATED 02/14/16 Let me make this question clearer. Suppose each measurement that I make consists of three points, each with its own error governed by a normal distribution, on an XY plot. Obviously ...
1
vote
1answer
101 views

LinearModelFit: How to compute R-squared? [closed]

Is there a simple way to computed the R-Squared(adjusted and not adjusted), from the LinearModelFit? It has so many options, but none for the R-Squared, that I suspect there's a simple way to compute ...
1
vote
1answer
80 views

Fitting bivariate data using FindFit [closed]

I am trying to fit the following bivariate data set using the FindFit function: ...
3
votes
2answers
66 views
2
votes
1answer
128 views

Find a family of curves

I have a diagram with seven curves (each with a different parameter). My goal is to find a function for the family of curves (i.e. a single function not just for the seven parameters, but for all ...
0
votes
1answer
80 views

How can I calculate the root of any order of power series

How can I calculate the root of any order of power series with Mathematica. Here I insert every quantity by hand. But I want to give a, ...
1
vote
0answers
71 views

x and y axis nonlinear error fit possible? [duplicate]

I have a set of datapoints with x (position) errors as well as y (measurement) errors. Is there a way in Mathematica to fit a nonlinear function through this points, with weighting both, the x and y ...
13
votes
2answers
480 views

Fitting a curve to an image object: not a superellipse, not an egg curve.. what else?

I'm facing the problem of quantifying the morphology of objects with such a shape (nannoconids... they are fossils). One of the final goals is to produce a solid of revolution and compute ...
24
votes
3answers
835 views

Exponential fitting - isn't actually a BUG there?

There are many questions on this site about wrong exponential fitting in Mathematica but no one considers this well-known problem as a potential bug. Usually people suggest well-known workarounds ...
6
votes
1answer
324 views

Findfit does not find the best fit

I am working on a project that needs curve fitting. The experimental data should be fitted with a model that calculated with an integration equation. At first, I enter my experimental data ...
0
votes
1answer
93 views
2
votes
0answers
66 views

How to realize Global Fitting with shared parameters, same as OriginPro9.0? [closed]

I have an experimental data from Michelson interference and I can fit the envelope in OriginPro9.0 using Global Fitting with shared parameters. The figure by OriginPro9.0 is like this: However, I ...
8
votes
1answer
1k views

What exactly is “ParameterErrors” of NonlinearModelFit?

I am trying to get what I call a "$\chi^2$ fit". This means taking a function $f(x,p)$ of the variable $x$ with a parameter $p$ and finding the value of $p$ that minimizes the "distance" from a data ...
0
votes
2answers
88 views

Getting image data values with coordinates in circular region

I have a number of gray level images (600, with size: 2400x2400 pixel, small instance see above). In this image there is a circular region of interest. The aim is to fit a function to the gray value ...
2
votes
1answer
70 views

Fitting data in Log-Log scale

I want to fit my data from a txt file to a curve in log-log scale. What I tried to do was this: ...
4
votes
0answers
96 views

Fitting data with unique variable per measurement

Imagine we are in the following situation, we have a nonlinear system of functions $f$ with coördinates $x_i$, and unknown parameters $\delta_i$'s and $t$. Let this system be defined as, ...
0
votes
0answers
34 views

How to calculate a required definition only once for each iteration of NonlinearModelFit

This is my first post here. I've been using Mathematica for about 4 years now to analyze data, but am still very new and have no background in formal programming. This is the first question I couldn't ...
1
vote
1answer
83 views
0
votes
2answers
83 views

Find the linear combination of two functions to fit to a third

I have been trying to solve a simple enough problem, but I can't seem to find the proper method. The problem is given as, Find 0 < x < 1 for which, h(t) $\approx$ (1-x) f(t)+x g(t), where is ...
1
vote
0answers
57 views

Multivariate FindFormula? [closed]

I am using Mathematica Online and want to do FindFormula with two independent variables, but I cannot figure out if it's possible and if so what the syntax is. Here's my dataset: ...
1
vote
0answers
69 views

Fitting with constraints including the independent variable

I would like to write the following statement: data2fit = NonlinearModelFit[data2, {a Sqrt[b x + c] + d, b x + c > 0}, {a, b, c, d}, {x}] However, it returns ...
3
votes
2answers
210 views

Multiple regression curve fitting

I've got some data with 2 independent variables and 1 dependent variable I'm trying to fit a curve to. I'm really kind of a dummy with Mathematica except for the most basic things, so I looked ...
1
vote
0answers
73 views

Deriving ordinary least squares (OLS) in matrix form

How can I instruct Mathematica to derive the OLS in matrix form with respect to $\beta$ and obtain the result ${-2X}^{T}(y-X\beta)$? The matrices have the following dimensions: $y_{n \times 1}$, ...
5
votes
0answers
110 views

Multivariate Adaptive Regression Splines (MARS) - Mathematica implementation?

Does anybody have or know of a Mathematica implementation of the Multivariate Adaptive Regression Splines (MARS) algorithm?
3
votes
1answer
123 views
1
vote
0answers
52 views

polar form of generalized superellipse (not Gielis formula!)

I am looking for the polar form of the following generalized superelliptic shape such that I can use it with NonLinearModelFit for curve fitting to data: $$ \left ...
3
votes
1answer
113 views

Why is TimeSeriesForecast linear?

When I use FinancialData with TimeSeriesForecast, the resulting graph is always linear and thus not very accurate. ...
0
votes
1answer
84 views

FindFit and log norm function

I'm trying to fit a function to data using FindFit, but I can't find a way to replace norm function RMSE with a RMSE in log space: ...
1
vote
0answers
71 views

How do I add custom deviation when using LinearModelFit?

I have a set of data in the form a list S1={{x,y},{x,y}} etc. I also have a function that calculates a corrected standard deviation in the y direction for ...
1
vote
0answers
485 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 NonLinearModelFit (and other integrated methods for fitting)? Similar question was ...
1
vote
0answers
184 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 ...