Hello Stata Users,
I have been trying to import previously imputed data (m=0, 1,2,…..20) using mi import command. The data set includes the original un-imputed data(m=0) which has missing values and 20 (m=1,2,3.....20) imputed datasets. Below is my code:
mi import flong, m(imp_number) id(record_id) imputed(v1 v2 v3 v4 v5 v6)
When I run the above code it returns with an error message.
“variable record_id has invalid values
record_id takes on at least one value if imp_number>0 that it does not if imp_number==0”
However, the same code works if I delete the original data and import only imputed datasets. But the problem is it takes first imputed dataset (m=1 reads as m=0) as original and takes remaining 19 imputed dataset which is not correct.
Can anyone please help me in importing the data with the original included?
Thanks in advance.
Baker
Related Posts with Importing previously imputed data using mi import
Multiple Baseline DesignHello Everyone. I have been following STATALIST for a while now and really appreciative of its help.…
split (Chinese) addressDear All, I have this data on addresses (x variable): Code: * Example generated by -dataex-. To ins…
dyadic years data and overconfident resultsArray Array Hi, I have dyadic-years data. my DV is a count variable and it's overdispersed. I run…
Import delimited recognizes (wrongly?) a variable as srtLDear Statalanders, While importing the attached mdl_course.csv with -import delimited- in Stata 16,…
How to fix autocorrection in OLSHello, I have panel data ( N is large with T is small). My data has autocorrection and don't have he…
Subscribe to:
Post Comments (Atom)
0 Response to Importing previously imputed data using mi import
Post a Comment