Questions tagged [curve-fitting]

Methods used to fit curves (as in linear or non-linear regression) to data.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

Combining data from multiple studies - best approach?

I'm looking at an old paper on the incidence of HPV infection by age cohorts. The authors present a plot of estimates from many different studies around Europe which looks like this - note the authors ...
user avatar
  • 217
2 votes
0 answers
39 views

Recovering samples from a density estimation with an additional prior on the samples. Used for Gibbs sampling

Abstract Idea: Given a noisy measured density ($d_j$ at position $p_j$) and a density model, sample from the model parameters under the following stochastic model: Stochastic Model: Prior for model ...
user avatar
  • 21
1 vote
1 answer
42 views

Describing / fitting a highly skewed distribution

I've got a data set of 84,529 entries, each entry referring to the number of times a particular entry is cited in a database. This set is extremely skewed, ranging from entries with 0 citations to one ...
user avatar
  • 217
0 votes
0 answers
15 views

How to fit joint models for longitudinal and binary (outcome) data?

Joint Models are mainly viewed in the literature within the context of longitudinal and time-to-event data. For this reason R packages as JMBayes were built to fit these kind of models. Nonetheless I ...
user avatar
  • 3
0 votes
0 answers
22 views

How to predict single y target based on several X values? [duplicate]

I try to predict the result of an personality type test based on how people answered. My sample consists of the answers which range from 1 (strongly disagree) to 7 (strongly agree). Six answers lead ...
user avatar
0 votes
0 answers
22 views

Expand a Gaussian numerically with a basis of functions

I am asking a question that is math, but I am not sure if machine learning can help too, so posting here! I have a univariate Gaussian function $\phi_{\mu, \sigma}(x)$, with mean $\mu$ and variance $\...
user avatar
0 votes
1 answer
18 views

How to fit a gradual upward curve

I'm trying to fit a curve to my data (shown below), but I'm not sure of the best way to do it. I tried an exponential function following this tutorial, but it didn't fit the data at all (just a ...
user avatar
  • 143
0 votes
0 answers
18 views

Advice on fitting curve to three-pooled plant decomposition model in r

I have just finished running a plant decomposition experiment measuring the decomposition of pine needles across climate and lithological types. We have mass loss, plant chemistry data (c, n, labile ...
user avatar
0 votes
0 answers
33 views

How to incorporate standard error into non-linear model?

Suppose you have some function $f(x)$ which represents the mean value of an experiment related to $x$. Then $\epsilon = \sigma(x)/\sqrt{n}$ is the error associated with each point $x$. Assuming that ...
user avatar
  • 1
0 votes
0 answers
10 views

comparing data regularity

I have data about ratings from 5 sessions, it appears that initially ratings are random, and with experience, they become more 'defined', settling into a pattern (see graph below). How can I test this ...
user avatar
  • 73
0 votes
1 answer
59 views

Fitting a cubic-like curve to data in R

I tried using nls() in R to fit the following expression to a set of data: where g=9.8, alpha & B_0 are unknown, a = 0.01, z_0 = 0.3 such that: theory <- as.formula(V~-(9.8)ab*(pi)(0.02^2)(T)(...
user avatar
  • 3
0 votes
0 answers
10 views

Fitting data with a N-dimmenstional matrix

For my thesis I should fit my data points to a concept from statistical physics - Zimm-Bragg model. Let us consider a chain build of blocks in a state H. When i heat up the sample the blocks can ...
user avatar
  • 11
0 votes
1 answer
38 views

Exponential fitting in R with fixed minimal value

I need approximate datapoints by exponential function with some type of lower limit (variable "y" is price in time and I need fixed minimal value, so asymptote of exponential function cant ...
user avatar
  • 101
1 vote
0 answers
15 views

How to fit a distribution if the samples have not been draw randomly

I read the posts here and here. The real-life problem is: In a rare event simulation catastrophic events occur extremely seldom. The performance of my underlying system has an unknown distribution and ...
user avatar
  • 36
0 votes
1 answer
29 views

Optimization (minimization) algorithm - hitting on boundaries

I'm struggling with a challenging optimization problem with real-world experimental data. Simply put, it's about fitting a exponential decay model to a curve (decay). Essentially, I am trying to ...
user avatar
0 votes
2 answers
64 views

GAM with Beta-Binomial family on very large data

I am trying to fit a GAM on (success) counts assuming they follow a beta-binomial distribution. Each data point has three values: 1- Number of trials (N) 2- Number of successes (n) 3- A covariate (p) ...
user avatar
  • 11
0 votes
0 answers
8 views

Error "propagation" under base change

Imagine you have fitted a curve to data in $x$-$y$-space and obtained errors $\sigma_x$ and $\sigma_y$ for each data point. But now you rotate the coordinate system by $45^\circ$ for example. Can you ...
user avatar
  • 105
0 votes
1 answer
55 views

Should histograms be normalized first before fitting them?

Assume I have some data that follow a power law and I would like to estimate the exponent $a$. An obvious way to do so is to bin the data and then fit the power law to the histogram. However I found ...
user avatar
  • 105
0 votes
0 answers
14 views

Roc curve straight line interpretation [duplicate]

How can I fix the straight line? is that mean that 70% of my cases that tag as positive and actually negative have the same value?
user avatar
1 vote
0 answers
73 views

Find a smooth function that maximizes a composite likelihood function

I need to find a smooth function $f$ that maximizes an objective function $g$ over its predictions on a predefined set of values $p$: \begin{equation} f^*=\arg\max_{f} g(f(.),p,X) \end{equation} In ...
user avatar
  • 11
0 votes
0 answers
42 views

How to clean dataset in order to fit to a curve? [duplicate]

I'm trying to fit a dataset to a curve for while, but I'm not managing. The goal is to obtain a curve with equation that fits the data so I can get the parameter x to any value of y. The blue dataset ...
user avatar
0 votes
0 answers
45 views

Can "Curve Fitting" be seen as an Alternative to Numerical Differentiation?

For a long time, the following point always confused me: If the "Fundamental Theorem of Calculus" tells us that all real and continuous functions are differentiable (i.e. have derivatives) - ...
user avatar
  • 5,718
0 votes
0 answers
22 views

Fitting two lines to convoluted data [duplicate]

Assume you are provided with data derived from two linear equations + noise, such as that below. How would you go about deconvoluting the lines, and obtaining their slopes/biases? Colab link for ...
user avatar
  • 1
1 vote
0 answers
23 views

How can I validate my curve fitting meta-regression?

I'm doing a meta-regression analysis on Normal Pressure Hydrocephalus Gait Analysis. Studying the variation of gait velocity after a procedure (Tap-test). Keeping into account single study (#14) ...
user avatar
1 vote
0 answers
34 views

Which test to use to test for heteroscedasticity in a non linear model/fit?

I would like to test for heteroscedasticity in a non linear fit. I have a explanatory vector x and an explained variable y and ...
user avatar
  • 539
1 vote
1 answer
24 views

In univariate linear regression if you are already using Ordinary Least Square, is cost function still neccesary?

I have a question regarding cost function and Ordinary Least Square (OLS) in univariate linear regression. From my understanding, in linear regression, OLS is used to find the the slope and y-...
user avatar
  • 13
0 votes
1 answer
27 views

Departure from uniformity histogram

Let us consider the histogram of a random variable. It is uniform up to a certain value $\bar{x}$, while beyond it a growth is present,as shown in the figure. I would like to obtain an estimate of the ...
user avatar
0 votes
0 answers
16 views

Fitting Several Linear Regressions at Once

Suppose I have n stocks. X_1 ... X_n. In turn I want to predict the returns Y_1 ... Y_100 over some horizon t. Ultimately ...
user avatar
0 votes
0 answers
24 views

Fitting a distribution to my data, and estimating future transactions

Assuming that I have a list of transactions generated by an unknown process. After fitting a distribution to my data I wish to report the projected sum of n transactions - assuming that it's generated ...
user avatar
0 votes
0 answers
16 views

Fit a Gaussian function (not a Gaussian distribution) to data

I am trying to train a Gaussian function. NOTE: Since we're on a Q&A site with one of its focuses being Statistics, it is worth emphasizing that not all Gaussian functions are normal ...
user avatar
  • 3,437
0 votes
1 answer
40 views

Quadratic curve fit while constraining a term

I get sets of points that are generally linear with slight curvature to them. We've been fitting quadratic curves to them which works fine if we have decent points across the range but if there are ...
user avatar
-1 votes
1 answer
36 views

Interpolation based on a known curve

I have 6 datasets, 1 of which has 20 points, the other five have only 2 (beginning and end points). I want to interpolate 18 intervening points into the 2 point datasets such that the resulting curves ...
user avatar
0 votes
0 answers
17 views

estimating a population-average model with known mean and standard deviation

I have a model with some differential equations describing the effect of a drug. There are 100 rat samples, we only know the mean value and its standard deviation for measured drug response. Now I ...
user avatar
0 votes
1 answer
50 views

What are the theoretical assumptions of a power curve versus an exponential or quadratic one?

I have a set of bivariate biological data that has a clearly non-linear distribution. I have found that a power curve best fits the data under several metrics (e.g., AIC, residuals versus fits plot, ...
user avatar
1 vote
1 answer
32 views

How to know if results of linear fit are significantly different?

I have collected some device measurements that require a linear fit to obtain physical constants that characterize the device under test. I have slope, intercept, and their uncertainties, calculated ...
user avatar
  • 113
0 votes
0 answers
17 views

What uncertainties to use when fitting a distribution model to binned sample data?

A common task is to fit to a sample of $N$ data $x_i$ (assumed 1D for the sake of argument) a model $p(x|a)$ (normalized to unit integral) for their distribution with some parameters $a$. One way is ...
user avatar
  • 101
1 vote
2 answers
111 views

Calculating parameters from non linear regression of sum of exponentials

I am attempting to fit some data that seems to follow an equation that is the sum of two exponentials. When fitting with a single exponential the residual histogram is not normally distributed. The ...
user avatar
  • 13
0 votes
0 answers
46 views

Harmonic regression model coefficient interpretation

I am learning harmonic regression techniques and need a hand interpreting the results of the regression model. I followed the example in the question answer here. and the equation here but I don't ...
user avatar
2 votes
2 answers
177 views

Curve fitting the second integral of a normal distribution

I have a data set of points that I need to fit to a normal distribution, where the points approximate the curve of the distribution's second integral. Examples of such curves are given below in the ...
user avatar
1 vote
0 answers
41 views

How to partially fit a piecewise polynomial with segment boundaries unknown?

Suppose that I have the some data like this. ...
user avatar
0 votes
0 answers
32 views

Estimate argmax of function that is measured at discrete points

I have gathered simulation data of a function $f(x)$, where $x$ is a continuous variable. I measure $f$ at discrete points $x_k$. Since the underlying process is stochastic, I performed Monte Carlo ...
user avatar
0 votes
1 answer
55 views

Choosing a model function for optimization [closed]

When finding a curve fitting of some data like this, which formula is good to choose? Is this a good one? y = c0 + ln(c1*x) ...
user avatar
0 votes
1 answer
26 views

Interpolating curve equation from model data

I need to define an equation to represent a series of points from a model. As they are predictions from an already fit non-linear regression, noise shouldn't really be an issue. I have seen many ...
user avatar
  • 11
0 votes
1 answer
23 views

Fitting distribution to literature-reported incidence rates or cumulative risks

I am building a simulation model in R. In this model, I would like to simulate a patient with a certain baseline age, and then simulate the time-to-event for breast cancer. I want to sample the time-...
user avatar
1 vote
0 answers
16 views

Predicting Repurchase Curves next value based on usual functional form

Some definitions first: Acquired customers: Customers placing an order for their first time. Cohort: Group of customers that have been acquired during the same time period. Repurchase: An order placed ...
user avatar
2 votes
1 answer
97 views

Which function matches this concave pattern in my scatter plot?

I'm trying to find a function that matches the following shape. My first attempt was with a cosine function $$ f(x) = a\cos(b x)$$ which yields the following result: What modification of the cosine ...
user avatar
  • 121
-3 votes
2 answers
202 views

Fit Curve Method

Can I ask, I wanted to model/fit data. Data looks simple, but I want to model t+400 data (as t is current time). Data looks like this: Simple lm: ...
user avatar
1 vote
2 answers
110 views

Fitting a curve with data that is nonlinear in logs

I would like to fit a curve for extrapolation purposes that looks as follows: The dependent variable is already in logs and the independent variable can be thought of as "days" (i.e. it ...
user avatar
  • 181
0 votes
0 answers
44 views

How can I match/fit simulation data with the experimental/reference data by estimating parameters in python

I would like to match/fit the simulation data of a battery from my model with the experimental data I have from lab. The reference for my task is given in this video:[enter link description here][1] I ...
user avatar
  • 1
1 vote
0 answers
17 views

Analyse measurement data with machine learning?

I am frequently receiving measurement data of a particular shape. The data come from a measurement and look roughly like this: https://en.wikipedia.org/wiki/Spreading_resistance_profiling#/media/File:...
user avatar
  • 11

1
2 3 4 5
12