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

learn more… | top users | synonyms (1)

2
votes
1answer
1k views

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

I'm trying to use NonlinearModelFit to fit the data: ...
2
votes
2answers
263 views

Non-linear trend reduction with missing data

How can I reduce a non-linear trend of some data series if there are parts of "no data", represented by the value 99999? For example: ...
2
votes
1answer
43 views

FindDistributionParameters and Hypothesis Testing

Please excuse me if I am making any logical error in posting this question since I am not a math major. However, let me post my question. I am trying to fit multivariate parametric distribution to ...
2
votes
1answer
59 views

BSpline or other curve through arbitrary ordered sequence of two-dimensional points

How does one create a BSplineCurve or other smooth curve passing through each point in an ordered list, where the curve may be non-simple, i.e., can double-back upon itself, loop, and so forth as for ...
2
votes
1answer
203 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 ...
2
votes
2answers
106 views

Putting a matrix inside function

I want to fit a function to some data and inside the function there's a list here's my data ...
2
votes
1answer
218 views

Problem creating MeanPredictionBands

I have a problem creating MeanPredictionBands for my function which I fitted using NonlinearModelFit. I have a complex-valued ...
2
votes
1answer
92 views

How do I find out what a Mathematica function is doing (which numerical method it uses and how)?

Long story short, I am working on a project which entails fixing a bug I have found in Mathematica (8 and 10). In general, I would like to know what a specific Mathematica function is actually doing ...
2
votes
1answer
279 views

Model fitting to noisy data with a custom minimization function

I'm looking into fitting some data with Mathematica. I've got my head around how NonlinearModelFit works (I've been using the Levenberg-Marquardt algorithm for some ...
2
votes
2answers
686 views

Line of best fit on LogLog plot

I have a LogLog plot, and i'm unsure about how to fit a line to it. The data represents a calibration curve. ...
2
votes
1answer
341 views

non-linear trend reduction using thresholds

Doing some mappings of the earth magnetic field results in the left-hand figure below (which consists of 181 profiles): To improve this I tried a non-linear trend reduction using, for example, ...
2
votes
1answer
52 views

Is there a way to show some “weighted” residuals after LinearModelFit?

I am fitting some functions to some data and then I want to analyze the residuals of that fit. I'd like to see how those residuals compare to the values of the original data, hence my "weighted" in ...
2
votes
1answer
98 views

Piecewise conditions with a parametric PDE

I'm using ParametricNDsolve to check best fit of a model (function Eb1) with some data, and I have four free parameters I want to test. I can easily construct a Parametric solution between the two ...
2
votes
1answer
101 views

nonlinearnodelfit with a matrix as weights

I have to fit a non linear model to my data and I am trying to use nonlinearmodelfit. The problem is that I have systematic errors, so the ...
2
votes
1answer
74 views

is there an option for FitResiduals in FindFit?

I know this option exists in NonlinearModelFit and probably in other fit models as well but for some reason the best result i get is with FindFit. Regards Doron
2
votes
1answer
175 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 ...
2
votes
1answer
280 views

Problem with Covariance Matrix Output in NonlinearModelFit

I am running NonlinearModelFit based off of some simulated data and trying to fit to a function with more than one parameter. Eventually, I would like to fit to 5 ...
2
votes
1answer
431 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. ...
2
votes
0answers
36 views

Is there a way to produce a FittedModel object as the solution to a regularized regression?

I can get the Ridge or Tikhonov regression solution to Y = \[Beta].X easily enough as ...
2
votes
0answers
114 views

Power::infy: error using FindFit [closed]

I have a 2D data to fit (the Airy type pattern from diffraction of Gaussian beam on the circular aperture). Please see the attached picture. I was going to use a function like ...
2
votes
0answers
134 views

Memory problem in Mathematica 10

I'm having a problem with memory. I'm doing nonliner fits of several data lists to a system of differential equations. When I evaluate the "Do" cycle the memory grows with the iteration step up to my ...
2
votes
0answers
49 views

Why do EstimatedDistribution and DistributionFitTest work this way

I am fitting some time-series data to both a stable distribution and a normal distribution in order to assess the goodness of fit of each. Along the way I encountered the following confusing result. ...
2
votes
0answers
146 views

NonlinearModelFit is not giving the fit with minimum chi^2

First of all, a bit of background, I am using Mathematica to fit angular distributions of gamma rays, so I apologize for some of the serious messiness in the formulas. The data is simple I have three ...
2
votes
0answers
639 views

Linear regression with x and y errors

I have a question about finding a linear regression weighted with x and y errors. I found the answer provided by 0x4A4D in Estimate error on slope of linear regression given data with associated ...
2
votes
0answers
255 views

NonLinearModelFit with Two Dimensional List of Weights

I'm currently trying to fit Planck's law (B[λ, T]) to measurements, thereby determining Planck's constant. I have a list of triplets containing wavelength, ...
2
votes
0answers
637 views

ParametricNDSolveValue or NDSolve + fitting

I have been trying to find the value for the parameter kestim that yields the best fit of a model to some data points. datac has ...
2
votes
0answers
208 views

How to predict some constant number of values with NeuralNetworks

Example: << NeuralNetworks` data = {Sin[#]} & /@ Range[0, 4 Pi, 0.5]; learn = data[[1 ;; 15]]; Now, lets fit our neural network: ...
1
vote
2answers
169 views

FindFit giving weird values on a logistic equation

I was trying to fit a set of data onto a logistic equation, however it ended up telling me that the initial value when $t=0$ is greater than the maximum limit, thus I am led to believe that it isn't ...
1
vote
1answer
835 views

How to find local minima of a multivariate function with singularity?

I am working on a logistic regression problem which requires minimizing a cost function J[{theta0, theta1, theta2}, X, y] to find the optimal value for fitting ...
1
vote
3answers
370 views

Why does FindFit seem to have trouble fitting exponential data?

I have 4 data points. t is in minutes, and y is radioactive counts per minute. When I input the following lines: ...
1
vote
2answers
1k views

Finding a best fit curve and plotting it [closed]

I have a list as shown below: m01 = {{250, 0.083121}, {200, 0.0888446}, {150, 0.0992422}, {100, 0.121567}, {50, 0.186825}} I'm new to Mathematica, and would like ...
1
vote
1answer
176 views

How do I construct a non-linear model from experimental data?

I want to find a function $w=f(x,y,z)$ that fits experimentally determined values of w. For example, assume ...
1
vote
1answer
699 views

FindFit: getting confidence intervals for the returned parameters

I'm using FindFit[] to fit a function to some experimental data. I'd like to know what error bars are on the fitted parameters. Scipy's ...
1
vote
2answers
144 views

How to fit exponential function which is not converging

I performed an experiment where I measured diffusion in a lipid bilayer. I performed the measurement by fluorescently labeling some molecules in the bilayer, and the irradiating them with light ...
1
vote
3answers
208 views

Getting an equation of particular curve

How can I get an equation of the similar shaped curve? I've tried to get it like y = a + c x^2 + d x^3: ...
1
vote
2answers
253 views

Can't find a fit for Erf

I have the following numbers ...
1
vote
1answer
125 views

General F statistic and p value in LinearModelFit

Many statistical packages provide a "F statistic" and the corresponding p value in their output of a multiple linear regression. I don't find that in the parameters of the Mathematica function ...
1
vote
1answer
157 views

show fit information on plot

After performing a fit in Mathematica, I would like to show the fitted parameters in a box on the plot showing the fitted function. How would I go about achieving that? Here is a MWE: ...
1
vote
1answer
188 views

NonLinearFit with “complicated” integral model

I have a set of data $y_i (z_i)$ with errors $\Delta y_i$ ...
1
vote
2answers
88 views

Minimizing the maximal residual in mathematica

With this: d1 = 10; d2 = 4; mat = RandomReal[{-1, 1}, {d1, d2}]; vec = RandomReal[{-1, 1}, d1]; LeastSquares[mat, vec] ...
1
vote
2answers
90 views

How can I get a fully functional FittedModel when fitting data to a pointwise function?

When I am fitting data with a pointwise function using NonlinearModelFit, the produced FittedModel fails to calculate variances ...
1
vote
1answer
389 views

Fitting parameters of user defined function returning discrete values

So, I'm fairly new to Mathematica (apologies in advance for the noobiness), and I'm having some problems regarding fitting the parameters of a user defined function to data. I'll give a representative ...
1
vote
1answer
137 views

Fitting Function with 3 parameters

I am trying to fit a function with 3 parameters however the result strongly depend on the initial values of parameters: ...
1
vote
1answer
275 views

Curve fitting data to model

Example Assumptions: ...
1
vote
1answer
265 views
1
vote
1answer
47 views

FindFit::nrlnum: error with FindFit

I am trying to write a code to fit actual data of the orbit of a star with Mathematica 8. First I tried to write a code to fit a mock orbit, using the Application with differential equations (the ...
1
vote
1answer
51 views

Why does my Dynamic NonliearModelFit keep running?

I have complex data and which I am fitting to a complex formula. In order to use NonlinearModelFit I split the formula and the data into real and imaginary parts. ...
1
vote
2answers
62 views

FindFit is producing a list of imaginary numbers when there is non

I am trying to find the fit of an equation to some data and mathematica thinks there is a list of imaginary values. My data is all real positive number. ...
1
vote
1answer
140 views

Find polynomial equation for set of 3D data

data was given in columns in the order {y, x, z}, with y dependent on x, z ...
1
vote
1answer
211 views

FindFit (Jacobian Error) [duplicate]

I, like others before me, am struggling with FindFit. So, I tried a simple example. ...