# Questions tagged [fitting]

The process of fiting some statistical model to a particular set of data. Mostly done on a computer, and using varied numerical methods such as optimization or numerical integration, or simulation.

559 questions
26 views

### Working out a metric for the goodness of fit for 2D data in time

I have a dataset which I wish to optimise a fit for. The data might look something like I.e. orange is t=0, blue is t=1, and green is t=2. I wish to find a fit. I have a differential equation ...
12 views

### Model that fits ellipse for pupil detection

I have an eye tracking system which fails to correctly detect the pupil in the camera image when there is a larger luminance gradient across it. This happens if the pupil is very dilated. For me it's ...
91 views

### Male-female height difference estimation from thresholds

Introduction. Assume that two populations $A$ and $B$ are distributed with normal distributions $N(\mu_A, \sigma_A^2)$ and $N(\mu_B, \sigma_B^2)$. This is a general problem, but as an example, I will ...
18 views

### Fitting a multivariate Gaussian with extremely sparse samples

We have a multi-variate Gaussian distribution. For instance with 3 variables. The correlations between the variables are important! We are fitting it to data, however, the samples are such that each ...
20 views

### Should the reduced chi-sq of a fit to some points be the same as the reduced chi-sq of a fit through a weighted average of those points?

I have nine data points with three of them taken at x = 2, three taken at x = 4, and three more taken at x = 6. I came up with a straight-line fit for these points, and found the reduced chi-sq of ...
4 views

### Finding expected range of values in multi variable reduction

For a least-squares reduction to find expected values for $a,b,c,d, ...$ from a number of equations like: $a + b = n_1$ $a + c = n_2$ $b + d = n_3$ $c + d = n_4$ ... My question relates to ...
96 views

### How to improve this time series model?

I am trying to fit a time series model for household data which is a time series variable. Initially my data looks like this, Since the data does not seem to be stationary I differenced the data. ...
14 views

### Distribution identification with respect to number of fitting parameters

I want to check a sample of measurements against different distributions in order to determine the underlying distribution. Distributions should be yielded based on probability or goodness-of-fit ...
52 views

### Is it possible to fit a binomial cumulative distribution with only three data points in R?

I have three data points (0,0), (30,0.1538), (60,0.4914). Is it possible to fit a binomial cumulative distribution function only using these three points in R? If not, what sort of extra information ...
34 views

### Determining error between two surfaces given same discrete inputs?

Apologies if this isnt the best SE forum to ask on, but it seems relevant here. I have, as an output of a machine learning algorithm, a surface in z, which has known increments along x and y. These ...
22 views

### Uncertainty from equation involving fitted parameters [closed]

I want to estimate the uncertainty of a calculation which involves a quantity from a fitted mathematical model. More specifically, the end calculation would be something like: P = x / A_tot where I ...
45 views

### Fitting the Poisson distribution to binary data

I'm studying several time series. The variables of interests are dummy variables which take value 1 when a certain event happened, 0 otherwise. I want to find the best distribution to describe these ...
19 views

### Inestability of BIC when selecting nested models

Currently I am working with spline regression and a method for selecting knots adaptively. My method gives me a set of potential knots that generally has a large number of elements. Following He et al....
27 views

### R - Fitting a Coxian phase-type distribution to data

Using R, I would like to fit a Coxian phase-type distribution to a vector of waiting times ($t_i$) where the $\mu$'s and $\lambda$'s are unknown i.e. I want to find ...
9 views

### Fitting of 2D data [duplicate]

I have a 2D data-set. If we plot, it looks like above. Now if I want to know the central value of the distribution $\theta$ and width of the distribution $W$. How do I do that?
8 views

### When making a fit to data without weights, how reliable are the fit errors?

I often need to fit data which is a spectrum. And it isn't possible to have many identical spectrum from which to produce error bars on the individual points in an averaged spectrum. So my question ...
68 views

### Change variable to log transformed or keep original?

A log transformation of the dependent variable is sometimes recommended as a remedy for some cases of non-normal distribution of residuals after fitting a linear regression model. What is the proper ...
33 views

### Do mismatches in areas of peak density affect the KS-test more than mismatches in low-density areas?

In the following plot you see my empirical data (black) plotted against a hypothesised distribution (blue). However, a KS-test shows that there is no indication that my sample follows this ...
34 views

### R - How can I fit the following data and get the equation describing them? [closed]

I have a following data-set: ...
31 views

### Plot confidence interval of average polynomial fit from coefficients

I am studying the propagation of a wave and to do that I want to follow the position of my maxima over time. In order to do that I thought to fit a polynomial on the data of each replicate, then save ...
63 views

### Are $h_i(x)=x^{-\alpha_i}$ okay basis functions for fitting?

I have some pairs of data ${(x_1,y_1),..., (x_n,y_n)}$ genereated by some process and would like to fit it with a function so that $y_i \approx \hat{f}(x_i)$. By plotting the $(X,Y)$ on a 2D plot, ...
52 views

### Based on the ideas of Parameter Estimation and Fitting Probability Distributions, what stops us from making any function be a PDF(PMF)?

Currently I am doing an introduction to parameter estimation and fitting probability distributions to sets of data. So in a small synopsis what I understand the whole process to be like is the ...
419 views

### Why we do not accept the result of our simulation study as evidence of a limitation of one method

I am doing a mixture model. I have established a new method using EM-algorithm. I have simulated data from a mixture model. Then, I applied my new method to the data. The result is very satisfying. ...
121 views

### In Bishop's textbook, is the example of overfitting exaggerated?

Here, the data $x$ are randomly generated, and $t$ are generated by running $x$ through a function $\sin(2\pi x)$, then Gaussian noise is added. Bishop's text then tries to fit those data using a ...
57 views

### How can I understand the concept of a noise in machine learning?

In Bishop's book, one of the first examples is shown here Essentially, the data $x$ are randomly generated, and $t$ are generated by running $x$ through a function $\sin(2\pi x)$, then Gaussian ...
21 views

### How to fit a superimposed distribution (\eg a Gaussian distribution + a Uniform distribution)

Suppose we have a set of independent observations of a random variable X, which is a Superimposition of two mutual independent random variables (i.e. X = Y + Z), Y follows a uniform distribution, ...
67 views

### R - how to estimate shape and scale parameters of Weibull distribution for claims development factors

I have a set of insurance data. Development factors fall with period, so follow Weibull distribution. I want to estimate Weibull parameters and smooth Development Factors. If I estimate parameters of ...
18 views

### Fitting wrong copula type to a real data set

I have developed a new mixture copula model. This model overcomes some limitation of copula models. I tested my new model on a simulation data. The model shows a superior result. My supervisor asked ...
35 views

### Inferring GMM parameters with Gibbs Sampling

On my book, "Machine Learning A Probabilistic Approach". It's stated that is straightforward to derive a Gibbs sampling algorithm to fit a mixture model, especially if we use conjugate priors. So ...
51 views

### How do I fit a cumulative Gaussian distribution in R? [closed]

I am trying to fit a cumulative Gaussian distribution function to my data, but I'm not sure how to do this. From what I understand, the fitting process tries to find the mean and standard deviation of ...
22 views

### Model fit for StMoMo

As a statistics newbie, I am trying to model mortality. I grabbed majority of the code from the package Vignette, and fitted the data. However, model fit does not seem to be great in my reproducible ...
50 views

### Compute log-likelihood from sum of squares?

I have fit a 2D Gaussian to a surface in Matlab and need to compute the log-likelihood of this fit. Can One use the sum of squares between the Gaussian model and the actual surface to compute the log-...
17 views

### AR(1)-GARCH(1,1). A bad fit with log likelihood?

Consider these two DCC models: ...
145 views

### Fit data to parametric distribution

I have data with nice bell-shaped histogram PDF. However, the Normal distribution fitting (by calculating mean and variance) does not work as the figure below. My question is that if there are other ...
35 views

### Best way to model the dependency of these two random variables (copula?)

I'm modelling the joint PDF of two variables that looks like this , where vt and vr are the random variables. The dashed line shows the joint pdf assuming they are independent (the product of its ...
32 views

### Choosing model for feature selection on categorial data

I have a dataset composed 30 features and 1 response. My response is 0 or 1 and, all of my features composed three status includes = -1,0,1. I wanted to do features selections in R, firstly I want to ...
86 views

### How can I do a fit for negative $y$-data, which has exponential phenomena? [closed]

How can I do a fit for negative $y$-data, which has exponential phenomena? Such as: ...
26 views

### Proof that sequential GARCH fitting is not efficient?

I've read that authors like Tsay (as well as several other researchers) use a sequential method for fitting a ARCH-type model. This means first estimating the conditional mean model (ARMA-type) and ...
45 views

### Data Transformation to achieve Linearity

One assumption of OLS regression is Linearity. To check whether the assumption holds, you can plot component + residual plots or partial residual plots. When a linear relationship is apparent, is's ...
44 views

### Fitting a multiple linear regression in R [closed]

I have annual mean temperature and precipitation data from 1901 to 2015: I want to do a multiple linear regression: ...
35 views

### Estimating posterior probability from a random grid

I am simulating the evolution of galaxies, and want to find the distributions of input parameters that best reproduce an observation of a particular galaxy. I have a measurement $y \pm \sigma$ of a ...
27 views

### r - Poor model fit with StMoMo package on Human Mortality Database

I am fitting USA mortality data from Human Mortality Database (with data downloaded from here after registering for a free account https://www.mortality.org/cgi-bin/hmd/hmd_download.php) with the ...
18 views

### Measure goodness of fit between a model that has error and data with error

Is there a way to express how well a model matches data where both have uncertainties? I looked for other examples that may capture this, but was unsuccessful in finding one. If you happen to know of ...
38 views

### How to detect an increase in a loess model fitted value at the end

Sorry if the question is trivial, but I'm not finding a proper idea for this issue. I'd like to find if a series of fitted value of a loess is increasing in the end. I'm working with some data like ...
27 views

51 views

### Compairing the fit of quasi-Poisson and negative binomial models

Is there any way to compare the fit of quasi-Poission and negative binomial models in R?
36 views

### How to understand the results of nonlinear mixed-effects regression model

I have some data, obtained from 4 different groups. Each repeat is some 4 parametric sigmoid. I need to fit the data to sigmoidal function and answer the question, whether sigmoids are different ...