Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Identify Categorical/Dichotomous and Continuous Variables


From   John Antonakis <[email protected]>
To   [email protected]
Subject   Re: st: Identify Categorical/Dichotomous and Continuous Variables
Date   Sun, 05 Oct 2008 18:18:01 +0200

Welcome to STATA....you will not regret making the jump from SPSS (and it is a rather large one--i.e., that you will have a large benefit).

The type of variable you have matters mostly for when the variable is a dependent variable--and STATA will recognize the variable you have depending on the analysis (for e.g., for a probit, you should have only binary data....for an ordered probit, ordinal data...etc).. For all analysis, STATA can easily hand continuous or categorical variables as independent variables. When variables are not continuous, you can leave them as categories and then use the xi: command. For example,

xi: reg y x i.cat

....will create a series of k-1 dummy variables for the variable (to control for the fixed effect). Type help xi to see how useful xi is.

This is a very powerful and flexible approach to modeling.

Best,
J.

____________________________________________________

Prof. John Antonakis
Associate Dean Faculty of Business and Economics
University of Lausanne
Internef #618
CH-1015 Lausanne-Dorigny
Switzerland

Tel ++41 (0)21 692-3438
Fax ++41 (0)21 692-3305

http://www.hec.unil.ch/people/jantonakis&cl=en
____________________________________________________



Svend Juul wrote:

Frank wrote:
I am new to Stata: moved from SPSS a week ago. I am hoping that someone can help me with what I imagine is a simple issue. I saved an SPSS file as a Stata one. I am working my way through the user guide and the data management manual, but I am having difficulty with confirming whether Stata recognizes variables as continuous (or scale) or categorical/dichotomous (or nominal). In SPSS, you can easily identify whether the type of measure is a scale, nominal, or string with its drop down menu in the variable view. It would be a great help, and I would appreciate it very much if someone would tell me the method to confirm the data type for categorical/dichotomous and for continuous variables? Thank you.
======================================================
As Martin responded: Stata has no formal distinction between
continuous and categorical numeric variables. However, the
command
codebook, compact
may tell you what you want. The -Unique- column tells you
how many "unique" (meaning different) values each variable has.
Hope this helps
Svend
________________________________________________________ Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6 DK-8000 Aarhus C, Denmark Phone, work: +45 8942 6090 Phone, home: +45 8693 7796 Fax: +45 8613 1580 E-mail: [email protected] _________________________________________________________
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index