Good morning/afternoon/evening/night
I'm new to stata and I'm trying to generate a dummy variable from a variable called abc. This variable was a question and from this question I would like two answers to be given the value '1' and the other answers the value '0'.
The values of these answers that need to be given a '1' are 1 and 4. I tried to do: gen abc1=1 if abc==1 & 4, but this did not work. Does anyone know how to do this?
Thank you in advance
Related Posts with Simple question from a beginner
Command problem with counting sample firms smaller than the firm for each country in each year (panel data)Hi, guys, I would like to measure the percentage of sample firms smaller than the firm for each coun…
Logging results in forvalues-loop: command lines are not shown in output-logfileHello, I want to save some output results using the -log- command. This works fine if I use -log- a…
Mean of a group minus the observation's value in Panel dataHi, I have a data structure like this: IO-IOarea-Year-index 1----4-------1997-0 2----4-------1998-…
How to change display of scientific notation of summary statistics to nummeric?Stata 15.1 I am attempting to create a descriptive statistics table for my thesis. However, I found…
How to regress categorical variables without baseHello, Currently I am investigating the impact of industry categorization (categorical variable) on…
Subscribe to:
Post Comments (Atom)
0 Response to Simple question from a beginner
Post a Comment