![]() |
From | Kit Baum <baum@bc.edu> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: Re: how to get dfbetas in Stataintercooler with more than 800 observations |
Date | Sun, 6 Apr 2008 06:14:39 -0400 |
Yes, without a Stata matrix, which has limits; use Mata.
The second block of code, using Stata matrices, is limited by matsize. The Mata code is not, and uses less memory than the Stata matrix solution in any case by the use of views. All of the check variables being identically zero shows that the two methods are identical.webuse stan3, clear stset stcox age posttran surgery year, esr(r*) tomata r* // requires tomata from ssc forv i=1/4 { g Inf`i' = . } mata V = st_matrix("e(V)") st_view(Inf, ., ("Inf1", "Inf2", "Inf3", "Inf4")) Inf[., .] = (r1, r2, r3, r4) * V end // double check against [ST] p.174 mkmat r*, mat(esr) mat V = e(V) mat Inf2 = esr * V svmat Inf2, names(s) forv i=1/4 { g check`i' = Inf`i' - s`i' } su check*
I ran stcox with 1473 observations, each with two variables (sexo,
admaecentro), plus the time of failure (tempoemdias) and the indicator of
censoring (status).
To analyse for the leverage (influence) possibility, I followed page 174 of
the version 10 manual, and I commanded and got :
stcox sexo idmaecentro, esr(esr*)
set matsize 800
mkmat esr1 esr2, matrix(esr)
matsize too small to create a [1473,2] matrix
r(908);
The error was expected, since my Stata is Intercooled, limited to matrix
800,x.
Is there a way to get the dfbetas, not through matrix?
* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/
© Copyright 1996–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |