You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
Massimiliano:
welcome to this forum.
If by qualitative variables you mean non-numerical predictors, I'm not aware of anything else than categorical variables (see -help fvvarlist- for more details).
If your query implies something different, please provide the list with more details (and please read and act on the FAQ on how to post [more] effectively). Thanks.
If you have character variables you want to include in your model - for example, a variable containing country names - then you can use the encode command to create a numeric categorical variable that takes a distinct values for each country, and then you can use the factor variable notation Carlo discussed to avoid the work of creating individual indicator (so-called "dummy") variables. For details, see the output of
Code:
help encode
help fvvarlist
Beyond that advice, your question really isn't clear without more detail, or at a minimum it is too difficult to guess at a good answer from what you have shared. Please help us help you. Show example data. Show the sort of regression you want to run. The Statalist FAQ linked to from the top of this page, and from the page you used to create your post, provides advice on effectively posing your questions, posting data, and sharing Stata output.
Massimiliano:
as William wisely pointed out, you canniot expect to get more help from interested listers if you do not provide more details in line with the recommendations reported in the FAQ, in addition, please take a look at -help dataex-.
That said, what do you mean by non-numeric variables? Something unordered such as colors, races, languages, else?
Sorry I'm only replying now but I've been a bit busy.
First of all, thank you for your help and sorry if I was not very clear. I will try to explain my problem better.
I have to do a linear regression and, among the control variables used, there are two that are non-numerical, namely country and sector of the companies analysed.
I would like to know how to include these two variables in my regression without creating a large number of dummy variables.
I hope my explanation is clearer.
Thank you.
Massimiliano:
happy with reading that you were successful.
As William Lisowski wisely remind to Statalist new members, one of the most rewarding (although a bit intimidating) way to get the most out of Stata is to devote a (relevant) share of your time to read/study the Stata .pdf manual.
You will benefit so much from this investement as you get yourself more familiar with Stata jargon, thanks to your increased ability of picking up the right Stata command(s) for you research needs.
Comment