Hi.
This might be a basic question. For the purpose of a visual inspection I would like to browse all individuals (using id) in panel dataset, that during single year (out of 5 years) have 0 value for variable m, and neighbouring values (m[_n-1], m[_n+1]), some positive value.. so basically, i would like to see set of all year of observations per individual, no matter the observation positive value, as long as one of the observation fulfils the given criterion.
+----------------------------+
| year id m|
|----------------------------|
1. | 2006 6000622 0 |
2. | 2007 6000622 0 |
3. | 2008 6000622 0 |
4. | 2009 6000622 90 |
5. | 2010 6000622 0 |
6. | 2011 6000622 90 |
7. | 2012 6000622 90 |
i tried using bysort year(id): browse if ts=0 but browse command does not work with bysort.
Thanks in advance.
This might be a basic question. For the purpose of a visual inspection I would like to browse all individuals (using id) in panel dataset, that during single year (out of 5 years) have 0 value for variable m, and neighbouring values (m[_n-1], m[_n+1]), some positive value.. so basically, i would like to see set of all year of observations per individual, no matter the observation positive value, as long as one of the observation fulfils the given criterion.
+----------------------------+
| year id m|
|----------------------------|
1. | 2006 6000622 0 |
2. | 2007 6000622 0 |
3. | 2008 6000622 0 |
4. | 2009 6000622 90 |
5. | 2010 6000622 0 |
6. | 2011 6000622 90 |
7. | 2012 6000622 90 |
i tried using bysort year(id): browse if ts=0 but browse command does not work with bysort.
Thanks in advance.
Comment