How to establish all possible combinations of 4 variables out of 6 ?

조회 수: 1 (최근 30일)
The main idea is to gather possible combinations of 4 variable out of 6 total design variables. For every combination i will calculate the R square (with my response variable) and then discard the ones that doesn't meet the required R. I also want to do a t-test and a f-test to keep only the best combination at a given time. Given the best combination, i will then obtain the betas of these variables!

채택된 답변

Jonathan Epperl
Jonathan Epperl 2013년 5월 23일
Sounds like you are looking for nchoosek: http://www.mathworks.com/help/matlab/ref/nchoosek.html
  댓글 수: 4
Simon
Simon 2013년 5월 24일
LOL ok im noob thanks for the info !! You just made my day
Simon
Simon 2013년 5월 24일
So i've made COMBO = nchoosek({V1,V2,V3,V4,V5,V6},4) and i was wondering if it was possible (without looping) to calculate the R square on each combination^

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

andrea84
andrea84 2013년 5월 23일
I believe you need something like this :
v=[var1 var2 var3 var4 var5 var6];
combinations=nchoosek(v,4)
  댓글 수: 4
andrea84
andrea84 2013년 5월 24일
So you want to pick only one value of k variable out of the n total variables ?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spectral Estimation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by