dev <- read.csv("C:\\Documents and Settings\\amit.kumar\\My Documents\\My Receiv ed Files\\sidhartha\\dev.

csv") val <- read.csv("C:\\Documents and Settings\\amit.kumar\\My Documents\\My Receiv ed Files\\sidhartha\\val.csv") ls() fix(val) names(val) dev$ind_red <- ifelse(dev$Answer_Color_Num==1,1,0) dev$ind_Orange<- ifelse(dev$Answer_Color_Num==2,1,0) dev$ind_Yellow<- ifelse(dev$Answer_Color_Num==3,1,0) dev$ind_Green<- ifelse(dev$Answer_Color_Num==4,1,0) dev$ind_Blue<- ifelse(dev$Answer_Color_Num==5,1,0) dev$ind_Purple<- ifelse(dev$Answer_Color_Num==6,1,0) dev$ind_Pink<- ifelse(dev$Answer_Color_Num==7,1,0) dev$ind_Black<- ifelse(dev$Answer_Color_Num==8,1,0) dev$ind_White<- ifelse(dev$Answer_Color_Num==9,1,0) dev$ind_Gray<- ifelse(dev$Answer_Color_Num==10,1,0) dev$ind_Beige<- ifelse(dev$Answer_Color_Num==11,1,0) dev$ind_Brown<- ifelse(dev$Answer_Color_Num==12,1,0) dev$ind_Gold<- ifelse(dev$Answer_Color_Num==13,1,0) dev$ind_Silver<- ifelse(dev$Answer_Color_Num==14,1,0) val$ind_red <- ifelse(val$Answer_Color_Num==1,1,0) val$ind_Orange<- ifelse(val$Answer_Color_Num==2,1,0) val$ind_Yellow<- ifelse(val$Answer_Color_Num==3,1,0) val$ind_Green<- ifelse(val$Answer_Color_Num==4,1,0) val$ind_Blue<- ifelse(val$Answer_Color_Num==5,1,0) val$ind_Purple<- ifelse(val$Answer_Color_Num==6,1,0) val$ind_Pink<- ifelse(val$Answer_Color_Num==7,1,0) val$ind_Black<- ifelse(val$Answer_Color_Num==8,1,0) val$ind_White<- ifelse(val$Answer_Color_Num==9,1,0) val$ind_Gray<- ifelse(val$Answer_Color_Num==10,1,0) val$ind_Beige<- ifelse(val$Answer_Color_Num==11,1,0) val$ind_Brown<- ifelse(val$Answer_Color_Num==12,1,0) val$ind_Gold<- ifelse(val$Answer_Color_Num==13,1,0) val$ind_Silver<- ifelse(val$Answer_Color_Num==14,1,0) dev.glm_model <- glm(ind_red ~ Red_F_M+ Red_F_S+ Orange_F_M+ Orange_F_S+ Yellow_F_M+ Yellow_F_S+ Green_F_M+ Green_F_S+ Blue_F_M+ Blue_F_S+ Purple_F_M+ Purple_F_S+ Pink_F_M+ Pink_F_S+ Black_F_M+ Black_F_S+ White_F_M+ White_F_S+ Gray_F_M+ Gray_F_S+

Beige_F_M+ Beige_F_S+ Brown_F_M+ Brown_F_S+ Gold_F_M+ Gold_F_S+ Silver_F_M+ Silver_F_S+ Red_B_M+ Red_B_S+ Orange_B_M+ Orange_B_S+ Yellow_B_M+ Yellow_B_S+ Green_B_M+ Green_B_S+ Blue_B_M+ Blue_B_S+ Purple_B_M+ Purple_B_S+ Pink_B_M+ Pink_B_S+ Black_B_M+ Black_B_S+ White_B_M+ White_B_S+ Gray_B_M+ Gray_B_S+ Beige_B_M+ Beige_B_S+ Brown_B_M+ Brown_B_S+ Gold_B_M+ Gold_B_S+ Silver_B_M+ Silver_B_S+ Red_Title+ Orange_Title+ Yellow_Title+ Green_Title+ Blue_Title+ Purple_Title+ Pink_Title+ Black_Title+ White_Title+ Gray_Title+ Beige_Title+ Brown_Title+ Gold_Title+ Silver_Title+ Red_Desc+ Orange_Desc+ Yellow_Desc+ Green_Desc+ Blue_Desc+ Purple_Desc+ Pink_Desc+ Black_Desc+ White_Desc+ Gray_Desc+

Beige_Desc+ Brown_Desc+ Gold_Desc+ Silver_Desc , family="binomial",data=dev) stepAIC(dev.glm_model,trace=FALSE) dev.stepwise <- glm( stepAIC(dev.glm_model,trace=FALSE)$formula ,family="binomi al")

Sign up to vote on this title
UsefulNot useful