Hi - I have a dataset with daily observations over 240 sequential days. Is there a way to calculate a rolling average that is anchored at the first day? Specifically, I'd like to create a weekly average that updates by week so that the first value is the average of days 1 to 7, the second value is the average of days 1 to 14, the third value days 1 to 21, and so forth to the end.
I can't find a way to make tssmooth behave in this way. But maybe it can be done manually using a foreach loop?
Thanks!
Related Posts with Anchor the tssmooth command at start point
generate variable with _N but with missing values as welI have a problem with my data. This is an example. Code: input float(id wave year income) 101 2009…
Drop empty variables when importing spss into stataI have an spss dataset that has ~27000 variables, but only ~500 include any values. The rest are bla…
ITSA lincom command to estimate the difference in outcome after a training periodHi I would be grateful for your help. I have run a ITSA using Lindens ITSA command for a survival …
why noconst option generate so different results in Nlogit?Dear experts, I used Nlogit to analyse data. First, I did not include noconst in level 2 equation. …
Using pcarrowi dyanmically?Hello everyone, Is there any way to use pcarrowi command dynamically? I'm trying to find a way to i…
Subscribe to:
Post Comments (Atom)
0 Response to Anchor the tssmooth command at start point
Post a Comment