STATA(12) Dummy Variables and Interaction Expansion (xi)
Help us caption and translate this video on Amara.org: //www.amara.org/en/v/BhE0/ How to run ordinal variables in STATA? How to interact with other ...
Yes, that is a good point. For discrete variable that takes more than 2
values, it can be ordered, which I learned to call it ordinal variable, and
not ordered, which I learned to call it as categorical variable. Now, if
you use them as covariates, it does not matter since they will all be a
bunch of binary variables at the end of the day, so I use them
interchangeably. That is playing fast and loose and you are absolutely
correct that I should be more precise in my terminology.
Depends on how you want to deal with missing variable in general. If you
want to discard them, then nothing needs to be done, which is convenient
but usually wrong. Otherwise, it will involve quite complicated procedure
to handle missing observations correctly.
How would you interact more than two variables. Say for example I wanted to
run a fully interacted regression with 4 categorical variables, how does
the syntax change to fully interact all four variables?
Sorry for the late reply. I don't think you can graph a dummy variable, it
only occupies two values so the graph will looks like two bars... On that
note, maybe try bar chart of box chart with two groups
How to use Stata's functions and regular expressions to extract the first and last name from a name variable. Name variable can be pretty complicated.
STATA tutorial- recoding to create binary indicators
This should provide a basic understanding of how to take a categorical variable (this video used race/ethnicity) and break down its categories into separate ...
Hi...i used your information but not able to get done...its showing error..
I wrote syntax in this way foreach varlist in sdw tyhouse latrn {
encode `varlist`, generate (_'varlist')
} Please help me out
I see there is a typo error. Please copy and paste the code and run it. Let me know if it works!foreach varlist in sdw tyhouse latrn {encode `varlist', generate (_`varlist')}
thank you i really enjoyed the video. However after running the code, i
have 'Sorted by' in the Results window and my Data editor and other buttons
are not responding. what did i do wrong or how do i restore the Results
window?
Were you able to get the code running? Would suggest save the program file and close the STATA. After that start STATA again and re run the program. Let me know if it helped.
Im following the code to a t but its not working. In your mention of
'varlist', its not being highlighted for me as yours. I used inverted
commas on the both ends of the word... How was yours highlighted?