Hi Statalist,
This is my first post.
I have a single variable called random_variable containing random numbers, say, from 1 to 100 but may not be sequentially ( maybe 1, 7, 2). I want to create 15 new variables in the data set each one containing the first 7 (7 may be arbitrary, example is for weekdays) entries from random_variable except the 15th one which will contain only 2 entries. (14*7=98 + 2 in last column).
example
random_variable
1
7
2
.
.
.
up to 100 observations.
.
Anticipating your help
Ashish
This is my first post.
I have a single variable called random_variable containing random numbers, say, from 1 to 100 but may not be sequentially ( maybe 1, 7, 2). I want to create 15 new variables in the data set each one containing the first 7 (7 may be arbitrary, example is for weekdays) entries from random_variable except the 15th one which will contain only 2 entries. (14*7=98 + 2 in last column).
example
random_variable
1
7
2
.
.
.
up to 100 observations.
.
Anticipating your help
Ashish
Comment