Dear all,
I have a panel data set. Each observation is organized by firmId and year. Some other variables include firms’ industry classification code (SIC) storage type integer.
I need to define a binary variable set equal to one if a firm’s SIC code between 2833 and 2836, 3570 and 3577, 3600 and 3674; and zero otherwise.
I plan to use
gen sic_dum=0
replace sic_dum =1 if (sic>=2833 & sic <=2836) | sic>= 3570 & sic <=3577 | sic>= 3600 & sic <=3674)
But I am not sure whether & takes precedence than | using these conditional statement).
Thank you,
Rochelle
Related Posts with Define a binary variable using and / or
Test differences in firms that adopted org changeHi / Bonjour, I would like to test firms that adopted organization mgmt. change ( yes or no, 1/0) a…
Help with a detailed specification using multiple imputationHello, I am attempting to estimate a model: Code: logit y x1 x2 x3 where x1 is a dummy variable…
Exogeneity test for nonlinear unbalanced panel with single dummy endogenous explanatory variable using CRE.Hi, I'm essentially following the idea of Dr. Jeff Wooldridge Jeff Wooldridge in trying to test for…
Number of parameters in exploratory factor analysisHi everyone. Below is the output of an exploratory factor analysis using the command factor and the …
Multilevel analysisHello statalist; I am trying to do a multilevel analysis and when introducing second level variables…
Subscribe to:
Post Comments (Atom)
0 Response to Define a binary variable using and / or
Post a Comment