Hello, I wanted to do the multiple regression on categorical predictor data there's variable x1,x2,x3 and x3 is categorical one. so i just used as.factor(x3) and then ran multiple regression is it a good way to do the multiple regression on categorical predictor data? and how can I interpret the estimates? also if using as.factor is a good way, is there any difference with doing dummy coding for categorical variable and then running regression? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/using-categorical-variable-in-multiple-regression-tp3591517p3591517.html Sent from the R help mailing list archive at Nabble.com.
using categorical variable in multiple regression
3 messages · setlist, Weidong Gu, Vijayanpadmanabhan
for categorical independent variables, regression models in R will generate dummy indicators based on your setting of contrasts (default contr.treatment). Use model.matrix(your model) to see how R does this internally. Weidong Gu
On Sun, Jun 12, 2011 at 2:38 AM, setlist <yespuppy90 at hanmail.net> wrote:
Hello, I wanted to do the multiple regression on categorical predictor data there's variable x1,x2,x3 and x3 is categorical one. so i just used as.factor(x3) and then ran multiple regression is it a good way to do the multiple regression on categorical predictor data? and how can I interpret the estimates? also if using as.factor is a good way, is there any difference with doing dummy coding for categorical variable and then running regression? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/using-categorical-variable-in-multiple-regression-tp3591517p3591517.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
1 day later
Try using RandomForest.. -- View this message in context: http://r.789695.n4.nabble.com/using-categorical-variable-in-multiple-regression-tp3591517p3594170.html Sent from the R help mailing list archive at Nabble.com.