How to find best polynomial linear regression model (equation) for multiple datasets?
2 views (last 30 days)
Show older comments
Hello,
I have multiple data sets, each with 3 independent variables and 1 response. i.e., [y, x1,x2,x3].
I would like to find the best functional form (linear regression) that would work best for ALL of the data sets. The coefficients will be different for different data sets.
I tried stepwiselm individually for each data set and obviously get a different equation and different number of terms.
What I am looking for is stepwiselm that works on multiple datasets simultaneously.
Thank you for your help.
-V
3 Comments
Jeff Miller
on 20 Apr 2018
Too bad--that is much harder.
I doubt you can find a "stepwiselm that works on multiple datasets simultaneously". If not, your only option (as far as I know) will be to fit all the data together within one combined dataset. You will have to set up "dummy variables" to code the datasets and also to allow for changes in coefficients across datasets. Then you will probably have to guide the stepwise model-fitting process yourself rather than having the search done automatically.
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!