Dear Statalist,
Apologies for this rather elementary question. I've dug through the manual and the web but am still in need of a final touch from the community.
So I would like to only keep the 1st, 10th, 19th, ... and 32653rd observation of my data. So the sequence condition is 9x+1 when x progresses from 0 to 3628 by 1. I understand it should be a simple line of command of:
keep if _n = ...
And my question is how can I specify the condition of 9x+1 where x ranges from 0 to 3628 by 1 in order for the keep command to work?
Thank you very much!
Best,
Yangxi Z.
Apologies for this rather elementary question. I've dug through the manual and the web but am still in need of a final touch from the community.
So I would like to only keep the 1st, 10th, 19th, ... and 32653rd observation of my data. So the sequence condition is 9x+1 when x progresses from 0 to 3628 by 1. I understand it should be a simple line of command of:
keep if _n = ...
And my question is how can I specify the condition of 9x+1 where x ranges from 0 to 3628 by 1 in order for the keep command to work?
Thank you very much!
Best,
Yangxi Z.
Comment