Hello everyone,
I am currently working with Panel Data (firm, year) for my seminar paper and I am in the phase of preparing the data for the analysis. My problem now is as followed:
I generated the variable CETR (Cash Effective Tax Rate) with the command
gen CETR = CF_TAXATION / PRETAX_INCOME
The results included some negative values, some values larger than 1 and also missing values.
Now, in an effort to control for outliers I wanted to winsorize the values for CETR to 0 and 1, i.e. if CETR has a value >1 it should be defined as 1 and if CETR<0 it should be defined as 0.
replace CETR=0 if CETR<0
replace CETR=1 if CETR>1
After looking at the results, I observed that Stata now assigned the value 1 to originally missing data of CETR, because Stata treats missing values as positive infinity. Since I have a significant amount of missing data this biases my results substantially. So my question is therefore, how do I have to alter the previous commands to prevent such a biased result or i.e. how do I tell Stata to keep missing values missing in such a setting?
Thanks in advance and kind regards,
Lucas
Related Posts with How do I keep "missing values" missing?
Do you need to use the same number of data observations for different types of regression?Hello, I want to perform a linear (1 independent variable) and a multiple regression with a sample …
Tabs for multiple subgroups in one tableI am hoping to run tabs for by various subgroups (different job roles, in this instance). For my tw…
Generate spatial weight matrix by using "spweight"Hi everybody, I am working on Emad A. Shehata's spatial command modules, but I got a trouble in cre…
Grs testHi Statalist Members! I am conducting a research on variation of the average returns on 12 portfoli…
M Jones ModelHi,Is the following code true for the m jones model? data: 2010-2017 for 35 country and 24 industry …
Subscribe to:
Post Comments (Atom)
0 Response to How do I keep "missing values" missing?
Post a Comment