Dear all,
I have a panel data and would like to create a dummy variable using the following:
bys bvd_id: egen filter=max(X>16 & year==2018); however, if the observation of X in 2018 is missing (.), then egen also generates 1, instead of 0. How can I treat that missing value as zero? I tried the following:
bys bvd_id: egen filter=max(missing(X>16 & year==2018)); This slightly works, but now if I have a missing value for year other than 2018, then the result is also 0.
Really appreciate your help.
Best,
Abdan
Related Posts with Ignoring missing value in egen max
How to interpret variance on different levels in melogitDear all, I am analysing what are the determinants for the adoption of bonus compensation for a firm…
Export Value Labels to Excel/CSVHow do i export value labels for each variables that i have to excel or csv -----------------------…
Negative persistence parameterHi, I am estimating a simple OLS persistence model where I regress f.x on x. x is a variable that t…
use observation as a varlistHi everyone, I am currently struggling with something that I think is easy but i really couldn't fig…
How to add a column of minimum wage information to each country?Dear all: I have 73 countries microdata (n range from1 to 73), where I intend to add a column of mi…
Subscribe to:
Post Comments (Atom)
0 Response to Ignoring missing value in egen max
Post a Comment