Curve fitting: seversl curves to one

2 ビュー (過去 30 日間)
Redstein
Redstein 2020 年 4 月 12 日
回答済み: Tom Lane 2020 年 4 月 23 日
Hi,
I have quite a special demand: I have a curve for number of housholds for the years of 1960-2020 and want to create a relationship of several economic and demographic curves/datapoints. I want to have the combination of those datasets (demographic ones) to fit to the number of households. Is there a sort of fitting tool integrated, combining the different datasets?
  4 件のコメント
Image Analyst
Image Analyst 2020 年 4 月 12 日
編集済み: Image Analyst 2020 年 4 月 12 日
Make up some dummy data sets in tables, or separate variables, and upload them so we have something to work with. Make it easy for us to help you, not hard.
Also, there are probably lots of models that could be fit using those 4 vectors. Do you want the product like you suggested, or perhaps a weighted sum, or Principal Components Analysis, or LDA? Or has anyone ever come up with some sort of formula that we can use?
Redstein
Redstein 2020 年 4 月 12 日
I have made a dummy set for the years of 1960-1980
I am seeking for for a product as I've suggested. Unfortunately, I was not able to find something similar to the issue I have.

サインインしてコメントする。

回答 (2 件)

Rajani Mishra
Rajani Mishra 2020 年 4 月 16 日
What I understand from your question and following comments is that you have dataset of Household, Population, GDP, Taxes, Mean Income and you want to find the values of a,b,c and d for the equation you have provided.
In that case you can make a combined data set having each data set as a column and use function nlinfit, you can read more about the function here.
refer to the similar question I came across:

Tom Lane
Tom Lane 2020 年 4 月 23 日
If you want
nhh = a * (n1^b) * (n2^c) * (n3^d)
consider taking logs
log(nhh) = log(a) + b*log(n1) + c*log(n2) + d*log(n3)
You can use any least squares feature in MATLAB, Statistics and Machine Learning Toolbox, or Optimization Toolbox. Pass in the log values as data. You'd get back estimates of log(a), b, c, and d.

カテゴリ

Help Center および File ExchangeGet Started with Statistics and Machine Learning Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by