Hi, I am pretty new to Stata, so please forgive me if this is somewhere in the Help. I tried to find it, but haven't had any luck.
I have a dataset with over 8000 variables. I need a way to drop variables if they are missing more than x percent of the time in a dataset, or alternatively keep variables that are present more than x percent of the time. So far, I haven't seen a way to drop variables unless I drop the variable if it is ever missing. I ran MDESC in my dataset, and at least 1000 of them have no values whatsoever. I just want to drop the variables that are either 100% empty or empty more than X percent of the time.
Thanks for your help.
Rachel Owsley
I have a dataset with over 8000 variables. I need a way to drop variables if they are missing more than x percent of the time in a dataset, or alternatively keep variables that are present more than x percent of the time. So far, I haven't seen a way to drop variables unless I drop the variable if it is ever missing. I ran MDESC in my dataset, and at least 1000 of them have no values whatsoever. I just want to drop the variables that are either 100% empty or empty more than X percent of the time.
Thanks for your help.
Rachel Owsley
Comment