Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused from examples regarding which regression to use #574

Open
qzyu999 opened this issue Oct 3, 2023 · 3 comments
Open

Confused from examples regarding which regression to use #574

qzyu999 opened this issue Oct 3, 2023 · 3 comments

Comments

@qzyu999
Copy link

qzyu999 commented Oct 3, 2023

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I'm looking to do functional regression, when we have many records, each with a set number of data points. An analogy would be stock market data, where if you had data from 2022-2023, you would have 365 data points, where X=1,2,...,365, and y=[EOD price day 1], [EOD price day 2], [EOD price day 365]. I want to try and predict the price on day 366, using all of the current data. I would also like to predict a variable number of days (e.g., predict 10 days out to day 375), along with having some confidence interval.

I looked at the regression examples, but none of them seem to match exactly my use case, where there's just some incremental value for X. I'm quite new to FDA, and I'm aware that there is a set of linear models. I would guess that this falls under function covariate and scalar result. However, looking at the examples I can't seem to get anything working. Thank you for your time.

@vnmabus
Copy link
Member

vnmabus commented Oct 4, 2023

From your example with stock market data (feel free to correct me if I am mistaken), you have just one curve (the stock), and you want to predict future values. If that is the case, you are outside the realm of functional data analysis, which requires to have several curves in order to do statistics. That example would be more akin to the problem of forecasting in time series. Thus, I would use a time series package instead (such as sktime).

@qzyu999
Copy link
Author

qzyu999 commented Oct 5, 2023

Thank you so much for your response, and thank you for the insight. What if I had for example 10 stocks on the same time axis, is there a methodology for that in FDA? Maybe for example predicting the mean price in the future?

@vnmabus
Copy link
Member

vnmabus commented Oct 10, 2023

If you have training data for some of them (e.g. you have the desired values for the first half) and if you can model these stocks as independent trajectories of a stochastic process, then you could use functional regression. However, as you are trying to predict the future, I doubt that is the case. I have not seen literature in FDA that deals with that, so I would probably stick with forecasting unless I wanted to try novel things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants