I have a categorical predictor (income) and three continuous predictors (area, no. of bed rooms and no of cars). How can I form a single factor from these variables? In other words I want to combine all these variables to get one single variable.
Solved – Combining categorical and continuous variables to calculate a factor
categorical dataconfirmatory-factorcontinuous data
Related Question
- Statistical Analysis – ANOVA vs. Regression with Continuous and Categorical Factors
- Solved – Categorical variables and continuous response
- Solved – Model to predict categorical outcome from continuous and categorical variables
- Solved – Beta coefficient interpretion with categorical and continuous predictors in a linear regression
Best Answer
If all of them are integer values less than 10, you could use
Then you'll get 3-digit codes, each digit being the level of the corresponding variable.
Oops, I'm realizing I excluded area. Is that an integer code too? If so, use the same idea with 4 digits. Otherwise, could use
and you'll have the 3-digit code after the decimal point and the area before.