Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
2 votes
1 answer
376 views

Goodness of fit [closed]

I want to evaluate the goodness of two sets or more fitting parameters, using Rsquared and RMSE (root mean square error), Then how to code?) ...
Stan's user avatar
  • 33
1 vote
1 answer
225 views

Finding fit parameters for a 2-dimensional matrix of data if the value of some parameters depend on the row and others on the column

I have some 2-dimensional data of dimension n x m that I suspect has the following structure: ...
edmateosg's user avatar
  • 121
1 vote
1 answer
232 views

Find the parameter in NDSolve giving the desired solution

EDIT: I've edited many times because the system gives errors when the body is modified all at once. I've simplified the problem. The simplification consists of having reduced the number of parameters ...
Gianluigi Tartaglione's user avatar
4 votes
1 answer
427 views

FindDistribution and parameters

If I generate some data using data = RandomVariate[NormalDistribution[5, 3], 100] Then find the distribution using (1) ...
flyingmind's user avatar
0 votes
0 answers
83 views

Norm adding up residual

For FindFit I want to have a norm that just sums up all residuals. For the sum of absolute values there is NormFunction -> (Norm[#, 1] &), but I don't know ...
Fabian's user avatar
  • 77
2 votes
1 answer
180 views

Why can't the data be fitted? [closed]

...
Stan's user avatar
  • 33
1 vote
2 answers
315 views

FindFit; not a valid variable [closed]

I am trying to fit the function in model, however I get General::ivar: 5000.` is not a valid variable. this error. My code is that and ...
asdfg's user avatar
  • 13
0 votes
1 answer
172 views

Interpreting Confidence Intervals From NonLinearModelFit

I recently applied a model to some example data using nonlinearmodelfit and, while the fit was seemingly good (R^2=0.987) and the returned parameters were mostly in line with expectations without ...
sorabella91's user avatar
2 votes
0 answers
666 views

Nonlinear Model Fit - Force a Constrain

I am trying to achieve the best fit for a non linear model, yet I need to ensure that certain coefficients return as positive values. I have been looking for similar questions but I have found nothing ...
Eduardo's user avatar
  • 23
0 votes
1 answer
109 views

Memory problems when fitting large (correlated) datasets

I am trying to fit some complicated function that depends on 18 parameters. The problematic is that I have a large correlated dataset (336 points). When fitting, for simplicity, taking only the ...
pablo's user avatar
  • 763
6 votes
3 answers
406 views

How can I get good fit for polar data

...
MMA13's user avatar
  • 4,781
0 votes
1 answer
70 views

NonlinearFit with series coefficients

I have a set of data: ...
Malum Wolfram's user avatar
-4 votes
1 answer
107 views

Fit a parametric function to a ListPlot [closed]

Imagine I have a list of points that corresponds to points randomly placed on the circumference of a unit circle. I want code that fits a parametric curve corresponding to this list of points. Note ...
Quasar Supernova's user avatar
5 votes
1 answer
229 views

How can I fill this region?

How can I fill this region? Plot[{x^2, x^2 - 2 x + 1}, {x, -2, 2}, PlotRange -> {Automatic, {0, 0.5}}, GridLines -> Automatic]
hana's user avatar
  • 2,550
1 vote
2 answers
147 views

How to recover the original function from a fitting?

Suppose I have an original function as follows fun[x_] := 6*Exp[-4 x^2]; which has the following plot Plot[fun[x], {x, 0, 4}, PlotRange -> All] Then I produce ...
Wisdom's user avatar
  • 1,298
1 vote
3 answers
186 views

How to customize the method of fitting to a specific one?

I have a set of data as follows ...
Wisdom's user avatar
  • 1,298
1 vote
1 answer
585 views

How to fit a specific range of data?

Let me explain my question by a toy example: Suppose I have a simple Gaussian function as follows: test[x_] = 4*Exp[-(x)^2]; If I its data to a new Gaussian ...
Wisdom's user avatar
  • 1,298
4 votes
4 answers
1k views

Find fit function

I want to find a fit function for the following data. Can someone suggest the best-fit function for the following data? The upper part of the data set is difficult. ...
SciJewel's user avatar
  • 575
0 votes
0 answers
82 views

Fitting data with weights in a Log-Log scale

I need help. I have the following dataset: ...
Luigi Mancini's user avatar
2 votes
2 answers
302 views

Is there a way to fit a piecewise linear function to a list?

I need to find a piecewise linear function that is a proper approximation for sunrise/sunset times of each day of year. Due to some limitations, I cannot use any trigonometric functions. So the sine-...
polfosol's user avatar
  • 952
1 vote
0 answers
176 views

How to find the center of gravity of fibers in image

I am trying to find the centers of gravity of my particles in a SEM image. I binarized the image (img) and with the input and help of previous suggestions on that topic (Creating graph out of ...
Nebcfc's user avatar
  • 11
1 vote
2 answers
979 views

Finding best polynomial approximation for function with complicated form and many terms [closed]

I have a function that contains 50 terms hence, it is a complicated-looking function. Now I expected it to be a polynomial function. How can I get this polynomial fit provided I don't have data, I ...
RISHAV SAGAR's user avatar
1 vote
1 answer
268 views

Find best fit function for different data set with errors

I have the following 3 data sets for the same quantity with errors as shown in the figure in different colors. How to find the best fit function of 1) each data set separately 2) combined of the 3 ...
SciJewel's user avatar
  • 575
7 votes
4 answers
433 views

Fit data with NormalDistribution

Good day to all! I have some data that I would like to fit with a normal distribution: ...
Asatur Khurshudyan's user avatar
0 votes
1 answer
307 views

How do I calculate Mean Squared Error of parameters alpha and beta? [closed]

...
Ahmed's user avatar
  • 369
1 vote
1 answer
388 views

How to get a function out of NDSolve

I solved a function using NDSolve and got a result. I also have a plot of the function. Could someone point me in the right direction how I can print the explicit data points and/or generate a fit ...
Nikolo J Bar's user avatar
1 vote
0 answers
84 views

Fitting data using ParametricNDSolve

I have a system of differential equations that are solved using ParametricNDSolve, leaving two variables undefined (m1 and m2) so that they can be fitted to data later. However, Nonlinearmodelfit ...
sorabella91's user avatar
1 vote
1 answer
143 views

Fitting data to a custom Pareto distribution

...
A Day's user avatar
  • 59
0 votes
2 answers
141 views

Plotting data and fitting to a function

I have three sets of data. I would like to plot them in the same graph. Then plot the following fittings to the data. Any help is appreciated! f(v) = (v^2)*exp(-mv^2/2 kb T) f(v) = (v^3)*exp(-mv^2/2 ...
Julissa Velasquez's user avatar
3 votes
6 answers
445 views

Finding fit function for a given data

In the following, there is some data given. How to find the best fit function of one variable with multiple parameters that best describe this data? It's better to check the agreement on the ...
SciJewel's user avatar
  • 575
5 votes
1 answer
156 views

LogitModelFit to predict a categorical variable

I am trying to predict life expectancy based on GDP per capita and literacy rate. Life expectancy is coded as low and high, and the two predictor variables are numerical. Here is some sample data: <...
Julia Ballester's user avatar
5 votes
1 answer
126 views

LinearModelFit for ANCOVA Issues with Fitted Model & Plot with Bonferroni F-value corrections

In attempting to modify the example for generating an ANCOVA model for my data (data3), which is for purposes of illustration the first 20 and the last 20 records of a larger dataset. Here, I seek to ...
Stuart Poss's user avatar
  • 1,975
1 vote
1 answer
190 views

Fitting an Equation to an Image

I'm very new to data analysis and I'm trying to figure out how I can fit an equation to an image I generated from a large set of data I collected. I'd then want to overlap this plot to the image to ...
psf100's user avatar
  • 51
1 vote
1 answer
141 views

Exponential fit precision lost

I have a data: ...
Paweł Chmolewski's user avatar
2 votes
1 answer
199 views

How do i plot a graph for width vs height of the slits from an image

I need to calculate the width of the slits along the length of each slits. I am new to image processing in mathematica and I need to plot a graph showing how the width changes along the length. I have ...
Gokul B's user avatar
  • 21
5 votes
2 answers
735 views

Fit function to histogram

I have a list: histx={-56.6335, -57.2327, -57.8607, -57.9682, -57.0061, -57.1872,-56.9209, -56.1284,...}; I managed to create the histogram that I wanted to: But ...
Paweł Chmolewski's user avatar
0 votes
1 answer
104 views

Set up a distribution in LogLikelihood that depends on data

I want to define a loglikelihood function to perform a fit of some data points to a function, like the following, but using the native LogLikelihood[] function. $ likelihood=\sum_{i}(Log{(\frac{1}{\...
Andrea's user avatar
  • 1
1 vote
0 answers
61 views

Error in NonlinearModelFit for Complex differential Equation

I am trying to create a model that will fit data to a complex differential equation generated from NDSolve. The format that I have begins with ParametricNDSolveValue to find a general function where ...
Henoc Zinga's user avatar
0 votes
1 answer
137 views

Mathematica linear model fit to all data [closed]

I tried to use LinearModelFit[data, x, x] to fit linear curve to all data but I get an error: The data looks like this: Here is the file with data:data
Paweł Chmolewski's user avatar
5 votes
2 answers
792 views

Find Equation for Line Bounding Bottom of Scatter Plot

I have a scatter plot and I am trying to get the equation of a line that best fits the bottom bound of the data. I started by taking some guesses for the best form of the boundary equation and used ...
mathemagician617's user avatar
2 votes
2 answers
249 views

Can the CopulaDistributions be fitted?

This is an immediate follow-up to DoAny--which I did consider editing, clarifying and correcting in some respects. But perhaps here I can put the immediate question at hand more directly (the emphasis ...
Paul B. Slater's user avatar
3 votes
1 answer
442 views

Find a fitting curve to data points

I would like to fit a function to a set of data: ...
J. W's user avatar
  • 71
0 votes
1 answer
64 views

Find fit gives errors and wrong result

I want to find fit to this data and the equation: ...
Gal Zajc's user avatar
  • 511
1 vote
3 answers
333 views

Do any of the Mathematica CopulaDistributions (or others) fit well this sampled bivariate copula with uniform marginals over [0,1]?

I'm currently developing a data set that consists of two $50 \times 50$ matrices, which I designate as q1 and Q1. I strongly believe (bordering on formal proof [cf. Corollary 1 in marginalinvariance]) ...
Paul B. Slater's user avatar
2 votes
1 answer
138 views

(NLM @ Circular TimeSeries model ) == invalid phase confidence intervals

In the realm of TimeSeries of data with Circular Statistics, NonlinearModelFit (NLM) correctly generates reasonable Standard Error & confidence intervals for phase parameters (phaseCIs) with x-...
A Chase Turner's user avatar
2 votes
1 answer
197 views

Fitting data to a system of ODE

I have a system of two ODEs depending on two parameter k,h and I want to find the best k,h to fit some data. To understand if my code works I started generating some fake data from the equations. Here ...
user_1922487's user avatar
0 votes
1 answer
420 views

Fit a good Lorentzian in mathematica

Good morning everyone, regarding my research "high resolution laser spectroscopy" I would like to fit the data obtained from the experiment with a Lorentzian curve using Mathematica, so as ...
Albano Tabacchi's user avatar
2 votes
2 answers
158 views

Evaluating a FittedModel over a list of values

Simplified version Using the simpler version suggested by @ulrich-neumann : ...
Martin42's user avatar
1 vote
1 answer
68 views

unable to fit dataset

I have two experimental datasets namely [Alpha]s and [Alpha]b. I have also a model by which both [Alpha]s and [Alpha]b are correlated. These have both x axis and y axis data. Following is my model: [...
P Pyne's user avatar
  • 552
9 votes
3 answers
500 views

Trying to fit a circle. Data have weights

...
Jerry's user avatar
  • 91

1
3 4
5
6 7
36