## create a variable that multiply two categorical variables

Solved
Frequent Contributor
Posts: 133

# create a variable that multiply two categorical variables

I have the following dataset

``````id    out1          out2
1     a                  b
2    c                   d``````

I want to create a variable out3 that multiple the categorical variables into1:

``````id    out1          out2     out3
1     a                  b       a.b
2    c                   d      c.d``````

Accepted Solutions
Solution
‎10-12-2016 01:19 PM
Super User
Posts: 12,352

## Re: create a variable that multiply two categorical variables

Do you mean something like

out3 = catx('.',out1, out2);

or do expect a numeric result?

All Replies
Solution
‎10-12-2016 01:19 PM
Super User
Posts: 12,352

## Re: create a variable that multiply two categorical variables

Do you mean something like

out3 = catx('.',out1, out2);

or do expect a numeric result?

Frequent Contributor
Posts: 133

## Re: create a variable that multiply two categorical variables

Yes. Categorical, Thank you!

☑ This topic is solved.