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

learn more… | top users | synonyms (1)

1
vote
1answer
139 views

Fitting data using a series of Sin and Cos

I have the following data representing the normal displacement caused by a normal load applied at the middle cross section of a cylinder: I've made the data available here. I am trying to fit ...
1
vote
1answer
222 views

Can ParametricNDsolve be used for coupled PDEs with 5 parameters?

I have a system of coupled PDEs with five parameters that I only know ranges for rather than explicit values, and I was wondering if I could define a parametric equation with ParametricNDSolve and ...
1
vote
1answer
104 views

Find Numerical Derivatives (With Errors) given some data

I have a question. Suposse I have some data with their respective errors: ...
1
vote
1answer
807 views

Keeping Nonlinear Model Fit Real

So I am using the NonlinearModelFit (NLM) command with a fairly simple function. There are 4 unknowns and the (x, y) points that ...
1
vote
1answer
354 views

Combined NonlinearModelFit [duplicate]

I'm trying to fit a number of data sets. Each of the sets should evaluate to a simple linear solution.ax+b. The problem is, all data sets have interference from a ...
1
vote
1answer
2k views

Using NonlinearModelFit to fit data with errors

Assume we have some data of measurements SeedRandom[9]; data = Table[{i,2*(1 + 5*RandomReal[])*Exp[-0.01*(1 + RandomReal[])*i]}, {i, {0, 100, 200, 400, 700}}]; ...
1
vote
1answer
450 views

Problem using NDSolve

This might be some simple mistake, but I am running out of ideas. I am trying to fit an ODE system to some data. This error keeps appearing NDSolve::nlnum: "The function value {0.299812 - ...
1
vote
1answer
494 views

Problem with NIntegrate in NonlinearModelFit

We are receiving many error messages when using NIntegrate with NonlinearModelFit. Here is a much-simplified version of the code. It arrives at the correct answer after several messages saying that it ...
1
vote
1answer
90 views

How to obtain the best possibe NonlinearFit

Here is some sample data ...
1
vote
1answer
42 views

Mixture coefficients and Parameter estimation for moving Normal distributions

I am searching for a way to do the following steps below. I am stumped and I have stumped a few profs too. Any help would be appreciated. I would like to import data from, say, excel or a .txt file ...
1
vote
1answer
84 views

Fitting composed model to experimental data

I have mathematical model based on equation: $y(x) = 1 - \sum_{b=1}^{\inf} 2c_b \sin(c_b x/L) \exp(ax) $ (1), where $c_b$ are the positive roots of equation: $c_b \cot c_b + aL = 0$ (2). $L$ is a ...
1
vote
1answer
64 views

Inaccuracy of Piecewise function? [duplicate]

I have the following issue and can't find a solution so far. ...
1
vote
1answer
140 views

FindFit::nrlnum What am I doing wrong?

I have a model called qobs: ...
1
vote
1answer
311 views

Fitting data using a differential equation

I have data generated from two functions given below. How can I go about finding a fit of the form: y'[x] == -(a + b/(c + d y[x] + e F[x] )) where a,b,c,d,e are ...
1
vote
1answer
251 views

dynamically set fit parameters and models with FindFit

I want to fit a gaussian profile by setting some values dynamically, but FindFit returns an error and i can't see the problem. with a given gaussian: ...
1
vote
2answers
236 views

Plotting a dynamical NonlinearModelFit Function

Currently I'm playing around with dynamics and the NonlinearModelFit function. To be precise, I want to fit a function the data, which range I want to specify ...
1
vote
1answer
119 views

How to find best MLE using `FindDistributionParameters`

This question is an extension of this question, if we change the initial values ...
1
vote
1answer
154 views

How can I nicely overlay fits for multiple arrays with ListPlot or ListLogPlot?

I'm plotting multiple lists with ListPlot[] or ListLogPlot[]: ListLogPlot[{ListA, ListB, ListC, ListD, ListE}, PlotRange -> {{0, 100}, Automatic}] I also have ...
1
vote
1answer
374 views

Method used by FindFit

Using FindFit, Mathematica selects an optimal algorithm when Automatic is selected. I'd like to know the name of the method ...
1
vote
1answer
456 views

Optimizing the fitting of Ordinary Differential Equation(NDsolve) involving interpolation functions

I am a newbie to this forum. I am trying to use NDsolve to solve some ODEs involving the interpolation function. Then, I will compare the fitted curve and data to determine the ODE coefficients. ...
1
vote
1answer
235 views

System Identification with large Input/Output Data

I have some questions about system identification. I made some measurement of current step (input) and voltage response(output) and I want to fine the parameters of my impedance. The sample rate is ...
1
vote
0answers
59 views

Fitting curves with NonLinearModelFit not working with charge and discharge like data

I'm trying to get a reasonable fit out of mathematica, but i'm not very practical with it. I'm not that good with mathematica at all actually(like cleaniness of the code...). btw, here's my problem: ...
1
vote
0answers
31 views

Error associated with parameters in Minimize (or NMinimize) in discrete fitting

my problem goes as follows: I need to a discrete fit of a discrete function. Say I have the following made up data points, which are generated by the parabola ...
1
vote
0answers
59 views

Updating procedural fitting algorithm to more efficient style?

For some time now, I have used this procedural programming approach to fit data in my research that is too cumbersome for the built in Mathematica functions. (Although this simple example works fine ...
1
vote
0answers
51 views

Findfit doesn't provide reasonable results when fitting a complex function [closed]

I am trying to fit some data using the function which contains two parameters (a, b) as described below. Hope to determine the a, b that best fit the data. My input is: ...
1
vote
0answers
66 views

Simultaneous fitting to multiple data sets with multiple variables and some common parameters

I am trying to fit two data sets to a function model described below which share a few common parameters. Say I have two functions with some common parameter(s) ...
1
vote
0answers
42 views

Plots to check all assumptions of linear regression

I'm running a linear regression with LinearModelFit and would like to plot graphs to check the assumptions of linear regression: linearity, independence of the ...
1
vote
0answers
41 views

How to regress negative log? [closed]

I made a regression using Linearmodelfit. The residual-fit plot showed that this was not a good approximation. Now I'm trying to use Nonlinearmodelfit. I assume my data to have a negative log look. ...
1
vote
0answers
32 views

Non-aggregated solution for NonlinearModelFit [closed]

I try to fit a rather simple functional form to data, lm = NonlinearModelFit[estdata, a + b*x^2, {a, b}, x] obtaining ...
1
vote
0answers
80 views

Comparing two ways of fitting systems of ODEs to data

I'd like to ask you if you see any difference between the two following ways of estimating parameters. Given my system of ordinary differential equations that I want to use to find the values of all ...
1
vote
0answers
61 views

Cross-validation of a FittedModel

Although I would know how to perform cross-validation tests after fitting a model using a function like NonLinearModelFit, I wonder if there is a way to do this providing the right parameters to the ...
1
vote
0answers
34 views

How to fit data with numerical solution of system of parametric ODE? [duplicate]

I need to find the parameters (k1,k2,k3,k4,k1r,k2r,k3r,k4r) that fit my data (list of [Intensity, time]) using the function ...
1
vote
0answers
132 views

Developing easy code to apply Delta Method to generate prediction bands for custom distributions

I think that this is an interesting issue for all those who when to not only adjust one prediction function, but also to obtain the prediction bands to asses the graphical or tabular error I'm trying ...
1
vote
0answers
41 views

A more efficient way of fitting a non-linear model that returns an entire list?

I have a function that takes two parameters, del and nu, and returns a list npoints long ...
1
vote
1answer
106 views

Multiple Linear Regression - obtaining equation with constant term

I am trying to use the LinearModelFit function to obtain a linear regression of my 5 inputs for my single output. I have the input data: ...
1
vote
0answers
269 views

Speeding up Nonlinearmodelfit by constraining parameters?

I have a complicated parametric PDE that can be fitted to some data with NonlinearModelFit, but takes several hours to estimate the best values of the four free parameters. Currently, the code ...
1
vote
0answers
142 views

LeastSquares with some parameters missing

I want to do a partial least squares (PLS) regression using LeastSquares on my data. The input parameters are temperature, humidity and pressure for a given date. ...
1
vote
0answers
95 views

Can we ask ComponentMeasurements to use NonLinearModelFit to return a covariance matrix for underlying intensity data?

I'd like to be able to calculate a covariance matrix for some data underlying a morphological component. Provided this data, I can write something like: ...
1
vote
0answers
725 views

How to Output Chi-Squared Statistics when using NonLinearModelFit

I am using NonLinearModelFit for some curve fitting and I was wondering if NLM is able to output chi-squared/leastsquared statistics from the best-fit parameters and confidence intervals. From my ...
1
vote
0answers
223 views

To what extent can NonlinearModelFit be sped up?

Can NonlinearModelFit be parallelized or compiled to allow one to achieve a scalable speedup for a fitting procedure? Attempting to use this function to fit a ...
0
votes
3answers
377 views

Creating simple procedure for The Least-Square $m^\text{th}$ Degree Polynomials

I am CS major, taking Computational Numerical Analysis course. Instructor gave us freedom of choice, we were allowed to use anything or any computer language we picked, I picked Mathematica.This is my ...
0
votes
3answers
1k views

Fit line similar to power of trendline in Excel

Is there a way to fit a line similar to power trendline in Excel? Something in this fashion: Fit[data, {1, x, x^(-n)}, x] ...
0
votes
2answers
136 views

Least Square Fitting

stuck on a mathematica assignment and could really use some help. A) Fit a function with the shape log(Y) = a0 + a1log(U) to the datapoints (log(Ui), log(Yi) with an least square fitting. Show this ...
0
votes
1answer
136 views

NMinimize holding problem

I have a function that I want to minimize numerically through an NMinimize command (because it's very complicated analytically). The minimizer call looks as follows: ...
0
votes
1answer
133 views

fit recursive function to data

I have a function $g(x, n)$, which is a recursive expression: $x$ is a variable and $n$ the number of iterations. In my case $n=3$ for all $x$. An example is the following: ...
0
votes
1answer
72 views

Fitting data with inclusion of constraints

How do I find a fit for the dataS (see below) with the constraint that the parameter np is an integer, and that the parameters la+lc = 100. A weak attempt at this is provided below for a specific ...
0
votes
1answer
103 views

Making a fit to my empirical data [closed]

I want of plot the fit for the graph The Data for this graph is ...
0
votes
2answers
161 views

Error function fit of data

I have this experimental data set which I know should follow the Complementary error function. My goal is to find the σ of the associated gaussian distribution. However, I cannot seem to do it in ...
0
votes
1answer
86 views

Fitting data to a circle with FindFit

I'm currently trying to use the Mathematica's FindFit command to fit a curve of some data to the bottom half of a circle. The data is of the form ...
0
votes
2answers
62 views