Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: -tsset- difficulties (was Re: dwstat v dwstat2)

From   n1700166 <>
Subject   st: -tsset- difficulties (was Re: dwstat v dwstat2)
Date   Sat, 5 Jun 2004 13:04:19 +0100

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).

Politics Building,
School of Geography, Politics and Sociology,
University of Newcastle-upon-Tyne,
NE1 7RU,
United Kingdom.

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index