Good day,
I have two variables (among others): One variable is a binary variable 0 or 1 (sleepwake). The other variable (datetime) is date followed by time (in %tc format). There are 7 days worth of rows, at 15-sec intervals. I want to change the interval from 15 seconds to 1 minute, using the mean of sleepwake (which I will later change to 0 if sleepwake <=0.5 or 1 if sleepwake >0.5, but I know how to do this).
datetime sleepwake
24feb2017 18:01:30 0
24feb2017 18:01:45 0
24feb2017 18:02:00 0
24feb2017 18:02:15 1
24feb2017 18:02:30 1
24feb2017 18:02:45 1
24feb2017 18:03:00 0
24feb2017 18:03:15 0
datetime sleepwake
24feb2017 18:01:30 0.25
24feb2017 18:02:30 0.50
Please help me find a solution.
Thanks so much.
Related Posts with Change time interval of %tc format
National level survey dataHello, I have a national level survey dataset. On household level, it has around 5988 observation. B…
Possible to put interaction terms of X and indictors of Y quintile in a regression?Dear Statalist users, I am wondering if I would estimate a regression like this: Y = X + X * Y_Q2 …
Creating 5 mutually non-exclusive groupsI have the dataset on employment sector of households as; A. Wage in agri B. Wage in non agri C. Sel…
how to create a cross-tabulation, dummy variables and regression with wide dataCan someone help me a syntax to use on how to i run cross tabulations, create dummy variables and ru…
graph export, as(pdf) fails to add special characters in the graph legend if inside {fontface "...": ...}Hi, I am trying to export a plot where I include special characters in the legend while I also set t…
Subscribe to:
Post Comments (Atom)
0 Response to Change time interval of %tc format
Post a Comment