From 12a67beefc1b90b5c25d0a1c29cea73e28c5dd63 Mon Sep 17 00:00:00 2001 From: Ben Anderson <b.anderson@soton.ac.uk> Date: Tue, 28 Apr 2015 00:13:35 +0100 Subject: [PATCH] added xtset examination of missing --- CER-data-processing-original.do | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/CER-data-processing-original.do b/CER-data-processing-original.do index ee5a09a..75c4141 100644 --- a/CER-data-processing-original.do +++ b/CER-data-processing-original.do @@ -222,11 +222,26 @@ sort ID s_datetime * check li ID date halfhour s_* in 1/12, sep(2) +* is min = 1 & if not which day does the data start? +su date + drop date ds_halfhour halfhour hour mins sec ds ts_ds compress -save "$odfiles/processed/HH2009_long.dta", replace +* test to see if missing half hours and ids + +xtset ID s_datetime, delta(30 minutes) + +* possibly + +* expand to all 30 seconds between the first and last obs for each hubid +* (increases file size quite a bit) +* , full -> imputes ALL missing periods +* puts . into any missing var - fix that later +tsfill + +save "$odfiles/processed/HH2009_long_filled.dta", replace timer off 1 -- GitLab