[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: -tsset- difficulties (was Re: dwstat v dwstat2)
Kit Baum replied:
>CLive has said 'tsset id' with obs number (_n) as id. If these are
>really panel data, this statistic
>is utter rubbish. You can't lie about tsset and get any sensible
>If you should be saying 'tsset unit year', then dwstat will refuse to
>run at all, even if you say 'dwstat if unit==1'. dwstat2 will run that
>command, but will not run without the qualification. But neither
>command will prevent you from computing an utterly meaningless
>statistic (please see my earlier post).
I'd like to echo the posts of others of my own difficulty in being able to
-tsset- my year variable in my own datasets.
I've tried everything possible, including:
* Nick Cox's -paneldate- suggestion in a post in 2/6 (which I'm unfortunately
not in position to recreate here, as it involves several steps, but if I
recall generated the same year for each observation!); and
* using -gen = _n- after -bysort- (which doesn't give me what I want); and
* using -gen, year()- or -yearly()-.
After -format-ting my year variables into the %(4)ty storage type, Stata still
refuses to -tsset- year: I still get the same "repeated time values in sample"
r(451) error. Cracking this would be a major help. Thanks!
(recorded live in Cardiff).
School of Geography, Politics and Sociology,
University of Newcastle-upon-Tyne,
* For searches and help try: