Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
1answer
90 views

Problem using Nonlinearfit on integral function

I tried to fit my data with a very complicate Integrated function. But I get many errors messages when I perform the fit. For exemple I get : NIntegrate::inumr: The integrand ....has evaluated to ...
0
votes
1answer
34 views

Model fitting for concave curve: test if asymptote or convergence exist

I am asking a double check if conceptually I set up proper model and proceeding in good direction to drive conclusions. I have a distribution that looks like this: I want to test if for increasing x ...
1
vote
1answer
48 views

Fit Gaussian Function [duplicate]

I want to fit the Gaussian Function for the following data. How should I do it? ...
10
votes
1answer
123 views

Quantile Regression using Neural Networks (Custom Loss function)

I would like to perform a Quantile Regression within Mathematica's neural network framework. Since there exist a couple of tutorials for this exact problem in Tensorflow, i.e. Deep Quantile ...
4
votes
2answers
62 views

Why does the PearsonChiSquare from FindDistribution and DistributionFitTest differ by a factor of $10^{20}$?

This is similar to the unanswered "Why the results of FindDistribution and DistributionFitTest are not consistent?" My more specific question is: Why do the PearsonChiSquare values for ...
0
votes
1answer
57 views

What is the best fit for this data?

First I entered the data and graph it, then I used the non-linear adjustment command to have a model of my data, I asked Mathematica for the square r, to know how good the model was, then I put ...
1
vote
1answer
51 views

Linear regression with weighted data?

LinearModelFit doesn't seem to support WeightedData objects. Is there anything I can do smarter than repeating the data ...
0
votes
2answers
60 views
4
votes
2answers
119 views

How do I treat the results of Fit as text?

I would like to take the results of Fit (or any FittedModel) and treat them as text, including making substitutions for the ...
2
votes
1answer
67 views

Fitting an equation to data set, am I doing this right?

I have a large data set of different values of time. I want to make 1) a histogram 2) fit an exponential function of form A+B*exp(-t/b) from the data To my understanding, this is how I'd do it <...
0
votes
1answer
50 views

Estimating parameters for pair of differential equations efficiently

I'm trying to estimate the parameters for the following pair of differential equations ...
0
votes
0answers
27 views

Ranging the parameter in Fitting

I want to apply a range for parameters(a,b,c,d).What is the correct way to do it? ...
0
votes
0answers
45 views

Parametric solution of a system of two nonlinear ODEs with data describing only one the functions

I have the following pair of nonlinear ordinary differential equations ...
3
votes
0answers
57 views

Deal with noise and missing points in data [closed]

I have run a simulation which has resulted in some bad data (see graph below). What would be the best way to detect and interpolate the missing points in Mathematica (i.e. remove the noise)? Raw ...
1
vote
1answer
43 views

Why does LinearModelFit give me an equation in $z$ rather than $x$?

I am working on a Mathematica notebook and making graphs for my lab. I can't make a graph for my linearized data as LinearModelFit gives equation in ...
0
votes
1answer
59 views

Convolve and fitting

I want to convolve two equation, then I want to find the parameters. But it doesn't give the answer and Takes too much time. What is the wrong with my code? ...
1
vote
1answer
88 views

Difficulty with FindFit with complex equation

I want to fit the following equation for my experimental data. I used the following code but it does not give the answer. ...
0
votes
0answers
44 views

NonlinearModelFit Method-> “LevenbergMarquardt”, “Newton”, “QuasiNewton”, etc?

Could someone please point me to a tutorial comparing and contrasting the advantages and disadvantages of the many methods to choose from when applying NonlinearModelFit?
3
votes
2answers
73 views

How to correctly write a PDE solving module for NonlinearModelFit

I need to fit a model defined by numerical operations to test data and find the parameters of the PDE. The problem is that I have to NIntegrate the result obtained ...
0
votes
1answer
56 views

How to get more digits from Fit

Taking the example from the Mathematica documentation for Fit, consider the following ...
0
votes
1answer
34 views

fitting data with parameter plus distribution

I have data that I would like to fit with Bessel function https://www.dropbox.com/s/7se9mb2epbietng/data.dat?dl=0 ...
3
votes
2answers
79 views

How to apply assumptions to parameters for FindDistributionParameters?

Say I have data that I want to fit to a distribution while applying assumptions on one or more of the parameters. For example, for ParetoDistribution[k, α, μ] <...
5
votes
1answer
99 views

Automatic Piecewise Approximation

I would like to create the following function: It should approximate a function func[x] by piecewise polynomial interpolations, splitting the approximate function ...
3
votes
3answers
120 views

Find good polynomial fit of square root

I would like to find a good polynomial fit of the square root. I tried the following: ...
1
vote
1answer
35 views
-1
votes
1answer
77 views

How to do two Lorentzian fit

...
1
vote
2answers
61 views

How can I do a “linear” fit on a log log plot

I have plotted some data with a log scale on both axes as shown in the image below. I want to be able to fit this data such that the fit appears as linear on this log-log plot but I haven't been able ...
2
votes
0answers
28 views

How I can use FindFit to simultaneously fit two data sets to two equations having shared parameters? [duplicate]

I think that FindFit package with the method Nminimize yields global minimum if initial values of adjustable parameters are ...
2
votes
0answers
69 views

How to speed up multiple calls of NonlinearModelFit?

I'm trying to do an insane amount of non-linear fits to large amounts of data sets. However, I found that the NonlinearModelFit is horribly slow. Here's the setup: ...
1
vote
1answer
32 views

Why isn't LinearModelFit behaving consistently at different levels of lists?

I get the following results when I run the following regression on datass: ...
0
votes
2answers
65 views

FindMinimum from DensityPlot

I need to find the values of x, y that correspond to the minimum value of the function (in this example it is -1.0, the black area). Code example: ...
0
votes
0answers
44 views

How do I fit experimental data by solving 3 coupled ODEs with adjustable parameters?

I want to fit experimental data by solving 3 coupled differential equations.The ODEs are rate equations modeling the dynamics of hot carriers in semiconductors after excitation. The function use fot ...
1
vote
2answers
131 views

Curve fitting with variable number of Gaussian curve

I have the data which appears like And I decided to use three Gaussian curves to fit it. (This code allows me to manipulate all three curves and put in best guesses for peak positions. Using these ...
-1
votes
1answer
46 views

Performing a nonlinear fit from data imported from a text file

I have a text file data that I imported and I want to fit it with a given equation. I tried to fit but it did not work and gives Here is my code: ...
2
votes
3answers
105 views

Fitting two equations to diferent parts of the same dataset

I have a system that transit between two different states. Each state output varies linearly with time, given by $m t+c$, where both lines intersect the $x$ axis in the same point. The output of this ...
0
votes
1answer
49 views

Nonlinearfit with incomplete data

Suppose I have an ODE model and some incomplete time series data data = {{0,1},{5,6.2},{14,18.4},{28,57.3},{90,105.2},{180,98}} My question, can I still use ...
2
votes
2answers
72 views

Problem using NonlinearModelFit to 2 coupled differential equations

I am trying to find the parameters of a set of differential equations given experimental data. Before I tackled my set of 12 equations, I tried to solve a simpler and similar 2 equation system but ...
4
votes
1answer
110 views

How do I make LinearModelFit flexible to number of parameters using FromLetterNumber?

I want to run LinearModelFit where the number of parameters is not fixed. For example, the following ...
2
votes
1answer
79 views

How to improve my fit?

I use the following code to fit some data given in a previous question of mine: ...
-1
votes
1answer
90 views

What is wrong with my fit?

I am trying to fit the following data: data = Import["https://pastebin.com/raw/gHdYLCbA", "Table"] I use the following code: ...
0
votes
2answers
134 views

Nonlinear model fit with Numerical integration

I'm having trouble writing a Nonlinear Model fit where the model is a numerical integral evaluated with NIntegrate. I have read other questions and answers about more or less the same problem, but for ...
1
vote
1answer
47 views

Improving nonlinear model fit (piecewise function)

I have a piecewise relatively simple function, and I'm looking for three parameters. Here's an MWE: ...
0
votes
1answer
26 views

NonlinearModelFit doesn't work as a function

I use a NonlinearFitModel operation for fitting the piecewised data, and then want to use the result of operation as a function. However, it doesn't work. Could anyone please tell me where can be a ...
1
vote
0answers
24 views

Creating a new list made up by just a particular coordinate of each point in a given set [closed]

what I'm trying to do is a weighted fit from points on a list that is formatted like: ...
2
votes
0answers
33 views

Is there any reason to use FindFit over NonlinearModelFit? [duplicate]

Given that FindFit seems to just be able to return estimated coefficients and none of the other goodies (standard errors, confidence bands, residuals, etc.), under ...
1
vote
1answer
59 views

Optimization of Curve fitting

I have a set of data: ...
2
votes
2answers
90 views

Curve fitting, Polynomial [closed]

I have a data set in such a manner ...
2
votes
1answer
78 views

Fitting a Multi-Exponential Decay With Constraints

I am having trouble finding a way to fit my data in Mathematica to a multi-exponential decay, with the critical condition that all contributions to the decay sum to 1. To start, I can fit my data to ...
2
votes
2answers
46 views

Fitting multidimensional data

Suppose i have some function G[n_,B_,d_] = .... to fit this function i need to collect the data first. However at first i dont understand how to format the data ...