Am 23.07.2014 16:27, schrieb Riccardo (Jack) Lucchetti:
On Wed, 23 Jul 2014, Sven Schreiber wrote:
> Right -- what about the $sample accessor. I like the clever way how it
> differentiates between non-used and out-of-sample observations after
> estimations, but it would also be useful to get a binary dummy series
> just for the active sample without any estimates. Of course a workaround
> would consist of doing some trivial OLS just to access $sample
What I do what I have to fiddle with subsamples a lot is to keep a dummy
variable for that, stay with the full sampl as long as possible and
restrict the sample only when needed, as in
series ACTIVE = (foo > bar) && (year>1995)
ACTIVE = ACTIVE || (moo == 0)
My personal taste still tends to favor lines like
'smpl foo > bar --restrict'
'smpl year > 1995 --restrict'
which I find more readable, but of course it's equivalent yes.
smpl ACTIVE --dummy
panel y 0 x1 x2 x3
Yep this is exactly what I mean, temporary subsamples. Perhaps this
would be a good candidate for the cheatsheet chapter in the guide.