Subsample on panel data and scatter plot
Posted: Mon Mar 09, 2015 9:11 am
Hi,
I use a panel dataset with 3000 cross-sections on 12 periods (2001-2012).
In order to suppress some undesirable observations, I restrict the sample using :
smpl @all if rrf>0 and dotations>0
After that, when looking at the spreadsheet, some cross-sections still have the 12 periods, whereas some have not, which is normal.
The problem is that when I plot two variables using scatpair :
group pcpl1 dotations dep_invest
pcpl1.scatpair
the scatter is automatically selected over a sub-period (2004-2012 here). When I extend the plot to include 2001 to 2003, it seems that i get a scatter with the full sample instead (i.e. with 3000x12 obs.).
How can I get around this problem?
Thanks in advance
I use a panel dataset with 3000 cross-sections on 12 periods (2001-2012).
In order to suppress some undesirable observations, I restrict the sample using :
smpl @all if rrf>0 and dotations>0
After that, when looking at the spreadsheet, some cross-sections still have the 12 periods, whereas some have not, which is normal.
The problem is that when I plot two variables using scatpair :
group pcpl1 dotations dep_invest
pcpl1.scatpair
the scatter is automatically selected over a sub-period (2004-2012 here). When I extend the plot to include 2001 to 2003, it seems that i get a scatter with the full sample instead (i.e. with 3000x12 obs.).
How can I get around this problem?
Thanks in advance