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
Plotting coeffcients after SuestHi, I would like to plot the coefficients with confidence intervals for coefficients from different…
Exporting pca results to ExcelHello, I am trying to export the results of my pca from Stata to Excel. I have tried following Clyd…
From panel data to cross-sectional dataI have been given a data set that is in the format of paneldata. I would like to transform the datas…
Accessing model results from MataI know the functions st_global(), st_numscalar(), and st_matrix() can be used to access information …
Generating variable with maximum value 1 by combining twoHello fellow stata-users, Does anyone know how to generate a new variable that solely ranges betwee…
Subscribe to:
Post Comments (Atom)
0 Response to Change time interval of %tc format
Post a Comment