Re: [R] 回复: cch() and coxph() for case-coh ort

2008-07-16 Thread Jin Wang
I read many literatures and try to find variance estimation of Prentice
method in case cohort. Only SelfPrentice variance estimation can be
found. Does the jacknife variance using cluster(id) in coxph() only  applies
to Self Prentice?  I can find using [t-e,t] to estimate Beta for Prentice.
But How can we implement Prentice jacknife variance estimation in R
strictly?
Thanks

2008/6/17 Thomas Lumley <[EMAIL PROTECTED]>:

> On Mon, 16 Jun 2008, Peter Dalgaard wrote:
>
> Jin Wang wrote:
>>
>>> I tried to compare if cch() and coxph() can generate same result for
>>> same case cohort data
>>>
>>> Use the standard data in cch(): nwtco
>>>
>>> Since in cch contains the cohort size=4028, while ccoh.data size =1154
>>> after selection, but coxph does not contain info of cohort size=4028.
>>>
>>> The rough estimate between coxph() and cch() is same, but the lower
>>> and upper CI and P-value are a little different.  Can we exactly use
>>> coxph() to repeat cch() using with appropriate configuration in
>>> coxph()?  Is SAS a better way(PHREG,CASECOH.SAS) to implement
>>> time-dependent case-cohort?
>>>
>>>
>>>
>>>
>> I think you need to read the literature, in particular the paper by
>> Therneau (!) and Li, which among other things details the implementation of
>> the Self-Prentice estimator.  With that in mind, it should not be surprising
>> that it is non-trivial how to get correct SE's out of coxph. What _is_
>> surprising (at least somewhat) is how close the robust SE are to those of
>> the Self-Prentice method -- if I understand correctly, the connection is
>> that Self-Prentice uses jackknifing for the contribution from subcohort
>> sampling plus the standard Cox asymptotic variance and the robust method
>> effectively uses jackknifing for both.
>>
>
> Yes. The cch() methods all do a model-based analysis of the full cohort and
> a finite-sampling analysis of the second-phase sampling.
>
> For Cox models the model-based and jackknife variances are usually very
> close. The nwtco data is actually an unusually bad fit to the Cox model and
> the differences are larger than usual.
>
> (I'm a bit puzzled about why cch() insists on having unique id's, though.
>> Doesn't _look_ like it would be too hard to get rid of that restriction, at
>> least for S-P, which admittedly is the only method I spent enough time
>> studying. And that was a some years ago.)
>>
>
> If you have only one event per person the only problem is that the code
> isn't written that way.   On the other hand, if you do have additional
> time-varying covariates there will be a (possibly useful) efficiency gain
> from using more efficient methods than cch() provides, with calibration of
> weights based on covariates inside and outside the subcohort.
>
>   -thomas
>
> Thomas Lumley   Assoc. Professor, Biostatistics
> [EMAIL PROTECTED]University of Washington, Seattle
>
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] 回复: cch() and coxph() for case-coh ort

2008-06-16 Thread Jin Wang
I tried to compare if cch() and coxph() can generate same result for
same case cohort data

Use the standard data in cch(): nwtco

Since in cch contains the cohort size=4028, while ccoh.data size =1154
after selection, but coxph does not contain info of cohort size=4028.

The rough estimate between coxph() and cch() is same, but the lower
and upper CI and P-value are a little different.  Can we exactly use
coxph() to repeat cch() using with appropriate configuration in
coxph()?  Is SAS a better way(PHREG,CASECOH.SAS) to implement
time-dependent case-cohort?


> summary(fit2.ccP)
Call:
coxph(formula = Surv(edrel, rel) ~ stage + histol + age + offset(-100 *
(1 - subcohort)) + cluster(seqno), data = ccoh.data)

  n= 1154
   coef exp(coef) se(coef) robust sez   p
stageII  0.7363  2.09   0.12130.1699 4.33 1.5e-05
stageIII 0.5976  1.82   0.12330.1753 3.41 6.5e-04
stageIV  1.3921  4.02   0.13390.2081 6.69 2.2e-11
histolUH 1.5059  4.51   0.09110.1644 9.16 0.0e+00
age  0.0432  1.04   0.01460.0243 1.78 7.6e-02

 exp(coef) exp(-coef) lower .95 upper .95
stageII   2.09  0.479 1.497  2.91
stageIII  1.82  0.550 1.289  2.56
stageIV   4.02  0.249 2.676  6.05
histolUH  4.51  0.222 3.267  6.22
age   1.04  0.958 0.996  1.09

Rsquare= 0.273   (max possible= 1 )
Likelihood ratio test= 368  on 5 df,   p=0
Wald test= 134  on 5 df,   p=0
Score (logrank) test = 490  on 5 df,   p=0,   Robust = 165  p=0

  (Note: the likelihood ratio and score tests assume independence of
 observations within a cluster, the Wald and robust score tests do not).


> summary(fit.ccSP)
Case-cohort analysis,x$method, SelfPrentice
 with subcohort of 668 from cohort of 4028

Call: cch(formula = Surv(edrel, rel) ~ stage + histol + age, data = ccoh.data,
subcoh = ~subcohort, id = ~seqno, cohort.size = 4028, method = "SelfPren")

Coefficients:
  CoefHR  (95%   CI) p
stageII  0.736 2.088 1.491 2.925 0.000
stageIII 0.597 1.818 1.285 2.571 0.001
stageIV  1.392 4.021 2.670 6.057 0.000
histolUH 1.506 4.507 3.274 6.203 0.000
age  0.043 1.044 0.996 1.095 0.069


2008/6/12, Terry Therneau <[EMAIL PROTECTED]>:
> Jin Wang had an error.  My original note specified a variable that was 1 for
> subjects NOT in the subcohort, so the correct coxph call is
>
>   coxph(Surv(edrel, rel) ~ stage + histol + age +
>offset(-100*(subcohort==0)) + cluster(seqno), data =ccoh.data)
>   
> This gives the same coefficients as the cch example, along with the
> infinitesimal jackknife or "robust" variance estimate.
>
>   Terry Therneau
>   
>
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.