I am new to R coding. I am trying to build a linear model as:
lmmodel <- lm(DV ~ IV1 + IV2 + IV3 + IV4)
I have a dependent variable with money as data type (decimal value) and 4 independent variables, a mixture of categorical and date:
Issuancedate Region Account ClientName Price
01-01-2015 South Account1 ABC
02-01-2015 North Account2 NA
03-01-2015 NorthEast Account3 BCD
04-01-2015 SouthEast Account4 NA
05-01-2015 NA Account5 M/sBedf
06-01-2015 West Account6 Campus ltd
07-01-2015 SouthWest Account7 Offshoreltd
08-01-2015 NorthWest Account8 Sitenew
Price is to be predicted. I see the below error:
Error in contrasts<-(tmp, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels