Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Internal model validation


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Internal model validation
Date   Tue, 6 Apr 2010 18:37:13 +0000 (GMT)

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

http://www.maartenbuis.nl
--------------------------


--- On Fri, 2/4/10, Eduardo Nunez wrote:
> I did follow your advise, but what I get is an error.
> Here is the code used:
> 
> *------------ begin example ----------------
> use "C:\Users\USER\Documents\BNP_CA125.dta", clear
> stcox edad fe40 nyhahigh tas_ingresoCE naCEi hbCEi
> i.ca125categ_bnp100, efron nolog
> matrix b = e(b)
> 
> capture program drop mysim
> program define mysim, rclass
>     use "C:\Users\USER\Documents\BNP_CA125.dta",
> clear
>     bsample
>     estat concordance, beta(b)
>     return scalar Harrell=r(C)
> end
> 
> simulate Harrell=r(C), reps(100): mysim
> sum area
> *-------------- end example ---------------

This does not work for a number of reasons:

1) the -estat concordance- command does not allow
the -beta()- option (see: -help stcox_postestimation-)
instead it works in part with the active estimation
results (see -help estimates-).

2) You returned the results in r(Harrell) but your
-simulate- command expects them in r(C). (see:
-help simulate-)

3) The resulting dataset would store the results in
a variable called Harrell, but you tried to -summarize-
the variable area which does not exist.

4) The -estat concordance- command does not seem to 
work well on bootstrapped data, so you'll either need
to program your own Harrell's C or choose some other
fit statistic.

Hope this helps,
Maarten


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index