[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: stpiece

From   Maarten buis <>
Subject   Re: st: stpiece
Date   Sun, 19 Jul 2009 09:11:42 +0000 (GMT)

--- On Fri, 17/7/09, Bradley, Steve wrote:
> I am having trouble with the time varying variable using 
> -tv( )-.  For some reason it only gives me two varying 
> with time piece outputs when I would expect it with all
> the time pieces.
> Here is my code
> stpiece  control,  tp ( 1 2 to 11) nopre tv(iv  ) nohr

-stpiece is not an official Stata command, but a user 
written command (by Jesper B. Sorensen). I downloaded
it from SSC (by typing in Stata -ssc install stpiece-)
and got version 1.0, November 20 1999. You can check
your version by typing in Stata -which stpiece-. My
version works as expected, as can be seen in the 
example below, so it is hard for me to figure out
why your version of -stpiece- is giving this behavior.
Maybe you can recreate this problem using the 
example files present in Stata, so we can see what 
is going on, or you can contact the author of 
-stpiece-, who I think moved to Stanford (just 
google to find him).

-- Maarten

*--------------- begin example ---------------
sysuse cancer, clear
gen long id = _n
stset studytime, failure(died) id(id)
xi: stpiece i.drug , tp(5 10 20) tv(age)
*---------------- end example ----------------

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen


*   For searches and help try:

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