All Questions
Tagged with linearmodelfit or fitting
1,768 questions
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?)
...
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:
...
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 ...
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) ...
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 ...
2
votes
1
answer
180
views
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
...
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 ...
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 ...
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 ...
6
votes
3
answers
406
views
0
votes
1
answer
70
views
NonlinearFit with series coefficients
I have a set of data:
...
-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 ...
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]
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 ...
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
...
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 ...
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.
...
0
votes
0
answers
82
views
Fitting data with weights in a Log-Log scale
I need help.
I have the following dataset:
...
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-...
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 ...
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 ...
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 ...
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:
...
0
votes
1
answer
307
views
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 ...
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 ...
1
vote
1
answer
143
views
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 ...
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 ...
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:
<...
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 ...
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 ...
1
vote
1
answer
141
views
Exponential fit precision lost
I have a data:
...
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 ...
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 ...
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}{\...
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 ...
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
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 ...
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 ...
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:
...
0
votes
1
answer
64
views
Find fit gives errors and wrong result
I want to find fit to this data and the equation:
...
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]) ...
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-...
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 ...
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 ...
2
votes
2
answers
158
views
Evaluating a FittedModel over a list of values
Simplified version
Using the simpler version suggested by @ulrich-neumann :
...
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:
[...
9
votes
3
answers
500
views