Dear All, I have this (intra-daily, every 30 minutes) dataset for many companies (merchandise, but only one company here) and many days (daytime).
My question is: How can I -xset merchandise xxx- (how to deal with daytime variable) so that I can take lags of the variables (all f i mj)? Thanks a lot.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int merchandise str25 daytime double(all f) float i double mj 1101 "2015-01-05 09:30:00+00:00" .6322220282771862 .35140275955200195 .00921659 .6148881316184998 1101 "2015-01-05 10:00:00+00:00" .6251472320376914 .21915708482265472 .0387931 .5218638181686401 1101 "2015-01-05 10:30:00+00:00" .48404255319148937 .3038821816444397 .02284264 .15426497161388397 1101 "2015-01-05 11:00:00+00:00" .6306740027510316 .08415841311216354 .00967742 .5810810923576355 1101 "2015-01-05 11:30:00+00:00" .5645933014354067 .10311750322580338 .010928961 .617977499961853 1101 "2015-01-05 12:00:00+00:00" .7880671224362958 .4464172422885895 0 .37991267442703247 1101 "2015-01-05 12:30:00+00:00" .8673693456302152 .2398567944765091 .05337078 .5466297268867493 1101 "2015-01-05 13:00:00+00:00" .6915838996340826 .2481296807527542 .15284973 .19310344755649567 1101 "2015-01-05 13:30:00+00:00" .31804670912951166 .04122137278318405 .12878788 .11664074659347534 1101 "2015-01-06 09:30:00+00:00" .49465784430503845 .3459424376487732 .014405205 .5647687911987305 1101 "2015-01-06 10:00:00+00:00" .5749144554138184 .19092218577861786 .011135858 .002812939463183284 1101 "2015-01-06 10:30:00+00:00" .7315515875816345 .22560706734657288 .0027322404 .32138729095458984 1101 "2015-01-06 11:00:00+00:00" .40780141949653625 .093478262424469 0 0 1101 "2015-01-06 11:30:00+00:00" .42289817333221436 .08409250527620316 .02898551 0 1101 "2015-01-06 12:00:00+00:00" .5283964276313782 .1515800803899765 .0024213076 .02286585420370102 1101 "2015-01-06 12:30:00+00:00" .5427666306495667 .19020172953605652 .017605634 .43065693974494934 1101 "2015-01-06 13:00:00+00:00" .5771617889404297 .12115505337715149 .005154639 .13809524476528168 1101 "2015-01-06 13:30:00+00:00" .35843345522880554 .04514441639184952 .11184573 .15654951333999634 1101 "2015-01-07 09:30:00+00:00" .4490748345851898 .31891891891891894 .011627907 .5369960069656372 1101 "2015-01-07 10:00:00+00:00" .5733739733695984 .36194690265486723 .011470986 -.3425774872303009 1101 "2015-01-07 10:30:00+00:00" .4453725218772888 .15606936416184972 .011647254 .0019841270986944437 1101 "2015-01-07 11:00:00+00:00" .6164215803146362 .30825688073394497 .009009009 -.3000663220882416 1101 "2015-01-07 11:30:00+00:00" .5608547329902649 .14027149321266968 .015492958 -.13012729585170746 1101 "2015-01-07 12:00:00+00:00" .5167531967163086 .24776119402985075 .032467533 .1510416716337204 1101 "2015-01-07 12:30:00+00:00" .4741315543651581 .08921933085501858 0 .3311688303947449 1101 "2015-01-07 13:00:00+00:00" .6261870265007019 .12844036697247707 .015873017 .5442193746566773 1101 "2015-01-07 13:30:00+00:00" .40022629499435425 .05528765279802624 .1766941 .3100692629814148 1101 "2015-01-08 09:30:00+00:00" .41960981488227844 .2408728450536728 .02857143 .32739904522895813 1101 "2015-01-08 10:00:00+00:00" .5005064010620117 .306892067193985 .010387158 .20570151507854462 1101 "2015-01-08 10:30:00+00:00" .4917241334915161 .12754766643047333 .029411765 0 end
Comment