1
$\begingroup$

i have a panel data set. my dependent variable is total costs. and almost all of my independent variables are Categorical variables. like age is "old","new" now i have some questions.

1-should i use a dummy for all of them?(for example, only type variable has 33 values itself) ( or i can use clustering and reduce them?or any other way if you know)

2-is there a difference between behaving Categorical which they have a rank and the ones they don't have?

for example 'type' is "A","B",..."S" so no rank between A and B but quality is "A1","A2","A3" which A1 means highest quality

i dont know why i can find enough information about variable selections and making data ready. so now i have lots of variable and i think i should choose between them and also reduse number of dummies.

$\endgroup$
1
$\begingroup$

One way to address this issue is by plotting the target as some box-plot for each category. Then replace each category with the median of its box-plot.

The second way is by sorting categories by the median of their boxplot and assigning numbers grom 1 to the number of categories you have.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.