multivariate regression with many dummy variables
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Greg Heath
am 27 Dez. 2012
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?
Siehe auch
Kategorien
Mehr zu Analysis of Variance and Covariance finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!