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

learn more… | top users | synonyms (3)

0
votes
0answers
50 views

OLS Estimation - Computational results vs. calculation by hand [on hold]

I calculated the OLS estimators for a data set by hand using $$\hat\beta=(X^TX)^{-1}X^Ty$$ If I check my results with Mathematica I get different results. I'm quite sure that I didn't make any ...
-1
votes
0answers
29 views

NonlinearModelFit errors and precision [on hold]

unfortunately this question includes a lot of code. Sorry in advance. I use a data set, which I've made available here: ...
1
vote
2answers
74 views

Non Linear Model Fit (Division by Zero Error Message)

Can someone please tell me why this expression returns error messages about division by zero. ...
1
vote
2answers
60 views

What is the role of the pattern object in this implementation?

In the documentation I found a nice idiom which allows me to do model fitting with interpolating functions. I think this kind of thing is amazing and a credit to the utility of an environment like ...
0
votes
0answers
24 views

Fitting problem: InterpolatingFunction can not be localised

I got simple data looking as follows {{541.447, 311752.}, {540.359, 311723.},.. I tried to fit it in mathematica for the first time with a function that usually ...
0
votes
0answers
34 views

Which one will gives best fitting result?

I want to find out the parameters A, B, and C of the ...
2
votes
1answer
84 views
2
votes
1answer
73 views

P-Values are inconsistent when using DistributionFitTest repeatedly

I am attempting to become more familiar with the DistributionFitTest, specifically the distributions it yields and their fittedness. What I have found is that when I generate random data, fit it, and ...
4
votes
1answer
79 views

Substituting ParametricNDSolve for NDSolve

This is my first post so let me know if I need to format things differently. I have been using NDSolve for most problems which optimize parameters for ODEs. I believe that ParametricNDSolve would be ...
0
votes
0answers
47 views

Finding values of a variable fitting a function and minimizing a list of expressions

I am trying to implement bootstrapping (https://en.wikipedia.org/wiki/Bootstrapping_(finance)) of CDS curve. To implement it I am trying to minimize a series of expressions so that each expression is ...
1
vote
1answer
81 views

Plotting data after fitting it to exponential function [closed]

I am trying to plot h vs t such that h fits a equation ...
3
votes
0answers
97 views

Fitting data to a complicated function

So, where to begin. I have a certain dataset that I want to fit to a function. However, the function is rather complicated (matrix inversions, linearsolve) and does in general not have a closed form ...
2
votes
1answer
95 views

Precision of LinearModelFit with Polynomials

I have a Problem regarding the fit of given points with a polynomial up to the fifth degree. tableofvalues=Import["tableofvalues.csv"] My polynomial is: ...
1
vote
1answer
46 views

Trouble fitting with NonlinearModelFit

I'am having a bit of a headache comparing the results from the NonlinearModelFit to a particular dataset. I have the following dataset, ...
1
vote
1answer
76 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 ...
0
votes
2answers
80 views
0
votes
0answers
79 views

How to make a twice-differentiable function that approximates some data?

I have some time series data that I would like to approximate with a twice-differentiable function. Each time series has ~10,000 datapoints, so I definitely do not want a function that passes through ...
1
vote
0answers
30 views

Fit linear data with weights for y and x in LinearModelFit

I am quite new using Mathematica, I hope someone could give me some help. I have a set of {x, y} data and I have a list of {deltaX, deltaY} standard deviation. I would like to fit my data taking into ...
1
vote
1answer
78 views

Apply NonlinearModelFit to an image

I have several images (in FITS format), which I want to fit with a 2D-Gaussian distribution. The problem is that NonlinearModelFit expects data in the form of a ...
2
votes
2answers
67 views

FindDistributionParameters gives an error for a mixture of user defined sinh-arcsinh distributions

I have some data (1593 values). I first binned it using the Knuth rule and fitted a function that is a linear combination of two sinh-arcsinh functions. I then ...
5
votes
1answer
194 views

ODE fitting to dataset

So, I have a ODE system, it is a complex biochemical kinetic mechanism with six species changing over time. ...
3
votes
0answers
69 views

Fitting data to plot using errors as weights

I have some enzyme kinetics data that I want to fit to the Michaelis-Menten curve in order to obtain the kinetic parameters of the enzyme. Is it meaningful, statistically and functionally speaking, ...
0
votes
0answers
46 views

Solve an integral equation: to fit the given data with an integral of two functions?

I am trying to find an efficient way to solve the following equation $$h\left(b\right)=\int_{0}^{b}f\left(\frac{b-c}{1-c}\right)\frac{g\left(c\right)}{1-c}dc$$ where for $h(b)$ I have the data ...
5
votes
1answer
111 views

Intersection of a ListPlot3D surface with a plane

I'm trying to use Mathematica to analyze some physics data from an experiment, more precisely, I have to fit a 2D data series with a one dimension function. At the moment I'm able to load and plot ...
1
vote
1answer
70 views

non linear Least Squares with model function given by ODE's

I have to fit to experimental data a model function given by a linear combination of functions y1(t) and y2(t) a1*y1(t) + a2*y2(t) with a1 and a2 ...
0
votes
0answers
43 views

FindFit returning Power::infy: Infinite expression

So, I'm having an issue trying to fit some data to a function with a 2nd order pole. I know there are other functions that fit the data, just fine ... but the model is from the literature, however the ...
0
votes
0answers
52 views

Investigating the correlation between this 2 set of data

The picture below shows the growth of the traffic and the total number of published articles on that website. Which functions can I use to investigate if there is a correlation between them? Both ...
1
vote
1answer
54 views

How can I plot more regression trend line in the same graph?

I would like to do something like the example I drawed manually: ...
1
vote
1answer
65 views

Traffic growth forecast: showing the change of linear regression

The following picture shows a changement in the trend of data. (The data used are available here). Is there any tool that can show this change of trend? Until now I managed to show even more ...
4
votes
1answer
150 views

TimeSeriesModelFit incorrect?

I am trying to determine the optimal model for time series data (1592 observations). When I run TimeSeriesModelFit, Mathematica selects $AR(1)$ model, the estimated ...
1
vote
2answers
212 views

How to Fit experimental data with 4D ParametricNDSolve?

Let me first explain the background problem. I'm trying to solve a problem with a projectile motion in 4D such that the position vector is: $\boldsymbol{r}(t)=\boldsymbol{r}[x(t),y(t),z(t)]$ I have ...
5
votes
0answers
91 views

Custom Methods for NMinimize/NonLinearModelFit

Is there a way to write custom methods for NonLinearModelFit or NMinimize? To give background, I currently have a batch of code ...
1
vote
2answers
97 views

NonlinearModelFit and plot with multiple parameters function

i ve got quite simple function: $f(t) = x1 * a(t) + x2 * b(t)$ and table of results like this one: t | f(t) | a(t) | b(t) ---------------------- 1 | 2 | 5 | 3 ---------------------- 2 | 4 ...
1
vote
0answers
53 views

Fitting a vector-valued model using Mathematica

I'm wondering if there is a way within Mathematica to perform some kind of parameter fitting on a vector-valued model function (in this case a model of electric field vectors). Essentially what I want ...
0
votes
1answer
71 views

How to do linear fit for 2D data points [closed]

I am very much new to Mathematica, and facing several difficulties. I used the following code Fit[{2, 4, 6, 8}, {1, x}, x] The output is ...
2
votes
1answer
75 views

Computing a Gamma function-Gaussian integral

I would like to compute the following function: Integrate[Gamma[k,0,Exp[-2 e x^2]],x] k is an integer and ...
-2
votes
2answers
54 views

How can I use NonlinearModelFit with multiple variables? [closed]

I am trying to find the coefficients for following equation: $\quad \quad f(x,\,y,\,z) = a (x^2)\, exp(b x + y^2) + c z^2 y$ using NonlinearModelFit. But I can't ...
1
vote
0answers
33 views

How does LinearModelFit handle cases where the design matrix rank is lower than the model terms?

So, I understand what this error means: ...
0
votes
1answer
66 views

Interpreting P-Value on ParameterTable

When using LinearModelFit[] we can generate a table of parameter values and statistics for the corresponding model using the property "ParameterTable". Looking in the documentation I can't find an ...
6
votes
2answers
260 views

Find fit of an experimental PDF

After quite some struggle, I managed to put up a code that is syntaxically correct. The goal is to find the parameters for a gamma distribution that best match experimental data. The data is a set of ...
16
votes
1answer
473 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, ...
4
votes
3answers
175 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 ...
6
votes
4answers
332 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 ...
2
votes
1answer
93 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 ...
0
votes
1answer
40 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 ...
2
votes
1answer
41 views

Is this behavior of DistributionFitTest together with StableDistribution a bug?

I have been using DistributionFitTest to fit the following data: ...
3
votes
1answer
119 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 ...
0
votes
1answer
107 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 ...
1
vote
1answer
43 views

Convert Dates to values on an X axis

I have a bunch of dates and values which I put into the DateListPlot to get a graph. However I would also like to put this information into the Fit or LeastSquares to estimate what the value would be ...
0
votes
0answers
30 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 ...