What would be a good proxy for time?

1视图(最近30天)
alpedhuez
alpedhuez on 17 Dec 2020
Answered: Raunak Gupta on 24 Dec 2020
In the previous post
I learned that one would need to consider confounding variables.
"Analysis reveals time to be the confounding variable: plotting both price and demand against time reveals the expected negative correlation over various periods, which then reverses to become positive if the influence of time is ignored by simply plotting demand against price."
因此,我想将时间用作回归的独立变量。
I use dn=datenum(date) as a proxy. But is there any better method?

Accepted Answer

Raunak Gupta
Raunak Gupta on 24 Dec 2020
Hi,
As I looked the discussion in above mentioned question link, I think it is more towards the correlation between two dependent variables with respect to time. S ince you want to ignore time while calculating the correlation , if all the dependent variables are present for a given time stamp vector , they can be directly used in regression . For example.
If time is from t = 1 sec to 100 sec with interval of 1 sec and price and demand is available for each of those time value then price a nd demand can directly be used as two pair of vectors for calculating correlation.
Also , 如果时间和价格,时间和需求之间的相关性毫无意义,那么最好在价格和需求之间进行回归,因为它将 show the correct trend.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!