Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. imp = mice.MICEData(dfLocal)
  2. fml = 'LOC1 ~ LOC2 + LOC3 + LOC4 + LOC5'
  3. mice = mice.MICE(fml, sm.OLS, imp)
  4. results = mice.fit(10, 10)
  5. print(results.summary())
  6.  
  7. dfLocal.dropna(axis=0, how='all', inplace=True)
  8. imp.data = imp.data.set_index(dfLocal.index)
  9.  
  10. # In this case I only want to fill one specific set of missing data
  11. # hence gap_start and gap_end
  12. dfLocal.loc[gapStart:gapEnd, 'LOC1'] = imp.data[fillSite]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement