how to reasonably separate a dataset into a regression group and a control group

2 ビュー (過去 30 日間)
Binzi Shu
Binzi Shu 2016 年 1 月 12 日
回答済み: Image Analyst 2016 年 1 月 12 日
This is more likely a design question. If I plan to run a regression Y = X1 + X2 + X3 + X4 + X5, and I have X1 through X10 as well as Y in my data. What is the best way to separate the dataset into a regression sample and a control group, so I can run regression on the regression sample and validate my model using the control group? Should I just create a column with random numbers and separate them that way? Thanks.

回答 (1 件)

Image Analyst
Image Analyst 2016 年 1 月 12 日
Look up datasample() or randsample().

カテゴリ

Help Center および File ExchangeLinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by