I open my Stata14-File, which is formatted in long-Format, generate the necessary constant, drop all cases with missing values in the explanatory variables (MI Procedure with RealCom doesn´t work otherwise) and shorten the dataset for purposes of testing
Code: Select all
use "long_old - Kopie.dta", clear gen cons = 1 drop if missing(sex) | missing(wbt_) sort wbt_ keep in 1/3000
I export it do RealComquietly saveold long_old_small, replace
Code: Select all
realcomImpute wahlnorm_ sex wbt_ using long_old_small.dta, numresponses(1) replace level2id(unique_id) cons(cons)
Now, my old Datafile ( long_old_small) is replaced with a file only 61kb of size. I cannot open this new long_old_small.dta in stata, because Stata says it´s not Stata Format.
Furthermore, a second Dataset (long_old_small_wts.dta) was created with only 15kb of size. I cannot open it with Stata either.
I am already confused at this point. Why two files?
I start Realcom as an Adminstrator (Error Message after Imputation if not as Admin), open long_old_small.dta (is this the right file?) and start the imputation.
This is where I start to need your help.
As the RealComImputeStata-Guide advises, executing -realcomImputeLoad- in Stata will be the next step.
Executing the cmd without data in memory leads to an error message.
Which Data am I supposed to have in memory?
As I pointed out earlier I cannot open the datafile long_old_small.dta that is saved on the disk any more.
So, do I just have to keep Stata open while RealCom does the imputing so that the data will still be in memory?
In this case -realcomImputeLoad- appends 5 variables to my dataset named "_1_wahlnorm_" to my dataset in Long-Format. I imputed 5 Datasets.
Furthermore 5 Datafiles were created names imp1-imp5, each containing a single variable named wahlnorm_1, wahlnorm_2...
What do I do with this data...?
Do I need to append these variables to my dataset as well with -mi import flongsep-, as suggested here, https://www.cmm.bristol.ac.uk/for ... 6e33#p1253?
I have searched the forums and manuals. I hope one of you clarify how to use RealCom.
edit: If I execute -realcomImputeLoad- twice he will also append those wahlnorm_1, wahlnorm_2... variables that were stored in the datafiles namedd imp1-imp5 next to the variables _1_wahlnorm_.... Both sets of variables seem to be identical, though.