Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: plot using -stphtest- answer and new puzzle

From   Maarten buis <>
Subject   Re: st: plot using -stphtest- answer and new puzzle
Date   Sun, 8 Oct 2006 09:13:23 +0100 (BST)

If you are using Stata 9, than -stphtest- is out of date and you can
better use -estat phtest-, but that does not answer your question. 

You can pile up almost any options you can use after -twoway- after 
-estat phtest, plot(varname)- (or -stphtest, plot(varname)-). In your
case you want to change the title on the y-axis, so you can add
ytitle("whatever"). This is illustrated in the example below.

As I understand it, the plot option just shows a scatter plot of scaled
Schoenfeld residuals against time with a lowess smooth fitted through
it. If I do that by hand my lowess smooth is a lot smoother than the
result from -estat phtest-, but the footnote indicates that the same
bandwidth is used. Does anybody have any ideas?

*---------- begin example --------
sysuse cancer, clear
stset studytime, failure(died)
xi: stcox i.drug age, schoenfeld(sch*) scaledsch(sc*)
lowess sc3 _t, ytitle("scaled Schoenfeld - age at interview") name(a)
stphtest, plot(age) ytitle("scaled Schoenfeld - age at interview")
estat phtest, plot(age) ytitle("scaled Schoenfeld - age at interview")
*---------- end example ----------

--- Nishant Dass <> wrote:
> Could anyone tell me how I could change the titles along
> axes of my plot of scaled Schoenfeld residuals?  
> I am using "stphtest, plot(myvar)" to get the plot and by
> default, the plot shoes the variable name "myvar" along the
> y-axis while I would to display the label instead.  

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider.
*   For searches and help try:

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