multivariate regression with many dummy variables
7 ビュー (過去 30 日間)
古いコメントを表示
Hello I have a data set with 1800 observations and 7 predictors, first one of which needs to be coded as a dummy variable. The issue is that the variable to be coded as dummy has 73 categories in it. I used dummyvar() function to turn this variable into a 1800 row x 73 column dummy variable matrix. Now I would like to do a linear regression using this dummy variable matrix plus the original remaining 6 predictors but the issue is I am not sure how to do it? I tried merging the dummy variable matrix with the 6 column matrix and did a regress() regression on it but it gave me errors and warnings. How would I do a regression with so many categories, extract the slope and intercepts (I assume all categories will have a similar slope) and then use these coefficients to predict an outcome for individual categories? I am using 2010b release with all the toolboxes. Thank you. Mutlu..
0 件のコメント
回答 (1 件)
Greg Heath
2012 年 12 月 27 日
It should work. You will have to post more info, e.g., relevant code and error messages.
How, exactly, are your dummies coded?
Are they mutually exclusive?
Are the prior probabilities comparable?
Are the means and variances of all variables comparable?
Are you weighting the error function?
参考
カテゴリ
Help Center および File Exchange で Analysis of Variance and Covariance についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!