# Tagged Questions

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

74 views

### NonlinearModelFit with indexed parameters

I have an instrument calibration problem for a multi-channel instrument. Some of the calibration parameters are common between channels, while others are per-channel. Toy example: ...
50 views

### Get slope of linear fit

This may seem silly, but I've been crazy for the last hour trying to find a way to automate the linear fit of my data. All I need is the slope. Say I have some data ...
28 views

### Priority on Fitparameters

I try to fit a function using the FindFit expression. My problem is that ZL has to be ...
49 views

### Surface fitting involving factorial function [on hold]

I have a large data set made up of triples, (x, y, f(x,y)), x, y and f(x,y) are all integers. I don't know the function f(x, y) and my goal is to find (estimate) it. I do know that x can be any ...
39 views

### Plotting a dataset and its fit dynamically

I have the dataset ...
61 views

### Importing Data to interpolation

I have an external file in extension XLS with looks as follows: This file can be obtained by the link below: Velocidade Angular With certainty this file is generating a list inappropriate for the ...
34 views

### Interpolating data while imposing the behavior of a cumulative distribution function

I would like to interpolate a data set which represents a curve of an empirical cumulative distribution function (CDF). Hence, the y entries are between 0 and 1, continuous and non-decreasing, and at ...
40 views

### FindFit with compiled function [closed]

I try to fit parameters of my experimental data by FindFit. For the model function I use a compiled function, that does numerical calculations. Unfortunately, I get ...
68 views

### Predicting the initial conditions of orbits inside a closed curve

I have a data file containing the four orbital element $(x,y,p_x,p_y)$ of a two-dimensional closed loop orbit. Note that the exact implicit equation of the orbit is not known. The plot of the 2D ...
134 views

...
148 views

### Simultaneous plotting

For my experiment, I have to simultaneously fit the real part and imaginary part of cavity reflection data which is given here column 1: frequency, column 2: reflection magnitude, column 3: phase I ...
78 views

### Softmax Regression Classification Algorithm

I'm following the Stanford Machine Learning course while simultaneously developing my Mathematica abilities. I'm having issues with my Softmax Classifier implementation (for ref, have a look at these ...
35 views

### NonlinearModelFit error: the function value is not a list of real numbers with dimensions {101} at {a,k,m0} = \ {1.,1.,1.} [closed]

So I'm trying to find a sigmoidal fit for my numerical solutions of these two ODEs but I keep getting an error and I don't know how to get around it. Here's my code: ...
108 views

...
104 views

### Complex Fit, using NMinimize?

I'm having trouble fitting this complex data: ...
34 views

...
118 views

### Nonlinear Fit sometimes does a good job and sometimes doesn't

So I'm trying to fit data, for all my data, the same fitting function can be used. Sometimes the fits actually FIT really well. Sometimes they just look completely random. Here's an example of it ...
39 views

### Minimization With Complicated Divergent Model

I´m trying to use a minimization of a $\chi^2$ function (or similarly a fit) of some data with a complicated function. The problem is that the function has some divergences, and thus the problem ...
52 views

### Using LinearModelFit, how can I test the hypothesis $\beta=c$ with $c\neq 0$?

Assuming a simple linear model $y=x\beta+u$, is there a way to test the hypothesis $\beta=c$ with $c\neq 0$, using the LinearModelFit?
88 views

### Data Fitting problem

I'm having this kind of data, and I know what possibly the equation is, i suspect this has a sine equation but the plot not really seems sinusoid. so what possibly the equation is so i can do the ...
57 views

### Solve equations involving summation expressions in Mathematica

I am trying to solve the simple linear regression equation analytically in Mathematica (not using builtin functions). I managed to calculate the gradient as follows f is loss function using RSS and ...
117 views

### How to fit this model [closed]

I have such data ...
59 views

### Fitting log-linear data

I am using NonlinearModelFit to extract the gradient of what appears to be linear data in a logplot: ...
67 views

### FindFit works, NonlinearModelFit doesn't

I have a problem using NonlinearModelFit vs FindFit. Here is my code. ...
86 views

### best fitting crossing divides region plots with different background colors

We have two lists: ...
29 views

### data fit using second order PDE

I'm trying to find the parameter for second order PDE using data. i don't know what is the error of that, ...
65 views

### Linear regression

I have a sequence of data: data = {0.647888, 0.522495, 0.454224, 0.417054, 0.396816, 0.385798, 0.379799, 0.376532, 0.374754, 0.373786, 0.373259, 0.372972} How ...
57 views

### Numerical fitting trajectory to model that has NDSolve

I have a model which describes the motion of an object on a plane. ...
87 views

### package for calculating exponent of power law distribution

There are some packages to fitting power law to empirical date in "R", "matlab", "python" Here with maximum likelihood method As it said here. Does it exist similar package in Mathematica?
106 views

### Fitting Three-Dimensional Data with Parameters

I have been trying to fit a model of rate equations to data of three dimensions. The rate equations in my model are as follows. ...
82 views

### How to calculate unknown parameters

I have measurement data from impact test-test specimen location (Charpy). I am used by the plotting in excel this formula hyperbolical tan Y=y0+a*tanh[(t-x0)/b] ...
139 views

### Locally Weighted Linear Regression

I am following the online Stanford Course in Machine Learning and I am trying to implement the algorithms on the fly in Mathematica. Currently, I have issues with minimizing the Locally Weighted ...
31 views

### Use “FindFit” for Multi-variable Polynomial Fit

I'm interested in defining three input vectors: $L=\{L_{1}, \ldots, L_{N} \}$ $W=\{W_{1}, \ldots, W_{N} \}$ $Q=\{Q_{1}, \ldots, Q_{N} \}$ and I'm hoping to be able to input a number for each of ...
43 views

### importing mortality rates [closed]

In[1]=dataFrance = Import["G:\french female death rates.xlsx"] Out[1]={{{""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {"0 \ 0.003531 "}, {"1 0.000312 "}, {"2 0....
68 views

### forecasting for mortality using a logistic regression

I need to know how to do a forecasting for mortality using a logistic regression, can somebody help? ...
72 views

### Filtering Background with resonance or Peaks

I have some data, the blue curve which I want to filter out the background to get a flat signal with dips(Idea is to divide signal (except the dips) by the background). The orange curve is my best ...
140 views

### Using StepMonitor/EvaluationMonitor with DifferentialEvolution in NMinimize

My question about tracking the progress of a minimisation/fitting process is two-fold: 1. The first part of my question can be considered a slight duplicate/follow-up of this question. There the OP ...
56 views

### How to force a Range on Fit?

I have 1001 points between {x,-5, 5}. I wanted to fit a polynomial over the data but when i try: Fit[Flatten[data], {0, x, x^2, x^4, x^5, x^6}, x] ... the range ...
59 views

### Looking for a convenient way to replace a large data sample with an analytic approximation

Suppose that data is a large data sample, and that Histogram[data] produces a very smooth-looking distribution. Since ...
255 views

### Mathematica Interpolation or approximation

I have lists of points X and Y. {1212,1216,1217,1219...}, {1,2,3,4,5,6...} I combine ...
196 views

### How to measure accuracy of prediction distribution?

I have been trying to come op with a way to test if my dataset follows a Poisson distribution. Normally one would use the DistributionFitTest function, but here is ...
69 views

### NonlinearModelFit memory problem

I have a problem while trying to make a nonlinear fit of the following data: qn = NSolve[Tan[q] == 3*q/(3 + 1870715*q^2) && 0 < q <= 65, q] ...
131 views

### How can I fit cyclic experimental curve with a couple of differential equations?

I have an experimental cyclic curve which looks like this: ...
62 views

### Nonlinear fitting of a Gaussian beam model

I am having some troubles with the NonlinearModelFit function. However hard I try, I cannot get a nice fit curve for the data points. I know the parameter "a" is about 15*10^-6 but even if I plug in ...
47 views

### PearsonChiSquareTest for count/frequency data?

I read with interest a previous question on the PearsonChiSquareTest from a few years ago, and one answer was very helpful: Performing a chi-square goodness of fit ...
638 views

### Fit a function to data so that fit is always equal or less than the data

I have a set of measurement data and I try to fit there a function (a Exp[b x] + c Exp[d x] - o). I have two problems: The fit function does not converge nor ...
36 views

### Is it possible to get the error estimates of predicted values computed by FindMinimum using the Levenberg Marquardt method?

I use the LevenbergMarquardt method of the FindMinimum function to minimize a residual function (mathematical-optimization). This residual function is computed from experimental data and the solution ...
105 views

### How to fit two datasets with common fit parameters?

I have two data sets which go: ...